Closed andreasdurietztibber closed 2 weeks ago
Reproduced the JSON parse issue
Reproduced the empty argument issue
@ai-sdk/amazon-bedrock@0.0.26
is being released with the parallel tool call fix
ai@3.3.43
is being released with the empty arguments fix
I have to say that's pretty impressive! 😄 From bug report to fixes with new releases in two packages, within 1-2 hours. I can confirm it works for our use case now. Big thanks! 🥳
Description
We ran into two unexpected things that both work well when using
generateText
but not withstreamText
.parameters: z.object({ }),
. Doing so makes the streamText simply stop after the first tool call, without any additional information.parameters: z.object({ query: z.string() }),
and ask a question that would require both tools if fails with an error.Error message
We can get around that by putting
parameters: z.record(z.string(), z.string()),
as parameter but it seems like a strange workaround when we don't even want a parameter.Code example
Additional context
The problem with empty params stopping the streamText seem to be present for both bedrock & anthropic provider. However the problem with params failing the JSON parsing only seem to be present with
@ai-sdk/amazon-bedrock
but not with@ai-sdk/anthropic
.