Skip to content

Fix strict mode payload placement in OpenAiChatModel#6540

Open
prachipanditrao wants to merge 1 commit into
spring-projects:mainfrom
prachipanditrao:fix-issue-6536
Open

Fix strict mode payload placement in OpenAiChatModel#6540
prachipanditrao wants to merge 1 commit into
spring-projects:mainfrom
prachipanditrao:fix-issue-6536

Conversation

@prachipanditrao

Copy link
Copy Markdown

This PR fixes the tool calling defect where the strict configuration property was incorrectly serialized inside the JSON-Schema parameters object rather than at the function-level wrapper, causing it to act as a silent no-op.

It moves the property mapping to the FunctionDefinition builder block within OpenAiChatModel to align with the official OpenAI/Azure API specifications and exposes a strict configuration flag in OpenAiChatOptions.

Fixes #6536

This commit moves the 'strict' parameter from the JSON-Schema parameters
object to the function level within the FunctionDefinition builder, aligning
with the official OpenAI/Azure API specification. It also exposes a strict
configuration flag in OpenAiChatOptions.

Fixes spring-projects#6536

Signed-off-by: prachipanditrao <prachi.panditrao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI/Azure tool calling: strict is emitted inside parameters instead of at the function level, so strict mode is a silent no-op for tools

2 participants