Skip to content

Tweak OpenAI JSON schema transforms #6523

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

Merged
merged 2 commits into from
Jun 18, 2025
Merged

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jun 17, 2025

Only require all properties and force additionalProperties: false when strict is set or when structured output is used.

Also update the OpenAI assistant chat client to apply the transforms.

Closes #6483

Microsoft Reviewers: Open in CodeFlow

@stephentoub stephentoub requested a review from a team as a code owner June 17, 2025 21:57
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Jun 17, 2025
Only require all properties and force additionalProperties: false when strict is set or when structured output is used.

Also update the OpenAI assistant chat client to apply the transforms.
Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

Thanks. I take it our OpenAI integration tests are passing with these changes?

@stephentoub
Copy link
Member Author

Thanks. I take it our OpenAI integration tests are passing with these changes?

Yup.

@stephentoub stephentoub merged commit d323577 into dotnet:main Jun 18, 2025
6 checks passed
@stephentoub stephentoub deleted the openaijson branch June 18, 2025 18:24
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai Microsoft.Extensions.AI libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[M.E.AI] Tool call format problems
2 participants