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
[BUG] structured_outputs: strictify_schema_json incorrectly forces all fields to be required #800
strictify_schema_json in the structured_outputs resource server overrides the schema's required list to include every property:
schema["required"] =list(schema["properties"])
This means a model that correctly omits an optional field gets reward 0.0, even though the response is valid per the schema spec.
The training data has schemas with genuinely optional fields. For instance, entry 2 in example.jsonl (patient allergy assessment) has a medicationUse object with no required list at all — the document itself says "Medication Name: Not applicable (field left blank per data schema)." Similarly, the symptoms object only requires severity out of five properties.
Since the prompt shown to the model includes the original schema (with the real required list), this creates a contradictory training signal: the prompt tells the model certain fields are optional, but the reward function demands them all.
The fix is straightforward — just remove the required override and keep only additionalProperties: false.
changed the title [-]structured_outputs: strictify_schema_json incorrectly forces all fields to be required[/-][+][BUG] structured_outputs: strictify_schema_json incorrectly forces all fields to be required[/+]on Mar 3, 2026
Activity
[-]structured_outputs: strictify_schema_json incorrectly forces all fields to be required[/-][+][BUG] structured_outputs: strictify_schema_json incorrectly forces all fields to be required[/+]