-
Notifications
You must be signed in to change notification settings - Fork 148
Fix: Handle object-style finishReason for AI SDK v5/v6 compatibility #695
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 270e3ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (8 failed)hono (8 failed):
🪟 Windows (27 failed)nextjs-turbopack (27 failed):
🌍 Community Worlds (39 failed)mongodb-dev (3 failed):
mongodb (27 failed):
starter (8 failed):
turso (1 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
❌ 🪟 Windows
❌ 🌍 Community Worlds
❌ Some E2E test jobs failed:
Check the workflow run for details. |
|
I'm taking over responsibility for merging this code as if I wrote it (saying this to indicate that my DCO rights should apply to this code), so I can get this merged |
|
Shipped in |
Users were encountering the following error when using
DurableAgentwith AI SDK v6:This occurred because AI SDK v6 (or certain providers) may return
finishReasonas an object with atypeproperty (e.g.,{ type: 'stop' }) rather than a plain string like'stop'as in AI SDK v5.Solution
stream-text-iterator.tsanddo-stream-step.tsto handle both formatsFinishReasontype directly from theaipackage, ensuring 1:1 type compatibility with whichever version the consuming app uses (v5 or v6)JSON.stringifywhen an unexpected finish reason is encountered