Skip to content

fix(inference): default json_schema.strict to false when not set#6024

Open
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/strict-field-default
Open

fix(inference): default json_schema.strict to false when not set#6024
derekhiggins wants to merge 2 commits into
ogx-ai:mainfrom
derekhiggins:fix/strict-field-default

Conversation

@derekhiggins

@derekhiggins derekhiggins commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #6020

Summary

  • Default json_schema.strict to false when it is None, so it survives model_dump(exclude_none=True) serialization
  • Prevents Anthropic's API from rejecting the request with a 400 due to missing strict field

Test plan

  • Unit test for strict field defaulting
  • Integration test with Anthropic provider and structured output

Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Recordings committed successfully

Recordings from the integration tests have been committed to this PR.

View commit workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structured output json_schema.strict field stripped, causing Anthropic 400 error

1 participant