You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Render a flat RowTypeInfo output schema as JSON Schema #1256
A RowTypeInfo output schema never gets native structured output today:
The native connections accept only a POJO class (Java) or a pydantic model (Python), so they skip a RowTypeInfo.
The prompt path describes the schema with the type's string form (toString() in Java, str() in Python), not JSON Schema.
The Java BaseChatModelConnection.chat Javadoc calls the skip a permanent fallback.
Proposal: render a flat RowTypeInfo (basic field types only) as a JSON Schema object, in both languages:
every field required
additionalProperties: false
Use it in two steps:
In the prompt, in place of the string form.
As the native schema, so AUTO and NATIVE work for a RowTypeInfo. The connections currently take a class, so this step needs them to accept a schema document as well.
A nested or non-basic RowTypeInfo keeps today's behavior. The guide and the Javadoc above are updated to match.
@sangkyoonnam Thanks for taking this. Your two-step split matches the issue. GitHub only lets me assign people who have commented on the issue, so please leave a comment here and I'll assign it to you.
Pointers for the first step:
The prompt text is built in ReActAgent (Java, outputSchema.toString()) and react_agent.py (Python, str(output_schema)). The same string feeds both the schema prompt and the native-schema prompt.
Please render the same JSON Schema for the same row type in both languages, with a test on each side.
The response becomes a Row in ChatModelAction.generateStructuredOutput (Java) and _generate_structured_output (Python). Both copy the JSON values without converting them to the field types, and a missing field gives null in Java but a KeyError in Python. That can stay out of scope, but a test that checks field types may run into it.
For the second step: #1266 moves the six Python _native_output_model copies into one helper, and the native step changes that same check. Whichever lands first, the other can rebase onto it.
Activity
weiqingy commentedon Oct 16, 2026
@sangkyoonnam Thanks for taking this. Your two-step split matches the issue. GitHub only lets me assign people who have commented on the issue, so please leave a comment here and I'll assign it to you.
Pointers for the first step:
ReActAgent(Java,outputSchema.toString()) andreact_agent.py(Python,str(output_schema)). The same string feeds both the schema prompt and the native-schema prompt.RowinChatModelAction.generateStructuredOutput(Java) and_generate_structured_output(Python). Both copy the JSON values without converting them to the field types, and a missing field givesnullin Java but aKeyErrorin Python. That can stay out of scope, but a test that checks field types may run into it.For the second step: #1266 moves the six Python
_native_output_modelcopies into one helper, and the native step changes that same check. Whichever lands first, the other can rebase onto it.Happy to review.
sangkyoonnam commentedon Oct 16, 2026
Commenting here so you can assign it to me, @weiqingy. Thanks for the pointers.