Would love to understand better the reason for not allowing structured output with toolChoice other than 'auto' #12977
Replies: 1 comment
-
|
This discussion was automatically closed because the community moved to community.vercel.com/ai-sdk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Acknowledgement
Feedback
I really love the new addition of allowing output: Output.object({}) to any generateText calls aor ToolLoopAgent, this opened up a lot of new possibilities. But so many cool examples of conditional loop control conditions require to modify toolChoice during
prepareSteporprepareCall, and in the past 14 months working with ai sdk heavily I honestly only had couple of simple cases where response can be unstructured data, as most serious use cases need a strict validation. So I am wondering what is the actual underlying technical limitation of this? Is this just a limitation on the model provider's side?I know that there is a potential solution of just ignoring the response of main agent, and just adding a last tool that would return structured data and just looking at result.steps to find the last tool_response to get it, but this doesn't feel right and the DX of this is pretty bad if i'm being honest.
Is there a future where loopControl/toolChoice conditions can be combined with structured output?
Beta Was this translation helpful? Give feedback.
All reactions