Claus Ibsen created CAMEL-27403:
-----------------------------------
Summary: 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
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)