Changed the AI Model and Now the API Returns a 400
A 400 after changing the AI model means the new model rejects a setting the old one accepted. As of November 2026, older GPT-5 models reject temperature, Claude Opus 5.5 and Sonnet 5.5 reject temperature, forced tool_choice, budget_tokens, and prefill, and Gemini 3.6 Flash ignores temperature with no error, so a model swap has to be treated as a change to the whole request.
A 400 right after you change the AI model means the new model rejects a setting the old one accepted. As of November 2026, gpt-5, gpt-5-mini, and gpt-5-nano raise an error on temperature, top_p, and logprobs, while Claude Opus 5.5 and Sonnet 5.5 return a 400 on temperature, top_p, top_k, forced tool_choice, budget_tokens, and assistant prefill. Gemini 3.6 Flash takes the same temperature and ignores it, with no error at all.
Most answers to this error are one-line threads for one tool: rename max_tokens to max_completion_tokens, delete temperature, move on. That clears the 400 and leaves the harder problem in place. A model swap has three possible outcomes, and the 400 is the friendly one.
A model swap fails in three different ways
Each setting in your request lands in one of three buckets on the new model:
- Rejected. The call returns a 400 and the run stops. You find out in minutes, and the message usually names the field.
- Ignored. The call succeeds and the setting does nothing. Your workflow still shows
temperature: 0, and that number no longer means anything. - Accepted, but different. The call succeeds with the same fields, and the same field now does something else. A token cap that was enough for the answer now has to cover thinking too.
Teams fix the first bucket, see a green run, and ship the other two. Those are the ones that surface a week later as blank CRM fields or a higher bill.
What each provider rejects or ignores
Here is the map as of November 2026, from each vendor's migration and reference pages. Model lists move, so treat this as a starting point and check the page for your exact model.
| What you send | OpenAI | Anthropic (Opus 5.5, Sonnet 5.5) | Google (Gemini 3.6 Flash, 3.5 Flash-Lite) |
|---|---|---|---|
temperature, top_p | Error on gpt-5, gpt-5-mini, gpt-5-nano. GPT-5.2 accepts them only at reasoning effort none. GPT-6 guidance: remove them unless effort is none. | 400, and top_k too | Ignored with no error. Google says they will error in future generations. |
| Output cap | max_tokens is deprecated on Chat Completions and not compatible with o-series. Use max_completion_tokens, or max_output_tokens on Responses. Both count reasoning tokens. | max_tokens stays, but now covers thinking plus text | Reaching max_output_tokens during reasoning ends with status incomplete, and output can be empty |
| Turning thinking off or budgeting it | gpt-6-astra returns a 400 on effort none, and gpt-6.1-sol does not support it | budget_tokens is a 400. thinking: disabled is a 400. Opus 5.5 always thinks; Sonnet 5.5's lowest setting is between_tools. | Replace thinking_budget with thinking_level |
| Forcing a tool | Chat Completions has no function calling on gpt-6-astra or gpt-6.1-sol. Use Responses. | tool_choice types any and tool are a 400, including on token counting | Not addressed in the migration notes we checked |
| Prefilled reply | No equivalent | 400 on Opus 4.6 and later Opus models, and on Sonnet 5.5 | 400 when the last non-empty turn is a model turn |
One combination deserves its own warning. OpenAI ties temperature to effort none, and GPT-6 Astra and GPT-6.1 Sol do not offer none. On those two models there is no setting that makes temperature valid, so the field has to go.
The Claude error is unusually direct: tool_choice: type "tool" and "any" are not supported for this model. The OpenAI one reads like Unsupported value: 'temperature' does not support 0 with this model, and the reported text varies by model and endpoint. Match on the field name in your logs, not on the full sentence.
The settings that disappeared were your reliability tricks
Look at what these rows have in common. temperature: 0 was how people asked for consistency. Forcing a tool was how people guaranteed JSON from Claude. Prefilling the reply with an opening brace was the older version of the same trick. These are the settings operators added on purpose, usually after a bad run, which is why deleting them until the 400 goes away is the wrong fix.
Anthropic's guide says plainly that temperature = 0 never guaranteed identical outputs on prior models, which matches why the same prompt gives different answers. The replacement for most of this is the same: structured outputs for shape, and validation for content. On Claude, Anthropic's replacement for forced tools is tool_choice: auto plus strict tool use or structured outputs, with the prompt stating when the tool applies. If your extraction step depended on a forced tool, delete it only after you have the schema path working, using the tiers in why AI returns broken JSON.
The swaps that return 200 and still break
These pass a smoke test. Check for them on purpose.
The reply moved. Claude Opus 5.5 and Sonnet 5.5 can start a response with thinking blocks before the first text block. Anthropic names content[0].text as code that breaks. Here is an illustrative case: an n8n HTTP Request step feeds {{ $json.content[0].text }} into a CRM note. After the swap the call is green, the expression resolves to nothing, and the note is blank on every record. Select blocks by type.
The cap now has to hold the thinking. A max_tokens of 1,024 sized for a one-line classification was generous when the model did not think. Now thinking spends from that same 1,024, and thinking tokens bill as output. OpenAI's reasoning guide suggests reserving at least 25,000 tokens when you start with those models. This is how a swap produces the cut-off answers that people search for most on this site.
The default effort moved. Opus 5.5 defaults to medium where Opus 5 used high. GPT-5 defaults to medium while GPT-5.1 and GPT-5.2 default to none. Send no effort field and the amount of reasoning changes with the model name, along with latency, cost, and quality. Set it explicitly.
The second turn fails, the first does not. In a tool loop, Claude's thinking blocks must go back complete and unmodified, and the API rejects edited, reordered, or dropped blocks with a 400. Code that rebuilds the assistant message keeps only text and tool calls, so a one-shot test passes and the first real tool round trip fails.
The fallback has a different contract. A failover branch that reuses the primary request body sends yesterday's settings to a model that refuses them, and you discover it during the outage. Provider fallbacks need their own request per model, tested before you need them.
Where the setting is hiding in your workflow
If you wrote the JSON yourself in an HTTP Request step, what you see is what gets sent. Nodes are less obvious. In the current source of n8n's OpenAI Chat Model node, Sampling Temperature defaults to 0.7 when you add that option, and the node file passes it along with no per-model check. The Reasoning Effort option only appears for model names matching o1, o3 and later, or gpt-5. The library underneath can still adjust a request, so do not reason about this from the screen. Capture the body that actually goes out.
Two places get missed. Settings live on the node's options, so changing the model dropdown leaves them in place. And shared templates or sub-workflows carry them into every workflow that calls them, so one swap can break steps you never opened.
How to swap a model without breaking the step
We treat a model change as a release, in this order:
- Capture the real request. Log the full body your step sends, including options you forgot about, and read the 400 response if you already have one.
- Mark every field against the new model's migration page. Label each one rejected, ignored, or changed. The table above covers the common fields, not all of them.
- Replace by purpose, not by name. Ask what each setting was for. Consistency moves to schemas and validation. Thinking depth moves to the effort setting. A forced tool moves to
autoplus strict tools. Then delete the old field. - Harden the read side. Select response blocks by type, check the stop reason on every call, and set the output cap and effort level explicitly.
- Test beyond one call. Run recorded inputs from production, include a full tool round trip, and compare output and cost per run against the old model, as in how to test an AI automation before production.
- Pin what you shipped. Record the model and its request settings together, because the next alias change can start this over without anyone touching the workflow.
For anything with more than a couple of AI steps, keep one small profile per model: its ID, allowed fields, output cap, effort level, and how to read the reply. Steps look up the profile instead of carrying settings of their own, so a swap is one reviewed change and the fallback path gets the right request for free.
What to do next
Before your next swap, open one AI step and write down every field it sends, then mark each against the table above. Any temperature, forced tool, or content[0] read is worth fixing now, even on a model that still accepts it. If you run many AI steps and want the profile layer built properly, that is part of our custom software work, or tell us what you are running and we will point at the riskiest step first.
Frequently Asked Questions
SOURCES & CITATIONS
- Claude Opus 5.5 migration guide — Anthropichttps://platform.claude.com/docs/en/models/opus-5-5/migration-guide
- Model guidance — OpenAIhttps://developers.openai.com/api/docs/guides/latest-model?model=gpt-5.2
- Reasoning models — OpenAIhttps://developers.openai.com/api/docs/guides/reasoning
- What's new in Gemini 3.6 — Googlehttps://aistudio.google.com/docs/whats-new-gemini-3.6
About Alexey Yushkin
Alexey is the founder of GENERAL INFORMATICS LLC. He designs and ships AI and automation systems for businesses and operators across the US.
Related reading
Want this kind of system in your business?
We build practical AI and automation systems for operators. Send us your current workflow and we will show you what to automate first.
