Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/migrate to nextauth 5 #207

Merged
merged 8 commits into from
Dec 30, 2023
Merged

Chore/migrate to nextauth 5 #207

merged 8 commits into from
Dec 30, 2023

Conversation

lean1190
Copy link
Collaborator

resolves OLV-251
resolves OLV-250
resolves OLV-249

ready

Copy link

linear bot commented Dec 30, 2023

OLV-249 Move the chat endpoint to Edge

Vercel's free plan has a timeout limitation of 10 seconds for Serverless functions.

However, this is different for edge functions, since they can run for much longer periods of time, even in the free plan.

Edge runtime is the recommended way of approaching OpenAI streaming, the reason why I didn't use it in the first place is because, at the moment, Auth.js doesn't work on edge. This is relevant because we need to store the latest ai execution, and the execution is linked to the user, which comes from the Session. But there's light at the end of the tunnel, because Auth.js is releasing a v5 soon which is Edge compatible https://auth-docs-git-feat-nextjs-auth-authjs.vercel.app/guides/upgrade-to-v5

OLV-251 Make the chat endpoint run on "edge"

export const runtime = 'edge'

OLV-250 Update Auth.js to v5

This will enable us to get the session in edge functions.

It will also require to change the way we get authorization data in the rest of the app.

Copy link

vercel bot commented Dec 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
olivo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2023 7:34pm

@lean1190 lean1190 merged commit d4d8c7e into main Dec 30, 2023
8 checks passed
@lean1190 lean1190 deleted the chore/migrate-to-nextauth-5 branch December 30, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant