Skip to content

fix(openai): drop unsupported reasoning effort for gpt-6.1-sol - #43935

Merged
ryan-crabbe-berri merged 17 commits into
BerriAI:mainfrom
pOpO1-9:fix/gpt-6.1-sol-reasoning-effort
Oct 19, 2026
Merged

ryan-crabbe-berri merged 17 commits into
BerriAI:mainfrom
pOpO1-9:fix/gpt-6.1-sol-reasoning-effort

Conversation

@pOpO1-9

@pOpO1-9 pOpO1-9 commented Sep 30, 2026 •

Copy link
Copy Markdown

TLDR

Problem this solves:

  • gpt-6.1-sol takes low, medium, high, xhigh, and max only
  • Chat Completions forwarded reasoning_effort: "none" to OpenAI even with drop_params
  • The Responses API forwarded reasoning.effort none and minimal the same way
  • Both came back as OpenAI 400s instead of a dropped param or a local 400
  • Each new GPT-6 model needed its own code fix for the levels it refuses
  • The five Azure gpt-6-astra map rows still said none is supported; the deployment refuses it on both routes (live calls on 2026-10-01)
  • The gpt-5.3-codex and chatgpt/gpt-5.3-codex rows said none and xhigh off and minimal on, the reverse of what the model takes (2026-10-01), so a row-driven gate would have dropped two levels the model honors
  • A chat request with function tools and a none the model refuses, once that none is dropped, runs with reasoning on, and Chat Completions rejects function tools in that state

How it solves it:

  • One gate reads the model's cost-map row for any requested level, on chat and Responses, OpenAI and Azure
  • xhigh stays opt-in on chat (Azure also keeps none opt-in); every other level is refused only on an explicit false
  • max is 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 main
  • A refused level is dropped under drop_params, else a local 400 names it
  • Responses drops only effort and keeps a summary; an emptied reasoning object goes away
  • The chat-to-Responses bridge treats a none the chat gate refuses as reasoning on, so function tools with such a none take the Responses route the way an unset effort does
  • A new model needs its map row's supports_<level>_reasoning_effort flags and no code change
  • The azure/gpt-6-astra, azure/gpt-6-astra-2026-09-03, azure/us/gpt-6-astra, azure/eu/gpt-6-astra, and azure_ai/gpt-6-astra rows flip none off, matching the live deployment and OpenAI's own gpt-6-astra row; the gpt-5.3-codex rows get none and xhigh on and minimal off

User Flow

Before: a developer whose app asks gpt-6.1-sol for reasoning_effort: "none" gets OpenAI's 400 back even though the proxy has drop_params: true

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "gpt-6.1-sol" and "reasoning_effort": "none"
  2. They get HTTP 400 with Unsupported value: 'reasoning_effort' does not support 'none' with this model
  3. They send POST https://litellm-domain/v1/responses with the same model and "reasoning": {"effort": "none"} (or "minimal")
  4. They get HTTP 400 with Unsupported value: 'none' is not supported with the 'gpt-6.1-sol' model

After: the same requests go through, because the proxy drops the effort the model cannot take before calling OpenAI

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "gpt-6.1-sol" and "reasoning_effort": "none"
  2. They get HTTP 200 with the model's reply, generated at the model's default effort
  3. They send POST https://litellm-domain/v1/responses with the same model and "reasoning": {"effort": "none"} (or "minimal")
  4. They get HTTP 200 with the reply; a reasoning.summary they also sent is still honored
  5. When the chat request also carries function tools, they get HTTP 200 with the tool call in the usual chat shape, served through OpenAI's Responses API on their behalf
  6. With drop_params off, both routes answer HTTP 400 from the proxy itself naming the unsupported value, with no OpenAI call made

Relevant issues

Fixes #43910

Linear ticket

Resolves LIT-9082

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. 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
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to 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, Final annotations). 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 the azure/eu/gpt-6-astra flip and a lint-only rename on top of that merge

