Skip to content

[Bug]: strict response format example is incorrect #10320

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

Open
Tomas2D opened this issue Apr 25, 2025 · 0 comments
Open

[Bug]: strict response format example is incorrect #10320

Tomas2D opened this issue Apr 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Tomas2D
Copy link
Contributor

Tomas2D commented Apr 25, 2025

What happened?

The following section (https://docs.litellm.ai/docs/completion/json_mode#pass-in-json-schema) provides an example that contains an error.

response_format: { "type": "json_schema", "json_schema": … , "strict": true }

But it should be

response_format: { "type": "json_schema", "json_schema": { ..., "strict": true } }

The first example will throw an error for OpenAI.

Relevant log output

litellm.BadRequestError: OpenAIException - Unknown parameter: 'response_format.strict'.

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

1.67.2

Twitter / LinkedIn details

https://www.linkedin.com/in/tomas2d/

@Tomas2D Tomas2D added the bug Something isn't working label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant