Summary
response_format: { type: "json_schema", ... } (including strict: true) is ignored by openai/gpt-oss-120b. Instead of returning JSON conforming to the schema, the model returns free-form text. This used to work; looks like a regression (possibly introduced around caching changes).
Environment / Endpoint
Chat Completions API (/openai/v1/chat/completions), model openai/gpt-oss-120b.
Docs reference
Reproduced with the minimal example from your Structured Outputs docs: Structured Outputs - GroqDocs .
Steps to Reproduce
- Send the following request:
{
"model": "openai/gpt-oss-120b",
"messages": [
{ "role": "system", "content": "Extract product review information from the text." },
{ "role": "user", "content": "what time is now?" }
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "product_review",
"schema": {
"type": "object",
"properties": {
"product_name": { "type": "string" },
"rating": { "type": "number" },
"sentiment": { "type": "string", "enum": ["positive", "negative", "neutral"] },
"key_features": { "type": "array", "items": { "type": "string" } }
},
"required": ["product_name", "rating", "sentiment", "key_features"],
"additionalProperties": false,
"strict": true
}
}
}
}
Actual Result
{
"id": "chatcmpl-88021918-680b-4483-9d22-3a8eda9cd7b4",
"object": "chat.completion",
"created": 1760997747,
"model": "openai/gpt-oss-120b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I’m not able to access real-time information, so I can’t tell you the current time. You can check a clock, phone, or computer for the most accurate time.",
"reasoning": "…"
},
"finish_reason": "stop"
}
],
"x_groq": { "id": "req_01k81ta988ffkv52194qcebypp" },
"service_tier": "on_demand"
}
Expected Result
Either a valid JSON object that matches the schema, e.g.:
{
"product_name": "",
"rating": 0,
"sentiment": "neutral",
"key_features": []
}
— or an explicit error/refusal stating the model cannot produce output matching the provided JSON Schema. In all cases, no free-form prose outside JSON.
Notes
- Reproducible 100% with the minimal example from your Structured Outputs documentation.
response_format.json_schemaappears to be ignored byopenai/gpt-oss-120b(includingstrict: trueandadditionalProperties: false).- Presence of
message.reasoningsuggests a response mode incompatible with Structured Outputs.
Impact
Breaks downstream parsing and validation; machine-readable output cannot be relied upon.
Request
Could you please take a look and let me know if this is a known issue? I’d really appreciate any guidance or a suggested workaround—e.g., a model that reliably enforces JSON Schema or a parameter/flag that ensures response_format is honored. I’m happy to share additional logs, run targeted tests on my side, or help validate a fix. Thanks a lot for your help!