Live before/after against real OpenAI and Azure OpenAI deployments, real spend. Before is the merge base b41715b0c25f, after is e5d9c63d2b. Each leg boots its own worktree's code with LITELLM_LOCAL_MODEL_COST_MAP=True (so each leg reads its own cost map), no database, two proxies with --num_workers 2 each: one with drop_params: true (before 45854, after 57936) and one with drop_params: false (before 49880, after 26207). Cost-map rows each leg ran on, printed by the SDK script: before azure/gpt-6-astra none on and max off, after none off and max off; gpt-6.1-sol none off and minimal off on both legs

Client A: the reporter's client, the litellm Python SDK

Case Call Before After
1 completion gpt-6.1-sol effort none, drop_params 400 OpenAI 200
2 same, minimal 200 200
3 same, low (control) 200 200
4 responses gpt-6.1-sol effort none, drop_params 400 OpenAI 200
5 same, minimal 400 OpenAI 200
6 same, none + summary auto 400 OpenAI 200, summary kept
7 completion azure/gpt-6-astra max, drop_params 400 Azure 400 Azure
8 same, none 400 Azure 200
9 responses azure/gpt-6-astra max, drop_params 200 200
10 completion gpt-6.1-sol none, drop_params off 400 OpenAI 400 local
11 responses gpt-6.1-sol none, drop_params off 400 OpenAI 400 local
12 completion azure/gpt-6-astra max, drop_params off 400 Azure 400 Azure

Case 7 and 12 are the route-specific max from 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 call

Client B: the proxy routes from the User Flow, curl

Case Proxy Request Before After
D1 drop chat gpt-6.1-sol, none 400 OpenAI 200
D2 drop chat gpt-6.1-sol, minimal 200 200
D3 drop chat gpt-6.1-sol, low (control) 200 200
D4 drop responses gpt-6.1-sol, none 400 OpenAI 200
D5 drop responses gpt-6.1-sol, minimal 400 OpenAI 200
D6 drop responses gpt-6.1-sol, none + summary auto 400 OpenAI 200, summary kept
D7 drop /v1/messages gpt-6.1-sol, thinking enabled (control) 200 200
D8 drop chat azure-gpt-6-astra, max 400 Azure 400 Azure
D9 drop chat azure-gpt-6-astra, none 400 Azure 200
D10 drop responses azure-gpt-6-astra, max 200 200
D11 drop chat gpt-6.1-sol, function tools + none 400 OpenAI 200 tool_calls
N1 nodrop chat gpt-6.1-sol, none 400 OpenAI 400 local
N2 nodrop responses gpt-6.1-sol, none 400 OpenAI 400 local
N3 nodrop chat azure-gpt-6-astra, max 400 Azure 400 Azure

D1 before (port 45854) and after (port 57936), same command:

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"Say hi in one word."}],"reasoning_effort":"none","max_completion_tokens":200}'
{"error":{"message":"litellm.BadRequestError: OpenAIException - Unsupported value: 'reasoning_effort' does not support 'none' with this model. Supported values are: 'low', 'medium', 'high', and 'xhigh'.\n\nLiteLLM: model group 'gpt-6.1-sol' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"reasoning_effort","code":"400"}}
HTTP 400
{"id":"chatcmpl-EUMBJWM19TmRG6XWHezFew49SWeeO","created":1790903813,"model":"gpt-6.1-sol","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hi!","role":"assistant","provider_specific_fields":{"refusal":null},"annotations":[]},"provider_specific_fields":{}}],"usage":{"completion_tokens":5,"prompt_tokens":12,"total_tokens":17,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"cache_creation_tokens":0}},"service_tier":"default"}
HTTP 200

