-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
lastStep undefined issue #4147
Comments
It looks like this issue might be related (and what I'm running into): #3422 |
Can you share the code you use to call Anthropic does not support structured outputs with streamText (we use tool calls with streamObject/generateObject), so this might not work with Anthropic. |
I'm getting this same error, using steamText not steamObject, with openai |
Can you check if you still encounter this issue if you downgrade |
hi, forgot to reply this I didn't have to downgrade it, was previously sending only |
Description
Still need to understand why this is happening... but there seems to at least be a problem in the code.
Comment + check for nullish
lastStep
here:ai/packages/ai/core/generate-text/stream-text.ts
Lines 534 to 536 in 952cbdf
but then accessed without care here:
ai/packages/ai/core/generate-text/stream-text.ts
Line 569 in 952cbdf
Produces this stack trace:
AI provider
Anthropic. Don't get this error With OpenAI, I think. Probably something to do with tools declaration, but would be nice to get better feedback than just that stack above.
The text was updated successfully, but these errors were encountered: