I have a website that uses 4.1-mini on the backend.
It has supported structured outputs all month. It supposedly supports it via linklink.
Today about 3 hours ago it now says 4.1mini doesnt support structured outputs.
Docs contradict eachother, claiming only 4o and 4 support structured outputs.
Other docs say o3 and 4.1 and 4.1 mini also support it.
This is weird because i would assume moving forward all chat completion models are intended to support this as it is a required feature for most applications.
OpenAI API error: invalid_request_error: Invalid parameter: āresponse_formatā of type ājson_schemaā is not supported with this model
Yes i have verified the model hasnt changed. its a frozen deployment. env is same. code is same.
OPENAI_MODEL_NAME=āgpt-4.1-miniā
.
TLDR worked 3 hours ago. now not work. broke prod. likely a bug on openaiās side
Changing the model to gpt-4.1-mini-2025-04-14 specifically fixed it.
Verified, as of now, gpt-4.1-mini will return the fail to support structured outputs error, however the fully specified pinned model with version does work, and does not return the error.
This is further evidence that this is a bug on OpenAIās side
Also tested with Chat Completions API, works fine there as well, playground and curl. Are you using strict mode? Iām curious if thereās a little intricacy with a parameter youāre using.
Unable to replicate. Chat Completions API endpoint, default project. gpt-4.1-mini alias, structured strict tool and strict json_schema. Using httpx with streaming context manager, not SDK.
{"response_to_user":"Dolphins and porpoises can be differentiated by several features: 1. Shape: Dolphins tend to have a more elongated, streamlined body and a beak-like snout, while porpoises have a shorter, more robust body with a blunt nose. 2. Teeth: Dolphins have cone-shaped teeth, whereas porpoises have spade-shaped teeth. 3. Dorsal Fin: Dolphins typically have a curved or hooked dorsal fin, while porpoises have a more triangular dorsal fin. 4. Behavior: Dolphins are often more social and acrobatic compared to the generally shy and less active porpoises. 5. Size: Dolphins tend to be larger than porpoises. These distinctions can help you tell them apart if you see them in the wild or in captivity.","response_topic":"Differences between dolphins and porpoises"}
Usage: prompt_tokens=150, completion_tokens=185, total_tokens=335
prompt_tokens_details: cached_tokens: 0, audio_tokens: 0
completion_tokens_details: reasoning_tokens: 0, audio_tokens: 0, accepted_prediction_tokens: 0, rejected_prediction_tokens: 0
-- your message? -- ('/' alone to send. '/help' for more.)
What's my weather in Tokyo?
/
Usage: prompt_tokens=348, completion_tokens=20, total_tokens=368
prompt_tokens_details: cached_tokens: 0, audio_tokens: 0
completion_tokens_details: reasoning_tokens: 0, audio_tokens: 0, accepted_prediction_tokens: 0, rejected_prediction_tokens: 0
*** Tool call detected ***
get_current_weather with arguments:
{"location":"Tokyo","unit":"celsius"}
Please provide the result for get_current_weather: Tokyo JP Conditions 17C sunny
{"response_to_user":"The current weather in Tokyo is sunny with a temperature of 17°C.","response_topic":"Tokyo weather"}
Usage: prompt_tokens=384, completion_tokens=31, total_tokens=415
prompt_tokens_details: cached_tokens: 0, audio_tokens: 0
completion_tokens_details: reasoning_tokens: 0, audio_tokens: 0, accepted_prediction_tokens: 0, rejected_prediction_tokens: 0
-- your message? -- ('/' alone to send. '/help' for more.)