D4 before and after:

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-sol","input":"Say hi in one word.","reasoning":{"effort":"none"},"max_output_tokens":200}'
{"error":{"message":"litellm.BadRequestError: OpenAIException - {\n  \"error\": {\n    \"message\": \"Unsupported value: 'none' is not supported with the 'gpt-6.1-sol' model. Supported values are: 'low', 'medium', 'high', 'xhigh', and 'max'.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"reasoning.effort\",\n    \"code\": \"unsupported_value\"\n  }\n}\n\nLiteLLM: model group 'gpt-6.1-sol' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400
{"id":"resp_cHX84LV_...","created_at":1790903817,"error":null,"incomplete_details":null,"instructions":null,"metadata":{},"model":"gpt-6.1-sol","object":"response","output":[{"id":"msg_0d7cbd8dea82b4c7006abf060b003087d0a44180aa3b16ff11","content":[{"annotations":[],"text":"Hi","type":"output_text"}],"role":"assistant","status":"completed","type":"message"}],... "reasoning":{"effort":"medium","summary":null}, ...}
HTTP 200

D6 after, the summary survives the dropped effort (before: the same 400 as D4):

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:57936/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-sol","input":"Say hi in one word.","reasoning":{"effort":"none","summary":"auto"},"max_output_tokens":200}'
{"id":"resp_muQlRYr9...","model":"gpt-6.1-sol","object":"response","output":[{... "text":"Hi!","type":"output_text" ...}],... "reasoning":{"effort":"medium","summary":"detailed"}, ...}
HTTP 200

D9 before and after (Azure deployment, none now dropped by the flipped row):

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"azure-gpt-6-astra","messages":[{"role":"user","content":"Say hi in one word."}],"reasoning_effort":"none","max_completion_tokens":200}'
{"error":{"message":"litellm.BadRequestError: AzureException BadRequestError - Unsupported value: 'reasoning_effort' does not support 'none' with this model. Supported values are: 'low', 'medium', 'high', and 'xhigh'.\n\nLiteLLM: model group 'azure-gpt-6-astra' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"reasoning_effort","code":"400"}}
HTTP 400
{"id":"chatcmpl-EUMBYZsOOBu5Ch7geBltm0OHtVst0","created":1790903828,"model":"azure-gpt-6-astra","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hi!","role":"assistant","provider_specific_fields":{"refusal":null},"annotations":[]},"provider_specific_fields":{"content_filter_results":{...}}}],"usage":{"completion_tokens":5,"prompt_tokens":12,"total_tokens":17,"completion_tokens_details":{...,"reasoning_tokens":0},...},"service_tier":"default"}
HTTP 200

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):

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"What is 6 times 7? Use the tool."}],"tools":[{"type":"function","function":{"name":"multiply","description":"Multiply two integers","parameters":{"type":"object","properties":{"a":{"type":"integer"},"b":{"type":"integer"}},"required":["a","b"]}}}],"reasoning_effort":"none","max_completion_tokens":300}'
{"error":{"message":"litellm.BadRequestError: OpenAIException - Unsupported value: 'reasoning_effort' does not support 'none' with this model. Supported values are: 'low', 'medium', 'high', and 'xhigh'.\n\nLiteLLM: model group 'gpt-6.1-sol' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"reasoning_effort","code":"400"}}
HTTP 400
{"id":"resp_02e0b7db52704ea3006abf0619fe9c87d0a50fa0a359110758","created":1790903833,"model":"gpt-6.1-sol","object":"chat.completion","choices":[{"finish_reason":"tool_calls","index":0,"message":{"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"{\"a\":6,\"b\":7}","name":"multiply"},"id":"call_FGaEeZXy6HvlXhKpcrX2qbzW","type":"function"}],"content":null}}],"usage":{"completion_tokens":21,"prompt_tokens":55,"total_tokens":76,"completion_tokens_details":{"reasoning_tokens":0},"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"cache_creation_tokens":0}},"billing":{"payer":"developer"},"frequency_penalty":0.0,"presence_penalty":0.0,"service_tier":"default","tool_usage":{...}}
HTTP 200

N1 before (port 49880) and after (port 26207), drop_params: false:

curl -sS -w "\nHTTP %{http_code}\n" http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"Say hi in one word."}],"reasoning_effort":"none","max_completion_tokens":200}'
{"error":{"message":"litellm.BadRequestError: OpenAIException - Unsupported value: 'reasoning_effort' does not support 'none' with this model. Supported values are: 'low', 'medium', 'high', and 'xhigh'.\n\nLiteLLM: model group 'gpt-6.1-sol' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"reasoning_effort","code":"400"}}
HTTP 400
{"error":{"message":"litellm.UnsupportedParamsError: reasoning_effort=none is not supported for gpt-6.1-sol. To drop unsupported params set `litellm.drop_params = True`\n\nLiteLLM: model group 'gpt-6.1-sol' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

/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: the openrouter and perplexity rows for these models (no effort flags, so the gate has no opinion and they forward as on main), the flipped chatgpt/gpt-5.3-codex row (no ChatGPT backend on hand), the ROI calculator's choice of none for its estimator model, and the Admin UI's rendering of the advertised efforts. The azure_ai provider route has its own live run against a Foundry deployment in the next section. Main was merged in once more at cabea0b2bf (1444 commits, among them #45772, which moved the bridge check to litellm/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 it

Cell Request Before After
chat gpt-6.1-sol none / minimal, drop the issue 400 / 200 200 / 200
responses gpt-6.1-sol none / minimal / none + summary, drop the issue 400 200, summary kept
chat gpt-6.1-sol or azure astra, function tools + none, drop new bridge arm 400 provider 200 tool_calls via Responses
chat gpt-6.1-sol-nodrop, function tools + none new bridge arm 400 OpenAI 400 local, no provider call
chat gpt-5.4, function tools + none, drop (row takes none) control 200 on chat 200 on chat
/v1/messages gpt-6.1-sol thinking disabled + tool adapter 200 via Responses 200 via Responses
/v1/messages azure astra thinking disabled, drop / nodrop adapter 400 Azure 200 / 400 local
chat azure astra none + temperature + top_p, drop post-drop params 400 Azure 200, both dropped (default effort medium)
responses azure astra none + summary (+ temperature), drop Responses gate 400 Azure 200, summary kept, temperature dropped
chat astra with model_info base_model azure/us/gpt-6-astra, none, nodrop base_model row 400 Azure 400 local naming azure/us/gpt-6-astra
chat astra with base_model azure/gpt-5.1 (row takes none), none control 400 Azure 400 Azure, none forwarded
responses gpt-5.3-codex minimal, drop / nodrop codex rows 400 OpenAI 200 / 400 local
responses gpt-5.3-codex none + temperature, drop codex rows 200, temperature dropped 200, temperature forwarded
chat gpt-5.3-codex-nodrop xhigh codex rows 400 local (stale row) 200, xhigh on the wire
/v1/messages gpt-5.3-codex adaptive, output_config effort xhigh / minimal adapter high on the wire / 400 OpenAI xhigh on the wire / low on the wire
chat gpt-5-mini none, drop / nodrop other flagged rows 400 OpenAI 200 / 400 local
chat gpt-5.1 xhigh + temperature, drop post-drop params 200, temperature dropped 200, temperature forwarded (gpt-5.1 defaults to none)
GET /health?model=azure astra with health_check_reasoning_effort none, drop / nodrop health check 503 200 / 503 local
complexity router tier litellm_params reasoning_effort none onto azure astra, drop auto router 400 Azure 200
litellm_proxy chained alias, fallbacks to gpt-6.1-sol, /model_group/info, /utils/supported_openai_params, /public/model_hub dependents as main same shape; astra loses none, codex gains none and xhigh and loses minimal in the advertised efforts
chat max on gpt-6.1-sol and azure astra, with and without tools route-specific max 400 plain / 200 bridged identical

Observations from both runs, each at most a line:

  • Azure chat max still gets Azure's 400 under drop_params, as on main (left alone)
  • Azure Responses honors max though its row flag is off (shown, not caused)
  • The bridged tools reply carries a resp_ id and Responses usage fields, main's bridge shape (routed onto by this PR)
  • Local 400 bodies carry param: null where provider 400s name the param (caused)
  • A dropped none or minimal runs at default medium and bills reasoning tokens (caused)
  • summary: auto comes back as detailed, OpenAI's normalization (shown)
  • The SDK printed a Provider List banner on a successful Azure Responses call, also on main (shown)
  • Azure chat answers model gpt-6-astra-2026-09-03, Azure Responses gpt-6-astra (shown)

Foundry, the azure_ai route against a live Azure AI Foundry deployment

Run on 2026-10-17 against a gpt-6-astra deployment (model version 2026-09-03) on an Azure AI Foundry resource, reached as azure_ai/gpt-6-astra with the resource's services.ai.azure.com base and an api-key. Before is the merge base a6245c1bbbea on port 49436, after is the tip f466ebcec2 on port 49435, each proxy started from a git archive of its commit with LITELLM_LOCAL_MODEL_COST_MAP=True, --detailed_debug, and the config below. On this route the proxy sends Responses requests to /openai/v1/responses and chat requests to /models/chat/completions on the resource, and the debug log's "POST Request Sent from LiteLLM" lines show which upstream each case reached and the body it carried

model_list:
  - model_name: foundry-astra
    litellm_params:
      model: azure_ai/gpt-6-astra
      api_base: https://<resource>.services.ai.azure.com
      api_key: os.environ/AZURE_AI_API_KEY
      drop_params: true
  - model_name: foundry-astra-nodrop
    litellm_params:
      model: azure_ai/gpt-6-astra
      api_base: https://<resource>.services.ai.azure.com
      api_key: os.environ/AZURE_AI_API_KEY
      drop_params: false
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
Case Request Before, merge base After, tip
F1 /v1/responses effort: none, drop 400 from Foundry, 'none' is not supported with the 'gpt-6-astra-2026-09-03' model 200, no effort on the wire, reply effort: medium, 0 reasoning tokens
F2 /v1/responses effort: minimal, drop 400 from Foundry, same text for minimal 200, no effort on the wire, reply effort: medium
F3 /v1/responses effort: none + summary: auto, drop 400 from Foundry 200, wire carries reasoning: {summary: auto} and no effort, reply has a reasoning output item and summary: detailed, 10 reasoning tokens
F4 /v1/responses effort: low, drop 200, low 200, low on the wire and in the reply
F5 /v1/responses effort: max, drop 200, max, 49 reasoning tokens 200, max on the wire and in the reply, 51 reasoning tokens
F6 /v1/chat/completions reasoning_effort: none, drop 400 from Foundry, 'reasoning_effort' does not support 'none' with this model 200 Hi, wire is a chat request to /models/chat/completions with no reasoning_effort
F7 /v1/chat/completions reasoning_effort: none + function tools, drop 400 from Foundry, same text 200 finish_reason: tool_calls naming get_weather, bridged to /openai/v1/responses with the tools and no effort, resp_ id
N1 /v1/responses effort: none, nodrop 400 from Foundry 400 local, no provider call, reasoning.effort=none is not supported for gpt-6-astra
N2 /v1/chat/completions reasoning_effort: none, nodrop 400 from Foundry 400 local, no provider call, reasoning_effort=none is not supported for gpt-6-astra

The 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 reasoning block, output item types, reasoning tokens, or the chat choice), the error bodies are verbatim

F1, the issue's shape on the Responses route:

curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra","input":"Say hi in one word.","reasoning":{"effort":"none"}}'
before (49436)
{"error": "litellm.BadRequestError: Azure_aiException - {\n  \"error\": {\n    \"message\": \"Unsupported value: 'none' is not supported with the 'gpt-6-astra-2026-09-03' model. Supported values are: 'low', 'medium', 'high', 'xhigh', and 'max'.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"reasoning.effort\",\n    \"code\": \"unsupported_value\"\n  }\n}\n\nLiteLLM: model group 'foundry-astra' failed with the error above. No fallback was attempted."}
HTTP 400

after (49435)
{"id": "resp_Q2nrRHALl", "status": "completed", "reasoning": {"context": "all_turns", "effort": "medium", "mode": "standard", "summary": null}, "output_types": ["message"], "summary_text": [], "reasoning_tokens": 0}
HTTP 200

F3, the refused effort next to a reasoning summary:

curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra","input":"What is 17 times 23? Think briefly.","reasoning":{"effort":"none","summary":"auto"}}'
before (49436)
{"error": "litellm.BadRequestError: Azure_aiException - {\n  \"error\": {\n    \"message\": \"Unsupported value: 'none' is not supported with the 'gpt-6-astra-2026-09-03' model. Supported values are: 'low', 'medium', 'high', 'xhigh', and 'max'.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"reasoning.effort\",\n    \"code\": \"unsupported_value\"\n  }\n}\n\nLiteLLM: model group 'foundry-astra' failed with the error above. No fallback was attempted."}
HTTP 400

after (49435)
{"id": "resp_-Cxz5kwok", "status": "completed", "reasoning": {"context": "all_turns", "effort": "medium", "mode": "standard", "summary": "detailed"}, "output_types": ["reasoning", "message"], "summary_text": [], "reasoning_tokens": 10}
HTTP 200

F6 and F7, the chat route without and with function tools:

curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra","messages":[{"role":"user","content":"Say hi in one word."}],"reasoning_effort":"none"}'
curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra","messages":[{"role":"user","content":"What is the weather in Paris?"}],"reasoning_effort":"none","tools":[{"type":"function","function":{"name":"get_weather","description":"Get the weather for a city","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]}'
before (49436), both
{"error": "litellm.BadRequestError: Azure_aiException - {\n  \"error\": {\n    \"message\": \"Unsupported value: 'reasoning_effort' does not support 'none' with this model. Supported values are: 'low', 'medium', 'high', and 'xhigh'.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"reasoning_effort\",\n    \"code\": \"unsupported_value\"\n  }\n}\n\nLiteLLM: model group 'foundry-astra' failed with the error above. No fallback was attempted."}
HTTP 400

after (49435), F6
{"id": "chatcmpl-EaBwR", "model": "foundry-astra", "finish_reason": "stop", "content": "Hi", "tool_calls": [], "reasoning_tokens": 0}
HTTP 200

after (49435), F7
{"id": "resp_0adb89767", "model": "foundry-astra", "finish_reason": "tool_calls", "content": "", "tool_calls": ["get_weather"], "reasoning_tokens": 0}
HTTP 200

N1 and N2, the same two requests on the drop_params: false alias:

curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra-nodrop","input":"Say hi in one word.","reasoning":{"effort":"none"}}'
curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model":"foundry-astra-nodrop","messages":[{"role":"user","content":"Say hi in one word."}],"reasoning_effort":"none"}'
before (49436): the same two Foundry 400s as F1 and F6

after (49435), N1
{"error": "litellm.UnsupportedParamsError: reasoning.effort=none is not supported for gpt-6-astra. To drop unsupported params set `litellm.drop_params = True`\n\nLiteLLM: model group 'foundry-astra-nodrop' failed with the error above. No fallback was attempted."}
HTTP 400

after (49435), N2
{"error": "litellm.UnsupportedParamsError: reasoning_effort=none is not supported for gpt-6-astra. To drop unsupported params set `litellm.drop_params = True`\n\nLiteLLM: model group 'foundry-astra-nodrop' failed with the error above. No fallback was attempted."}
HTTP 400

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:

F1  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': 'Say hi in one word.'}
F2  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': 'Say hi in one word.'}
F3  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': 'What is 17 times 23? Think briefly.', 'reasoning': {'summary': 'auto'}}
F4  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': 'Say hi in one word.', 'reasoning': {'effort': 'low'}}
F5  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': 'Say hi in one word.', 'reasoning': {'effort': 'max'}}
F6  POST https://<resource>.services.ai.azure.com/models/chat/completions
    {'model': 'gpt-6-astra', 'messages': [{'role': 'user', 'content': 'Say hi in one word.'}], 'stream': False}
F7  POST https://<resource>.services.ai.azure.com/openai/v1/responses
    {'model': 'gpt-6-astra', 'input': [{'type': 'message', 'role': 'user', 'content': [{'type': 'input_text', 'text': 'What is the weather in Paris?'}]}], 'stream': False, 'tools': [{'name': 'get_weather', 'parameters': {'type': 'object', 'properties': {'city': {'type': 'string'}}, 'required': ['city']}, 'strict': None, 'type': 'function', 'description': 'Get the weather for a city'}]}

Observations, each at most a line:

  • Foundry's Responses endpoint lists max among this deployment's supported values and honors it, while its chat endpoint lists low through xhigh only, the same split the Azure OpenAI rows showed, so leaving max to the provider holds on this route too (shown)
  • A dropped none or minimal runs at medium and can bill reasoning tokens, F3 billed 10 (caused)
  • The bridged F7 reply carries a resp_ id, as on the Azure OpenAI route (routed onto by this PR)

Type

🐛 Bug Fix

Caveats (if any)

Low

  • max is 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 Azure gpt-6-astra deployment all answered a chat max with a 400 listing low through xhigh on 2026-10-01, while Responses honors it) and the cost map has one flag per level for both routes, so neither gate judges max and 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 Completions max still gets the provider's 400, even under drop_params, as on main. Alternatives considered: refusing max in the chat gate (breaks the bridge and pins an API fact in code), or flipping the Azure gpt-6-astra rows' max flag on (would change what /model_group/info and the /v1/messages adapter advertise without a gate reading it)
  • The gate is only as good as the flags. A stale explicit false now drops a level the model takes (silently under drop_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-codex and its chatgpt/ twin, fixed here; rows with no flags are untouched
  • Under drop_params a refused level is dropped and the call runs at the model's default effort (medium here), so a caller asking for none is billed reasoning tokens where they used to get the provider's 400; without drop_params the proxy answers 400 itself and names the level
  • Azure gpt-6-astra deployments: none used to reach Azure and fail with its 400 on chat; with the row flipped it is dropped under drop_params or refused locally, like gpt-6.1-sol. azure/eu/gpt-6-astra carried the same stale none as its siblings and is flipped with them, so a deployment whose base_model names it drops or refuses none the same way
  • Azure OpenAI chat with function tools and reasoning_effort: "none" on a gpt-5.4 or newer deployment whose row refuses none (the Azure gpt-6-astra rows) is now bridged to Responses, where main forwarded the none and got Azure's 400; the reply is the bridged chat shape main already produces for an unset effort
  • gpt-5.3-codex Responses requests with minimal are now dropped under drop_params or refused locally, where main forwarded minimal and got OpenAI's 400
  • A model with no supports_<level>_reasoning_effort flag in the map is still forwarded as is, as before
  • Azure chat's refusal of none now uses the shared error text; the old text named issue [Bug]: reasoning_effort: none not working on azure for gpt-5.1 #16704 and listed low, medium, high
  • After a level is dropped, chat judges temperature and top_p by the model's default effort, as OpenAI will; a gpt-5.1 request with xhigh and a temperature now forwards the temperature where it used to drop it (seen on the wire in the live A/B), and a gpt-5.3-codex Responses request with none and a temperature now forwards both where main dropped the temperature
  • A chat request with function tools and a refused none now comes back in main's bridged chat shape: a resp_ id, Responses usage fields, no provider_specific_fields, prediction, or audio token details. A client keying on the chatcmpl- id prefix sees the change
  • The local 400 the gate answers without drop_params carries param: null, where the provider's 400 names reasoning_effort or reasoning.effort
  • Two non-required checks are red for reasons outside this diff: osv-scan flags oauthlib 3.3.1 in uv.lock, which main pins at the same version and this PR does not touch, and budget-ratchet reports the LIT002 budget 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/messages adapter's advertised efforts move with the flipped rows: the Azure gpt-6-astra groups lose none, the gpt-5.3-codex groups gain none and xhigh and lose minimal, and a gpt-5.3-codex chat request with xhigh, which the stale row refused locally on main, now goes through. The ROI calculator on main reads the same supports_none_reasoning_effort flag to decide whether its estimator model gets reasoning_effort: none, so it stops sending none to the Azure gpt-6-astra rows and starts sending it to gpt-5.3-codex (read from the code on the merged tree, not driven live)

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
  • e5d9c63 passes /live-pr-risk

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.effort against the model cost-map, so unsupported levels are dropped under drop_params or rejected locally instead of being forwarded to OpenAI/Azure.

Chat Completions now routes every requested level through refuses_reasoning_effort_level (opt-in for xhigh; Azure also opt-in for none; opt-out for other levels; max never gated on chat). The Responses path adds the same opt-out check via row_disables_reasoning_effort_level, stripping only effort while keeping summary when needed.

Azure-specific bespoke none handling is removed from AzureOpenAIGPT5Config.map_openai_params in favor of the shared gate; map lookup now understands azure_ai/ names when provider remapping leaves that prefix.

Responses API bridge logic treats a none the 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-astra supports_none_reasoning_effort: false, gpt-5.3-codex none/xhigh/minimal flags). Foundry azure_ai Responses config wires effort helpers to AzureAIGPT5Config.

Reviewed by Cursor Bugbot for commit f466ebc. Bugbot is set up for automated code reviews on this repo. Configure here.

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>
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Adjusts reasoning effort support flags for specific models.

Add the required breaking-change title and upgrade note before merging

Findings

  1. P1 Breaking change lacks warning ▶

Summary

The 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

mateo-berri accepted plain chat forwarding max because bridged requests need it intact for Responses. ryan-crabbe-berri dismissed the dictionary-mutation concern because the existing function already changes params in place and rewriting it would be disproportionate

  • Unsupported reasoning levels are dropped or rejected before a provider call.
  • Chat tool calls with a refused none now use Responses.
  • Model rows now match the reasoning levels their routes accept.

Reviews (10) · Last reviewed commit: "fix(azure_ai): call the public effort-le..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 32 untouched benchmarks


Comparing pOpO1-9:fix/gpt-6.1-sol-reasoning-effort (a858075) with main (714d84a)

Open in CodSpeed

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@krrish-berri-2

Copy link
Copy Markdown
Contributor

@pOpO1-9 — some CI checks are failing that appear related to your changes: lint reports new basedpyright errors over the per-rule budget, and All Other Providers fails test_azure_responses_gpt6_astra_reasoning_effort_none_unlocks_temperature with an UnsupportedParamsError on reasoning_effort. Could you take a look and fix the failing tests before this gets reviewed? Also, could you add a screenshot or short video showing that this change works as expected (e.g. a gpt-6.1-sol request with an unsupported effort value succeeding after the change)? It really helps reviewers verify the fix quickly. Thanks!

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>
@pOpO1-9

pOpO1-9 commented Oct 1, 2026

Copy link
Copy Markdown
Author

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.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread model_prices_and_context_window.json Resolved
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

…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.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/main.py Resolved
Comment thread litellm/main.py Fixed
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Comment on lines +346 to +349
# 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")
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Breaking change lacks warning

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!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ryan-crabbe-berri ryan-crabbe-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; thanks!

@ryan-crabbe-berri
ryan-crabbe-berri enabled auto-merge (squash) October 19, 2026 18:39
@ryan-crabbe-berri
ryan-crabbe-berri merged commit d7620c7 into BerriAI:main Oct 19, 2026
92 checks passed
@mateo-berri

Copy link
Copy Markdown
Contributor

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

yuneng-berri added a commit that referenced this pull request Oct 20, 2026
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
pamanseau pushed a commit to KubeTEE-AI/litellm that referenced this pull request Oct 25, 2026
…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.
pamanseau pushed a commit to KubeTEE-AI/litellm that referenced this pull request Oct 25, 2026
…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.
pamanseau pushed a commit to KubeTEE-AI/litellm that referenced this pull request Oct 25, 2026
…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.
Cartofante pushed a commit to CartoDB/litellm that referenced this pull request Oct 26, 2026
…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.
Cartofante pushed a commit to CartoDB/litellm that referenced this pull request Oct 26, 2026
…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.
yuneng-berri pushed a commit that referenced this pull request Oct 28, 2026
* 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)
haowang1013 pushed a commit to directivegames/litellm that referenced this pull request Nov 3, 2026
…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.
haowang1013 pushed a commit to directivegames/litellm that referenced this pull request Nov 3, 2026
…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.
DeoLeung pushed a commit to aiyou178/litellm that referenced this pull request Nov 5, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GPT-6.1 Sol forwards unsupported none/minimal reasoning effort on Chat Completions and Responses

5 participants