[ 
https://issues.apache.org/jira/browse/CAMEL-27403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149392#comment-18149392
 ] 

Claus Ibsen commented on CAMEL-27403:
-------------------------------------

PR: https://github.com/apache/camel/pull/30620 (one commit per ticket: 
CAMEL-27402, CAMEL-27403).

_Claude Code on behalf of Claus Ibsen_

> camel-openai - a jsonSchemaStrict option, to have the model follow the 
> jsonSchema exactly (strict structured outputs)
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27403
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27403
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-openai
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> With {{jsonSchema}}, chat-completion sends {{response_format}} of type 
> {{json_schema}} without {{strict}} (and the Responses API sets 
> {{strict(false)}} in {{OpenAIResponsesSupport}}). Without strict, OpenAI 
> treats the schema as a hint: the answer can miss required fields or have 
> others, and Camel does not check it either.
> Expected: a new option {{jsonSchemaStrict}} (default false, as today), which 
> sets {{strict: true}} for chat-completion and the Responses API (and batch 
> requests). With strict, OpenAI only accepts schemas that meet its rules 
> (every property listed in {{required}}, {{additionalProperties: false}} on 
> every object) and rejects others with 400, so the docs of the option say so. 
> A test with a stub server checks the request.
> Found while adding the openai-chat-action Kamelet to the Kamelet catalog 
> (apache/camel-kamelets#3365, 2026-11-22).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to