Repository navigation
fix(openai): drop unsupported reasoning effort for gpt-6.1-sol - #43935
Conversation
gpt-6.1-sol accepts low, medium, high, xhigh, and max. none and minimal were still forwarded, because chat completions ignored an explicit supports_none_reasoning_effort=false and the Responses mapper never applied that contract. Co-authored-by: Cursor <cursoragent@cursor.com>
[Medium impact] Adjusts reasoning effort support flags for specific models. Add the required breaking-change title and upgrade note before merging Findings
SummaryThe PR reads model flags to drop or reject unsupported reasoning effort across chat and Responses. It preserves reasoning summaries and sends affected function-tool requests through the Responses bridge The breaking-change title and upgrade note are still required
Reviews (10) · Last reviewed commit: "fix(azure_ai): call the public effort-le..." · Reviewed by Greptile |
Merging this PR will not alter performance
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@pOpO1-9 — some CI checks are failing that appear related to your changes: |
gpt-6-astra on Azure accepts reasoning.effort none. The responses gate was checking the OpenAI entry, which rejects it. Signed-off-by: Paul El Khoury <82139421+pOpO1-9@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks Krrish. Both of those were from this change. They are fixed on the branch. The lint hit was one private-method use. The Azure failure was the responses path reading OpenAI's map for gpt-6-astra. Azure accepts effort none there, so temperature 0.2 stays. OpenAI gpt-6.1-sol still rejects none. I don't have a key on this machine for a live gpt-6.1-sol call, so I can't attach a screenshot. The unit check covers the two cases above. |
…hat and Responses One gate reads the model's cost-map row for whatever effort level a request asks for, on Chat Completions and the Responses API, for OpenAI and Azure. xhigh stays opt-in on chat (Azure also keeps none opt-in); every other level is refused only when its supports_<level>_reasoning_effort flag is false. A refused level is dropped under drop_params or answered with a local 400, and Responses keeps the rest of the reasoning object when it drops effort. The guards that follow judge temperature by the level the provider will see. Tests move into the mapped test files and derive the expected outcome for each level from the map row, so a new GPT-6 model needs only its row.
…ow flags alone drive the gate
…nses, as live calls show
…adapter and Foundry paths
…e gpt-5.3-codex rows The same model honors max on Responses and refuses it on Chat Completions, so one row flag cannot gate it on either route. The gates now skip max, the Azure gpt-6-astra rows keep max off so the /v1/messages adapter degrades to xhigh and /model_group/info stops short of it as on main, and chat still forwards max for the Responses bridge. The gpt-5.3-codex rows said none and xhigh off and minimal on; the live model answers the other way round (2026-10-01), and an opt-out gate would have dropped the levels Codex CLI sends.
…at gate drops none
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit f466ebc. Configure here.
| # The level the provider will see: None once dropped, so the guards below judge by the model's default effort | ||
| effective_effort: Final = get_effort_level( | ||
| non_default_params.get("reasoning_effort") or optional_params.get("reasoning_effort") | ||
| ) |
There was a problem hiding this comment.
After dropping xhigh, the new effective_effort check forwards temperature on successful gpt-5.1 requests that previously dropped it. This can change callers’ output. The repository requires ! in the PR title and a short “Breaking change” note explaining who is affected and what to change when upgrading. Add both before merging
Rule Used: What: When a PR changes behavior that existing users rely on, the PR title must mark it breaking with ! after the type or scope (e.g. fix(mcp)!: ..., feat!: ...), and the PR description must have a short "Breaking change" note saying who is aff... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
this is fine what we'll do here is going to be:
with drop_params on we will drop the unsupported level and then judge the temperature by the effort the model will actually run at,
- so on gpt-5.1 whose default is none the temperature is kept
- while on gpt-6.1-sol or astra whose default is medium reasoning stays on and the temperature is still dropped as before
- and without drop_params the unsupported level is a 400 before temperature is even looked at
There was a problem hiding this comment.
That makes sense, and with this intended ordering the behavior is correct: when drop_params is enabled, the unsupported effort is removed first and temperature is evaluated against the effort the model will actually use (gpt-5.1 keeps it, while gpt-6.1-sol/Astra drop it). When drop_params is disabled, the local 400 exits before temperature handling.
I’m withdrawing the breaking-change warning—no PR-title or release-note change is needed.
|
Main CircleCI job integration-providers fails test_reasoning_effort_none_is_rejected_by_litellm_before_reaching_azure and six test_cursor_*_wire cells since this merged, see pipeline 91403 https://app.circleci.com/pipelines/github/BerriAI/litellm/91403 |
The Gemini TTS billing and text completion guardrail tests read spend rows from the owned proxy's own database, which #47213 made private. The cursor wire test derives its effort levels from the gpt-5 cost map row that #43935 now enforces, and the Azure effort check accepts the unquoted level. The pin TTL test asserts the one hour pin #46411 writes for a tool-only mark, the video callback test decodes ids with the product decoder after #44614, and the two Gemini 3.8 flash stream cost cases bill audio at the text rate their rows imply
…I#43738) Backport of BerriAI#43738 to stable/1.103.x. Cherry-picked from a3552c4 (main). Prerequisite for BerriAI#43935: adds the gpt-6.1-sol entry that fix corrects. Cost-map conflict resolved by appending the new entry. The cost-map schema and its schema test also allow the *_above_272k_tokens_batches keys this row carries, which main already allows.
…3744) Backport of BerriAI#43744 to stable/1.103.x. Cherry-picked from bda2763 (main). Prerequisite for BerriAI#43935: adds the azure and openrouter gpt-6.1-sol rows that fix corrects. Cost-map conflict resolved by appending the new entries.
…AI#43935) Backport of BerriAI#43935 to stable/1.103.x. Cherry-picked from d7620c7 (main). Ported from the stable/1.104.x adaptation (54f9259): the bridge check lives in litellm/main.py and the effort helpers keep the line's private names. Cost-map edits replay only this PR's reasoning-effort flags (gpt-6-astra and gpt-5.3-codex rows), plus supports_none_reasoning_effort=false on the azure gpt-6.1-sol rows from BerriAI#46377, which the fix's tests key on. Tests built on gpt-6-sol rows (BerriAI#42515), the Foundry tools-to-Responses bridge, or a full azure/eu/gpt-6-astra row are dropped since none of those are on this line.
…AI#43935) Backport of BerriAI#43935 to stable/1.106.x. Cherry-picked from d7620c7 (main). Adapted to the line: responses_api_bridge_check lives in litellm/main.py here (moved to litellm/responses/bridge_check.py on main by BerriAI#45772), so the reasoning_active change and _chat_gate_refuses_reasoning_effort_none are ported there, importing AzureAIGPT5Config locally. Cost-map flags are replayed per model key. Test hunks that conflicted are applied onto the line's files.
…1-sol rows Prerequisite for BerriAI#43935 on stable/1.106.x, whose test pins these rows. Ports only the supports_none_reasoning_effort flips for the six azure and azure_ai gpt-6.1-sol rows from 9cf09c1 (BerriAI#46377) on main. The rest of BerriAI#46377 (Azure Responses api-version routing, Grok reasoning tokens, register_model provider refresh) is not included.
* fix(openai): drop unsupported reasoning effort for gpt-6.1-sol gpt-6.1-sol accepts low, medium, high, xhigh, and max. none and minimal were still forwarded, because chat completions ignored an explicit supports_none_reasoning_effort=false and the Responses mapper never applied that contract. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(openai): mark the stripped reasoning object as outgoing JSON Co-authored-by: Cursor <cursoragent@cursor.com> * Fix Azure responses reading the OpenAI effort map gpt-6-astra on Azure accepts reasoning.effort none. The responses gate was checking the OpenAI entry, which rejects it. Signed-off-by: Paul El Khoury <82139421+pOpO1-9@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix(openai): gate every reasoning_effort level from the cost map on chat and Responses One gate reads the model's cost-map row for whatever effort level a request asks for, on Chat Completions and the Responses API, for OpenAI and Azure. xhigh stays opt-in on chat (Azure also keeps none opt-in); every other level is refused only when its supports_<level>_reasoning_effort flag is false. A refused level is dropped under drop_params or answered with a local 400, and Responses keeps the rest of the reasoning object when it drops effort. The guards that follow judge temperature by the level the provider will see. Tests move into the mapped test files and derive the expected outcome for each level from the map row, so a new GPT-6 model needs only its row. * test(openai): pin gpt-6.1-sol's refused effort levels and prove the row flags alone drive the gate * fix(cost-map): azure gpt-6-astra refuses none and honors max on Responses, as live calls show * test(reasoning_effort): pin the astra max and none flips through the adapter and Foundry paths * fix(reasoning_effort): keep max out of the route gates and correct the gpt-5.3-codex rows The same model honors max on Responses and refuses it on Chat Completions, so one row flag cannot gate it on either route. The gates now skip max, the Azure gpt-6-astra rows keep max off so the /v1/messages adapter degrades to xhigh and /model_group/info stops short of it as on main, and chat still forwards max for the Responses bridge. The gpt-5.3-codex rows said none and xhigh off and minimal on; the live model answers the other way round (2026-10-01), and an opt-out gate would have dropped the levels Codex CLI sends. * fix(reasoning_effort): bridge function tools to Responses when the chat gate drops none * docs(reasoning_effort): correct the max advertisement note * fix(azure_ai): read the Foundry row on the Responses effort gate and turn none off for Azure gpt-6.1-sol * fix(azure): gate a prefixed Foundry deployment's Responses effort off its row litellm.responses(model="azure_ai/<deployment>", api_base=<Foundry host>) is re-routed to the azure provider with the azure_ai/ prefix intact, so the Azure Responses config saw a prefixed name, skipped it as another provider's pass-through, and forwarded none and minimal to Azure even under drop_params. The Azure gpt-5 resolver also read no row at all for a prefixed name. The Azure Responses gate now detects the family the way the Azure chat gate does, and an azure_ai/ name on the Azure OpenAI configs reads its azure_ai/ row when the map has one, else the azure/ twin, the rule the Foundry chat config already applies to the same deployment. * fix(cost-map): turn none off on azure/eu/gpt-6-astra like its sibling rows * docs(reasoning_effort): say how each gate reads none and shorten the module docstring * fix(azure_ai): call the public effort-level check from the Foundry Responses gate * test(reasoning_effort): fold the Foundry Responses tests into the mapped file and type the row helpers --------- Signed-off-by: Paul El Khoury <82139421+pOpO1-9@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: ryan-crabbe-berri <ryan@berri.ai> (cherry picked from commit d7620c7)
…AI#43935) Backport of BerriAI#43935 to stable/1.105.x. Cherry-picked from d7620c7 (main). Adapted to the line: the Responses bridge change lands in litellm/main.py (the bridge check moved to litellm/responses/bridge_check.py later on main), the line's _get_effort_level and _supports_reasoning_effort_level names are kept, and the test files keep the line's helpers with only this PR's hunks applied.
…refuses on stable/1.105.x Prerequisite for BerriAI#43935 on stable/1.105.x. Ports the supports_none_reasoning_effort=false flags from BerriAI#46377 onto the azure and azure_ai gpt-6.1-sol rows this line has, and the minimal, max and xhigh flags azure/eu/gpt-6-astra carries on main (BerriAI#45018), so the chat and Responses gates BerriAI#43935 adds drop the levels Azure answers with 400.
…erriAI#47600 to rc/1.108.0 rc/1.108.0 carries the BerriAI#43935 backport, which enforces gpt-5's supports_none_reasoning_effort and supports_xhigh_reasoning_effort flags, so the test now reads the levels it parametrizes from the cost map like main does. Only this file of BerriAI#47600 is taken. Its other files follow changes rc does not have (cherry picked from commit e78f7b4, tests/integration/providers/test_cursor_responses_wire.py only)
TLDR
Problem this solves:
gpt-6.1-soltakeslow,medium,high,xhigh, andmaxonlyreasoning_effort: "none"to OpenAI even withdrop_paramsreasoning.effortnoneandminimalthe same waygpt-6-astramap rows still saidnoneis supported; the deployment refuses it on both routes (live calls on 2026-10-01)gpt-5.3-codexandchatgpt/gpt-5.3-codexrows saidnoneandxhighoff andminimalon, the reverse of what the model takes (2026-10-01), so a row-driven gate would have dropped two levels the model honorsnonethe model refuses, once thatnoneis dropped, runs with reasoning on, and Chat Completions rejects function tools in that stateHow it solves it:
xhighstays opt-in on chat (Azure also keepsnoneopt-in); every other level is refused only on an explicitfalsemaxis never judged by either gate: on this family Chat Completions refuses it and Responses honors it, and the map has one flag per level for both routes, so it is forwarded as is, as on maindrop_params, else a local 400 names iteffortand keeps asummary; an emptiedreasoningobject goes awaynonethe chat gate refuses as reasoning on, so function tools with such anonetake the Responses route the way an unset effort doessupports_<level>_reasoning_effortflags and no code changeazure/gpt-6-astra,azure/gpt-6-astra-2026-09-03,azure/us/gpt-6-astra,azure/eu/gpt-6-astra, andazure_ai/gpt-6-astrarows flipnoneoff, matching the live deployment and OpenAI's owngpt-6-astrarow; thegpt-5.3-codexrows getnoneandxhighon andminimaloffUser Flow
Before: a developer whose app asks
gpt-6.1-solforreasoning_effort: "none"gets OpenAI's 400 back even though the proxy hasdrop_params: true"model": "gpt-6.1-sol"and"reasoning_effort": "none"Unsupported value: 'reasoning_effort' does not support 'none' with this model"reasoning": {"effort": "none"}(or"minimal")Unsupported value: 'none' is not supported with the 'gpt-6.1-sol' modelAfter: the same requests go through, because the proxy drops the effort the model cannot take before calling OpenAI
"model": "gpt-6.1-sol"and"reasoning_effort": "none""reasoning": {"effort": "none"}(or"minimal")reasoning.summarythey also sent is still honoreddrop_paramsoff, both routes answer HTTP 400 from the proxy itself naming the unsupported value, with no OpenAI call madeRelevant issues
Fixes #43910
Linear ticket
Resolves LIT-9082
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Last updated: a858075, a tests-only commit (the Foundry Responses tests folded into the mapped test file, typed row helpers,
Finalannotations). Client A, Client B and /live-pr-risk ran on e5d9c63, the last commit with a product diff before main was merged in. The Foundry section ran on f466ebc, the last commit with a product diff, which adds theazure/eu/gpt-6-astraflip and a lint-only rename on top of that mergeLive before/after against real OpenAI and Azure OpenAI deployments, real spend. Before is the merge base
b41715b0c25f, after ise5d9c63d2b. Each leg boots its own worktree's code withLITELLM_LOCAL_MODEL_COST_MAP=True(so each leg reads its own cost map), no database, two proxies with--num_workers 2each: one withdrop_params: true(before 45854, after 57936) and one withdrop_params: false(before 49880, after 26207). Cost-map rows each leg ran on, printed by the SDK script: beforeazure/gpt-6-astranone on and max off, after none off and max off;gpt-6.1-solnone off and minimal off on both legsClient A: the reporter's client, the litellm Python SDK
completiongpt-6.1-sol effort none, drop_paramsresponsesgpt-6.1-sol effort none, drop_paramscompletionazure/gpt-6-astra max, drop_paramsresponsesazure/gpt-6-astra max, drop_paramscompletiongpt-6.1-sol none, drop_params offresponsesgpt-6.1-sol none, drop_params offcompletionazure/gpt-6-astra max, drop_params offCase 7 and 12 are the route-specific
maxfrom the first caveat, unchanged from main. Case 10 and 11 after:litellm.UnsupportedParamsError: reasoning_effort=none is not supported for gpt-6.1-sol. To drop unsupported params set litellm.drop_params = True, no provider callClient B: the proxy routes from the User Flow, curl
D1 before (port 45854) and after (port 57936), same command:
D4 before and after:
D6 after, the summary survives the dropped effort (before: the same 400 as D4):
D9 before and after (Azure deployment,
nonenow dropped by the flipped row):D11, function tools with the refused
none(the before output is the same request through the /live-pr-risk base proxy at the same merge-base commit, two workers,drop_params: true):N1 before (port 49880) and after (port 26207),
drop_params: false:/live-pr-risk, the dependents of the changed gate on a two-sided rig
Same merge base and tip, two proxies with two workers each, every provider call through a forwarding recorder in front of the real OpenAI and Azure endpoints so the request each side actually sent is diffed too. Status differences appear only where this PR intends them; header key sets per upstream path are identical on both sides; body differences are the removed effort, the bridged tools, and the temperature or top_p the post-drop default effort now decides; one provider call per cell on both sides, and a spend row for every call. Because main moved 91 commits since the branch point, all 72 cells ran once more on this branch merged into main at
123237c8a8(the two cost maps stay identical to each other, and the effort flags on every row this PR touches are unchanged by the merge): every status matches the head run, the recorded provider requests match it in path, body keys, and effort value, and every cell has its spend row. Not driven live here: theopenrouterandperplexityrows for these models (no effort flags, so the gate has no opinion and they forward as on main), the flippedchatgpt/gpt-5.3-codexrow (no ChatGPT backend on hand), the ROI calculator's choice ofnonefor its estimator model, and the Admin UI's rendering of the advertised efforts. Theazure_aiprovider route has its own live run against a Foundry deployment in the next section. Main was merged in once more atcabea0b2bf(1444 commits, among them #45772, which moved the bridge check tolitellm/responses/bridge_check.py, so the chat gate hook moved with it). These cells were not rerun after that merge, the unit suites for the touched modules pass on it, and the Foundry run ran on the tip after itmaxon gpt-6.1-sol and azure astra, with and without toolsObservations from both runs, each at most a line:
maxstill gets Azure's 400 under drop_params, as on main (left alone)maxthough its row flag is off (shown, not caused)resp_id and Responses usage fields, main's bridge shape (routed onto by this PR)param: nullwhere provider 400s name the param (caused)summary: autocomes back asdetailed, OpenAI's normalization (shown)gpt-6-astra-2026-09-03, Azure Responsesgpt-6-astra(shown)Foundry, the
azure_airoute against a live Azure AI Foundry deploymentRun on 2026-10-17 against a
gpt-6-astradeployment (model version 2026-09-03) on an Azure AI Foundry resource, reached asazure_ai/gpt-6-astrawith the resource'sservices.ai.azure.combase and an api-key. Before is the merge basea6245c1bbbeaon port 49436, after is the tipf466ebcec2on port 49435, each proxy started from agit archiveof its commit withLITELLM_LOCAL_MODEL_COST_MAP=True,--detailed_debug, and the config below. On this route the proxy sends Responses requests to/openai/v1/responsesand chat requests to/models/chat/completionson the resource, and the debug log's "POST Request Sent from LiteLLM" lines show which upstream each case reached and the body it carried/v1/responseseffort: none, drop'none' is not supported with the 'gpt-6-astra-2026-09-03' modeleffort: medium, 0 reasoning tokens/v1/responseseffort: minimal, dropminimaleffort: medium/v1/responseseffort: none+summary: auto, dropreasoning: {summary: auto}and no effort, reply has areasoningoutput item andsummary: detailed, 10 reasoning tokens/v1/responseseffort: low, droplowlowon the wire and in the reply/v1/responseseffort: max, dropmax, 49 reasoning tokensmaxon the wire and in the reply, 51 reasoning tokens/v1/chat/completionsreasoning_effort: none, drop'reasoning_effort' does not support 'none' with this modelHi, wire is a chat request to/models/chat/completionswith noreasoning_effort/v1/chat/completionsreasoning_effort: none+ function tools, dropfinish_reason: tool_callsnamingget_weather, bridged to/openai/v1/responseswith the tools and no effort,resp_id/v1/responseseffort: none, nodropreasoning.effort=none is not supported for gpt-6-astra/v1/chat/completionsreasoning_effort: none, nodropreasoning_effort=none is not supported for gpt-6-astraThe commands, each run against both proxies with only the port changed. Outputs are the proxy's reply trimmed to the fields that matter (id, status, the
reasoningblock, output item types, reasoning tokens, or the chat choice), the error bodies are verbatimF1, the issue's shape on the Responses route:
F3, the refused effort next to a reasoning summary:
F6 and F7, the chat route without and with function tools:
N1 and N2, the same two requests on the
drop_params: falsealias:What the after proxy sent to the resource, from its debug log (the api-key header is printed as REDACTED by the proxy). N1 and N2 have no "POST Request Sent" line at all, the 400 is answered before any provider call:
Observations, each at most a line:
maxamong this deployment's supported values and honors it, while its chat endpoint listslowthroughxhighonly, the same split the Azure OpenAI rows showed, so leavingmaxto the provider holds on this route too (shown)noneorminimalruns atmediumand can bill reasoning tokens, F3 billed 10 (caused)resp_id, as on the Azure OpenAI route (routed onto by this PR)Type
🐛 Bug Fix
Caveats (if any)
Low
maxis a Responses-only level on this family's Chat Completions API (gpt-5.6,gpt-5.6-sol,gpt-6-sol,gpt-6-astra,gpt-6.1-sol, and the Azuregpt-6-astradeployment all answered a chatmaxwith a 400 listinglowthroughxhighon 2026-10-01, while Responses honors it) and the cost map has one flag per level for both routes, so neither gate judgesmaxand both routes forward it as is: a chat request with tools or a reasoning summary is bridged to Responses and needs the level intact (the Cursor thinking-max shape), and a plain Chat Completionsmaxstill gets the provider's 400, even underdrop_params, as on main. Alternatives considered: refusingmaxin the chat gate (breaks the bridge and pins an API fact in code), or flipping the Azuregpt-6-astrarows'maxflag on (would change what/model_group/infoand the/v1/messagesadapter advertise without a gate reading it)falsenow drops a level the model takes (silently underdrop_params), where main forwarded it. A sweep of every row carrying explicit effort flags on 2026-10-01 found one such case,gpt-5.3-codexand itschatgpt/twin, fixed here; rows with no flags are untoucheddrop_paramsa refused level is dropped and the call runs at the model's default effort (mediumhere), so a caller asking fornoneis billed reasoning tokens where they used to get the provider's 400; withoutdrop_paramsthe proxy answers 400 itself and names the levelgpt-6-astradeployments:noneused to reach Azure and fail with its 400 on chat; with the row flipped it is dropped underdrop_paramsor refused locally, likegpt-6.1-sol.azure/eu/gpt-6-astracarried the same stalenoneas its siblings and is flipped with them, so a deployment whosebase_modelnames it drops or refusesnonethe same wayreasoning_effort: "none"on a gpt-5.4 or newer deployment whose row refusesnone(the Azuregpt-6-astrarows) is now bridged to Responses, where main forwarded thenoneand got Azure's 400; the reply is the bridged chat shape main already produces for an unset effortgpt-5.3-codexResponses requests withminimalare now dropped underdrop_paramsor refused locally, where main forwardedminimaland got OpenAI's 400supports_<level>_reasoning_effortflag in the map is still forwarded as is, as beforenonenow uses the shared error text; the old text named issue [Bug]: reasoning_effort: none not working on azure for gpt-5.1 #16704 and listedlow,medium,hightemperatureandtop_pby the model's default effort, as OpenAI will; agpt-5.1request withxhighand atemperaturenow forwards the temperature where it used to drop it (seen on the wire in the live A/B), and agpt-5.3-codexResponses request withnoneand atemperaturenow forwards both where main dropped the temperaturenonenow comes back in main's bridged chat shape: aresp_id, Responses usage fields, noprovider_specific_fields,prediction, oraudiotoken details. A client keying on thechatcmpl-id prefix sees the changedrop_paramscarriesparam: null, where the provider's 400 namesreasoning_effortorreasoning.effortosv-scanflagsoauthlib 3.3.1inuv.lock, which main pins at the same version and this PR does not touch, andbudget-ratchetreports theLIT002budget rule dropped, which main itself removed in chore(lint): remove the LIT002 mutable-construction rule #43971 after this branch's base; both clear on their own once main's state is the comparison/model_group/info,/public/model_hub, and the/v1/messagesadapter's advertised efforts move with the flipped rows: the Azuregpt-6-astragroups losenone, thegpt-5.3-codexgroups gainnoneandxhighand loseminimal, and agpt-5.3-codexchat request withxhigh, which the stale row refused locally on main, now goes through. The ROI calculator on main reads the samesupports_none_reasoning_effortflag to decide whether its estimator model getsreasoning_effort: none, so it stops sendingnoneto the Azuregpt-6-astrarows and starts sending it togpt-5.3-codex(read from the code on the merged tree, not driven live)Final Attestation
Note
Medium Risk
Changes request shaping and chat-vs-Responses routing for reasoning models across OpenAI, Azure, and Foundry; mis-flagged map rows or bridge behavior could alter billing (default effort after drop) and tool-call response shapes.
Overview
Unifies how GPT-5/6 family requests validate
reasoning_effort/reasoning.effortagainst the model cost-map, so unsupported levels are dropped underdrop_paramsor rejected locally instead of being forwarded to OpenAI/Azure.Chat Completions now routes every requested level through
refuses_reasoning_effort_level(opt-in forxhigh; Azure also opt-in fornone; opt-out for other levels;maxnever gated on chat). The Responses path adds the same opt-out check viarow_disables_reasoning_effort_level, stripping onlyeffortwhile keepingsummarywhen needed.Azure-specific bespoke
nonehandling is removed fromAzureOpenAIGPT5Config.map_openai_paramsin favor of the shared gate; map lookup now understandsazure_ai/names when provider remapping leaves that prefix.Responses API bridge logic treats a
nonethe chat gate would refuse as reasoning still active, so function-tool requests that used to fail on chat can route to Responses like unset-effort cases.Cost-map rows are corrected (e.g. Azure
gpt-6-astrasupports_none_reasoning_effort: false,gpt-5.3-codexnone/xhigh/minimal flags). Foundryazure_aiResponses config wires effort helpers toAzureAIGPT5Config.Reviewed by Cursor Bugbot for commit f466ebc. Bugbot is set up for automated code reviews on this repo. Configure here.