-
Notifications
You must be signed in to change notification settings - Fork 494
fix(litellm): enhance structured output handling #1021
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
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Hi, approving, but noting that we recently launched a new mechanism for structured_output in #943 which should be used instead (when it is released) |
|
Thanks, Do I need to change anything here? |
Nope nothing to change, your change here is still useful and will make the, soon-to-be, deprecated approach more robust. |
Okay, Thanks for the Opportunity! |
* fix(litellm): enhance structured output handling * fix(litellm): update logic
Description
Enhanced structured output handling for tool calls in
LiteLLMModel.tool_callswithin LiteLLM responses.tool_callsare present, the model now parses themessage.contentdirectly.This ensures structured outputs are consistently parsed across all providers, preventing missing or malformed data in tool responses.
Related Issues
Fixes #1005
Documentation PR
N/A
Type of Change
Bug fix
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.