Repository navigation
fix(anthropic): map /v1/messages fields onto OpenAI Responses equivalents or reject them - #54173
Conversation
…ents or reject them The Responses bridge for /v1/messages dropped several Anthropic fields and still answered 200. disable_parallel_tool_use now sets parallel_tool_calls false, speed fast asks for the priority service tier, mcp_servers become Responses mcp tools with their toolset allowlist, web_search keeps its domain filters, user_location, and max_uses, a json_schema output format goes up strict, and a 1h cache_control mark asks OpenAI for its 12h breakpoint TTL A field with no Responses equivalent (container, allowed_callers, an unknown speed, a toolset denylist, defer_loading, max_uses next to another built-in tool) answers 400 UnsupportedParamsError naming every such field, and drop_params drops them instead strict_json_schema moves to base_utils so the Codex harness, the chat-completions bridge, and the Responses bridge share one walker, which now leaves property names and enum, const, and examples values alone
…ompletions rejects a breakpoint ttl
…ai_field_mapping # Conflicts: # litellm/litellm_core_utils/prompt_templates/common_utils.py # litellm/llms/anthropic/messages/responses_adapters/handler.py # litellm/llms/base_llm/base_utils.py # litellm/llms/openai/responses/transformation.py # tests/unit/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_common_utils.py
… on the Responses wire
…ai_field_mapping Keep mcp_servers mapped to Responses mcp tools over the bridge 400, keep the strict schema walk over the raw schema, and send the 12h breakpoint ttl to OpenAI only
…ai_field_mapping # Conflicts: # litellm/llms/anthropic/messages/adapters/transformation.py # litellm/llms/anthropic/messages/responses_adapters/handler.py # litellm/llms/anthropic/messages/responses_adapters/transformation.py # tests/unit/llms/anthropic/messages/responses_adapters/test_responses_adapters_transformation.py # tests/unit/llms/openai/responses/count_tokens/test_token_counter.py
…r 400 for a container id The bridge goes back to the strict-schema helper from BerriAI#51337, so a root $ref keeps its $defs and a map keeps its value schema on every provider. A container id string and a malformed mcp_servers entry now answer 400, or are dropped under drop_params, instead of a 500
…ai_field_mapping # Conflicts: # litellm/llms/anthropic/messages/responses_adapters/handler.py # litellm/llms/anthropic/messages/responses_adapters/transformation.py # tests/unit/llms/anthropic/messages/responses_adapters/test_responses_adapters_transformation.py
…ai_field_mapping # Conflicts: # litellm/llms/anthropic/messages/responses_adapters/handler.py
[High impact] No new blocking code issue was established.
|
…e OpenAI bridge and redact the MCP authorization top_k and inference_geo have no Responses equivalent, so they now answer 400 like container unless drop_params or additional_drop_params drops them, instead of a silent 200. An mcp_toolset that names no mcp_servers entry answers 400 the same way. The error says to set drop_params: true in the model's litellm_params or under litellm_settings. A forwarded service_tier of auto no longer beats speed fast, since auto asks for nothing specific. A top-level cache_control marks the last block of the conversation the way Anthropic caches it, and an mcp_call output comes back as mcp_tool_use and mcp_tool_result blocks that replay on the next turn. The server token goes out as the Responses mcp tool's authorization field, so both redactors now scrub a value under a quoted authorization key in JSON or a Python repr. A value litellm already masked, like the Authorization header in the JSON debug log, keeps its hint, and an Authorization header name is left alone.
…ai_field_mapping main typed the native handler's container as dict[str, object], and this branch also takes a container id string, so the merge keeps str | dict[str, object]. main typed thinking and tool_choice the way this branch did, which left the speed and mcp_servers keywords two unknown arguments over the type gate, so is_async is now read as a bool.
…t drops cache_control
…ai_field_mapping # Conflicts: # litellm/llms/anthropic/messages/responses_adapters/handler.py
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The standard logging payload copied tools and mcp_servers into model_parameters as sent, so an MCP server's authorization or authorization_token reached every logging callback in plain text.
Mark AnthropicMessagesRequestOptionalParams.container ReadOnly and pass it when the Responses adapter builds its request instead of setting it afterwards
…arrow the authorization log pattern OpenAI strict structured outputs reject a map or a free-form object, so a Messages output schema that leaves an object open now goes to the Responses API with strict false instead of answering 400. Guardrails on /v1/messages now read mcp_tool_use input and mcp_tool_result text in requests and replies, and write a masked result back, the way they already handle tool_use and tool_result. That covers replayed history too. The quoted authorization log pattern now needs a word boundary and skips null, None and booleans, so keys like requires_authorization log as sent.
…p a top-level cache mark before a prefill
…th null or a boolean The exception for a literal null, None, true or false authorization value now needs the whole value to be that literal, so a token such as null-<rest> is redacted in Python and Rust
|
bugbot run |
…I strict mode would reject it
|
bugbot run |
…I refuses them under drop_params
|
bugbot run |
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 6134a53. Configure here.
Handwritten 1-3 sentence description
Anthropic apps calling an OpenAI model through /v1/messages silently lost settings like turning off parallel tool calls, fast mode, web search filters and 1h caching, and MCP servers were refused. Each now turns into the matching OpenAI setting, and one OpenAI has nothing for gets a clear 400 unless the admin turned on dropping unsupported params
Details
TLDR
Problem this solves:
disable_parallel_tool_use,speed, web search filters and location, and 1h cache marks did nothing,mcp_serversanswered 400, andcontaineranswered 200 as if it ranHow it solves it:
drop_paramsoradditional_drop_paramsREDACTEDin proxy logs and logged model parametersstrict: falseIntentional product change:
container,top_k,inference_geoand code executionallowed_callersnow answer 400 instead of being ignored, 1h cache marks write OpenAI's 12h cache at 2x, and key allowlists, tool policies and content guardrails now act on MCP on any modelUser Flow
Before: an Anthropic SDK app on an OpenAI model loses some settings silently, and its MCP servers are refused
"model": "gpt-6.2-sol", aget_weathertool anddisable_parallel_tool_use: true, asking about four citiestool_useblocksmcp_serverswith the DeepWiki MCP server and gets a 400After: the same requests take effect
tool_useblockmcp_serversrequest returns 200 with DeepWiki's answerDecisions
Eight mapping choices and why
disable_parallel_tool_useon chat and Bedrock. Whichever merges second drops its duplicate Responses hunkspeed: "fast"maps toservice_tier: "priority", per OpenAI's fast mode docs."standard"sends nothing, other values answer 400, and a forwardedservice_tierother than"auto"winsmcptool withrequire_approval: "never", since Anthropic's connector runs tools without asking. A toolset allowlist becomesallowed_tools, and a toolset or server entry OpenAI cannot express answers 400. Anmcp_callcomes back asmcp_tool_useandmcp_tool_resultblocks and replays as the same call, each result found by its call's id. The server token goes out asauthorization, which log redaction and the logged model parameters now hideweb_search.max_usesbecomesmax_tool_callsonly when web search is the only tool, and answers 400 otherwise. A model that refuses domain filters, such as gpt-4o-mini, answers OpenAI's 400, and withdrop_paramson the turn goes again once without them, the way an unverified organization's reasoning summary already does$refanddefaultkeep working, and objects with properties close as fix(anthropic): close strict JSON schemas on the Messages to Responses bridge #51337 does, even ones allowing extra keys. A schema using anything OpenAI's strict mode rejects, such as a map, a free-form object,allOf, aconstwith notype, a$refbeside other keywords or auriformat, goes up as is withstrict: false, since OpenAI takes one strict flag per schema and answered 400 to each Before. OpenAI then does not enforce that schema. The other choices were a 400 as Before, or rewriting the schema into OpenAI's subset the way Anthropic's SDK does, which drops constraints the caller set. Like OpenAI's SDK, strict mode lists every property as required, so the model fills optional fields too, andstrict: falsekeeps them optionalcache_controlmark asks for 12h, OpenAI's only TTL of an hour or more, on the Responses API only, since Chat Completions and Azure reject a breakpoint TTL. Direct/v1/responsescalls get it too, since a bridge-only rule would keep their 1h marks on the 30m cache. A top-level mark goes on the last block, or on the turn before an assistant prefill since OpenAI takes no mark on assistant text, unlessadditional_drop_paramslistscache_controlmcp_serversentry by itsname, the way/v1/responsescountsserver_label, so native Anthropic models get this too. Matching a server by its URL stays a separate feature requestmcp_tool_useinput andmcp_tool_resulttext the way they readtool_useandtool_result, on any model, and a mask goes back into the block it came from. Streamed replies are not scanned yet, see CaveatsPre-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 moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Last updated: 6134a53. All 70 request cases ran again there against merge base 34d39fa, and unit tests, make check and code-quality pass
What each later commit re-ran
The A/B below ran on c7b29fe, with Before at its merge base 3e9c97e. f5f1806 hides MCP server tokens in logged model parameters, and 9194d39 only marks
containerread-only. 49bd187 sends open schemas non-strict, runs guardrails over MCP blocks and keeps the log pattern for a quotedauthorizationkey off other key names. So the schema, guardrail, mask and container cases and the callback canary ran again at 49bd187 against the merge base, and the new redaction unit tests fail without the change. The other cases carry, since they send no open schema and no MCP block with a blocked word, and the clean MCP replays and the canary's MCP calls answer 200 at 49bd187. Adapter and guardrail unit tests, make check and code-quality pass at 49bd187. 640 affected test files fail only on 4 flakes and 2 tests the merge base also fails, and the guardrail handler's 1449 tests pass after its last edit. 1761d9a finds each replayed MCP result by its call's id anywhere in the assistant turn and puts a top-level cache mark on the turn before an assistant prefill, so the split replay and prefill cache cases ran at 1761d9a against 49bd187 and the merge base. At 1761d9a, the 59725 affected tests fail only on 21 flakes that pass when rerun alone and on 32 tests the merge base also fails, 31 of them Rust S3 logging tests that a follow-up tracks. pytest's workers crashed once on the loaded test host, so the tests after the crash ran again on their own. b021dfa keeps only a whole null, None, true or falseauthorizationvalue out of redaction, so a token that merely starts with one is redacted too. With plain and JSON debug logs on, a canary token of that shape was logged once at 1761d9a and 0 times at b021dfa, and the Python and Rust redaction tests pass with the new cases (script, output). 92f11f3 sends a json_schema withstrict: falsewhen OpenAI's strict mode would reject any part of it, so the schema cases ran at 92f11f3 against 25b010e, whose Messages to Responses adapter matches the merge base, and the Anthropic unit tests pass. 42dfd3a merges main, which changed this PR's bridge files to add deferred tool support, and 6134a53 sends a web search again without its domain filters when OpenAI refuses them underdrop_params. So all 70 request cases ran again at 6134a53 against the new merge base 34d39fa, each answering as at its last run, plus the domain filter cases on gpt-4o-mini and native MCP turns with deferred tools (table). The merge changed no logging or redaction code, so the callback canary and debug log cases carry, and the three newdrop_paramsfilter tests fail without the fixBoth legs sent the same requests through the Anthropic Python SDK to real OpenAI, Gemini and Anthropic models, with every request and reply in the gist
Setup, the same on both legs
Each leg booted its own tree on one box with its own Postgres database and 2 workers, on a free port. Env var names are
OPENAI_API_KEY,GEMINI_API_KEY,LITELLM_MASTER_KEY,DATABASE_URL,OPENAI_BASE_URL,LITELLM_LOCAL_MODEL_COST_MAP=TrueandPYTHON_DOTENV_DISABLED=1.OPENAI_BASE_URLpoints at a small recorder that logs each request and forwards it unchanged tohttps://api.openai.com/v1, which is where the "OpenAI got" lines come fromconfig.yaml
Client code,
anthropic0.84.0. A case that setsmcp_servers,containerorspeedgoes throughclient.beta.messageswith the matching beta header, as its step says. The full script is sdk_leg.pyThe cache cases ran on a second pair of proxies with no recorder and no database, since LiteLLM sends cache marks only to OpenAI's own host. Their config.yaml has only the
gpt-6.2-solentry above withapi_key: os.environ/OPENAI_API_KEY, started withlitellm --config config.yaml --port <port> --num_workers 2. Each call sends a system prompt of about 6,000 tokens markedcache_control: {"type": "ephemeral", "ttl": "1h"}, salted per leg. At t0 it sends one/v1/messagescall with the mark on the system block, one with a top-levelcache_control, one/v1/responsescall and one/v1/chat/completionscall through theopenaiSDK with the mark on the system item. The top-level call repeats at +20 s. A three-turn/v1/messageschat adds a plain mark on each newest user message and resends the history every turn, with turn 2 at +20 s and turn 3 at 65 minutes. The four single calls repeat at 65 minutes too, past the 30m default. The script is sdk_cache.py, and its output is cache-progress.txtparallel_tool_calls: falseservice_tier: priorityservice_tier: autoservice_tier: priorityallowed_toolssentuser_locationsent, SF forecast16 cases that answer the same on both legs
A 1h cache mark now asks OpenAI for 12h, so the first write costs about 2x and a call 65 minutes later still hits
Cache cases
/v1/responses1h mark, write TTL/v1/responsesfirst call cost/v1/messages1h mark, first call cost/v1/messagestop-level mark, first call cost/v1/chat/completions1h mark, first call cost/v1/messages1h mark again at 65 min/v1/responses1h mark again at 65 min/v1/chat/completions1h mark again at 65 mincache_controlThe prefill rows ran at 1761d9a, and Before is 49bd187 and the merge base, which send no mark (script, output)
`model_parameters` now shows the MCP token as REDACTED, and an MCP turn replays
With debug logs on, a canary MCP token was logged 0 times on both legs, and After logged
'REDACTED'(Before, After)A logging callback reads
model_parametersfrom the standard logging payload, and there the token used to show up in plain text. Before put it there for a native Anthropic call, c7b29fe also put it there for both OpenAI calls, and f5f1806 shows it 0 times, with the proxy log and spend logs at 0 on every leg (script, Before, c7b29fe1160, After)A second turn that sends the first turn's
mcp_tool_useandmcp_tool_resultblocks back answers 200 plain and streaming on After, and OpenAI gets the matchingmcp_callitem ininput. Before answers 400 on both (script, Before, After)When the first turn called two MCP tools and the replay sends both uses before either result or puts text between a use and its result, 49bd187 sent those
mcp_callitems with no output. 1761d9a sends both outputs in both orders, and count_tokens still answers 400 on these blocks before any OpenAI call (script, output)The tool allowlist and the tool policy guardrail now count each
mcp_serversentry by its name on any modelAllowlist cases
Each key came from
/key/generatewith themetadata.allowed_toolsnamed below (script, Before, After)invalid_request_errorpermission_errorinvalid_request_errorpermission_errorTool policy cases
Each policy was set with
POST /v1/tool/policyand given 25 s to sync (script, Before, After, claude-haiku Before, claude-haiku After)mcp_serversdeepwikimcp_serversunsupportedViolated tool policy, OpenAI never calledmcp_serversdocsmcp_serversunsupportedmcp_serversandmcp_toolsetdeepwikiViolated tool policy/v1/responsesmcp tool deepwikiViolated tool policyViolated tool policymcp_serversunsupportedViolated tool policymcp_serversunsupportedA json_schema OpenAI's strict mode rejects answers 200 where Before answered 400 (wire summary)
Schema cases
strict: truestrict: truestrict: truestrict: falsestrict: truestrict: falseallOfwith a$refstrict: truestrict: falseconstwith notypestrict: truestrict: false$refwith a descriptionstrict: truestrict: falseuriformatstrict: truestrict: falsemessages.parsewithHttpUrlstrict: truestrict: falsedate-timestrict: truestrict: true$refstrict: truestrict: trueEach ran plain and streaming with the same result, and
strictis what OpenAI received. The replies are closed Before, closed After, map Before, map After, free-form Before and free-form After, with the streaming ones beside them in the gistThe rows from
allOfdown ran at 92f11f3 against 25b010e, with the replies in their gist, for exampleuriBefore anduriAfter. count_tokens on theallOfandurischemas also answers 200 where Before answered 400 (script, output). OpenAI does not enforce a non-strict schema, and theallOfreply came back withowneras a string (After)Content guardrails now block and mask words inside MCP blocks (guardrail wire diff, mask wire summary)
Guardrail cases
These guardrails were added to the same config.yaml, and each request turns one on with
"guardrails": ["<name>"]in its bodyclaude-haiku goes straight to Anthropic and gpt-6.2-sol goes to OpenAI through the recorder. "blocked" is the guardrail's 400
Content blocked: keyword ... detected, and on gpt-6.2-sol Before answered 400 on every row, blocked on the user text row andmcp_serversunsupported on the restmcp_tool_resultmcp_tool_usemcp_tool_resultmcp_tool_result[KEYWORD_REDACTED]mcp_tool_result[KEYWORD_REDACTED][KEYWORD_REDACTED]A blocked request never reached OpenAI, and a blocked reply came after one OpenAI call. Each request is
r10-cell-<case>.jsonin the gist and its replies arer10-base-<case>.txtandr10-head-<case>.txt, for example request, Before and After for the first row on gpt-6.2-solTool cache marks and web search filters, checked on the wire
A
cache_controlmark on a tool now reaches OpenAI as that tool'sprompt_cache_breakpoint, plain and streaming, where Before sent the tool with no mark, and a 1h TTL on it goes out as 12h like a message mark. All six calls answered 200. These ran at 49bd187 and 3e9c97e against api.openai.com, reading each proxy's own outbound body (outbound bodies, tool mark request, 1h request). Web search withblocked_domainsandmax_usesgoes out on After asweb_searchwithfilters.blocked_domainsandmax_tool_calls, where Before sent a bareweb_search_preview(wire diff, web search request, web search Before, web search After)/live-pr-risk at 6134a53, no breaking change left
The A/B ran at c7b29fe against its merge base 3e9c97e. The callback canary and the MCP replay ran again at f5f1806, and the schema, guardrail and mask cases and the canary ran again at 49bd187 against the merge base. The split MCP replay, prefill cache and count_tokens cases ran again at 1761d9a, and the debug log redaction case at b021dfa. The new schema cases and count_tokens ran at 92f11f3. The integration suites ran with f5f1806 in the tree. Every group passed except 32 MCP e2e cases, whose helper imports an mcp 1.x module and errors the same way at the merge base, and one Vertex Gemma case that timed out under load and passed alone at 9194d39 and the merge base. The callers of 49bd187's new helpers were walked again, see the graph below. At 6134a53, after main's merge, all 70 request cases ran again against merge base 34d39fa and each answered as at its last run, and the merge touched no logging or redaction code
Breaking
model_parametersshowed an OpenAI call's MCP server token in plain text, and Before already did for a native Anthropic call. Fixed in f5f1806, so the canary counts 0 inmodel_parametersthere and at 49bd187Backward incompatible
container,top_k,inference_geo, a code executionallowed_callersand a malformedmcp_serversentry answer 400 where they answered 200 and did nothing. Underdrop_paramsanmcp_serversentry now goes upstream instead of being dropped. This follows litellm'sdrop_paramsconvention, and the drop_params legs show the 200. Kept in Caveats for Mateo's reviewspeed: "fast"now asks for OpenAI's priority tier, and a 1h cache mark now writes the 12h cache, each billed about 2x. Both are the mapping this PR was asked for, kept in Caveatsdrop_paramsit goes again without them, per litellm's convention, kept in Caveatsallowed_toolsleaves out anmcp_serversentry, a tool policy that blocks one, or a content guardrail whose word shows up in an MCP block now refuses the request on any model, native Anthropic included, where Before let it through. This closes gaps in the allowlist and the guardrails, kept in Caveats for Mateo's reviewRegression risk
Dependency graph
extract_request_tool_namesfeeds the key allowlist and the tool policy guardrail, both verified live aboveget_standard_logging_model_parametersfeeds every callback'smodel_parameters, verified live by the canary. Its readers that take tool names only are tested or read no credential field/v1/messageson OpenAI models, verified live by the 28 cases plain and streamingfits_openai_strict_modedecidesstrictfor the adapter's json_schema output and has one caller,_text_format, which serves/v1/messagesand its count_tokens on OpenAI models, both verified live at 92f11f3 and tested.openai_strict_json_schemakeeps its behavior for the chat adapter, since_includes_typemakes the same object check as the helper it replacesopenai/responses/transformation.pyand the cache breakpoint helper serve direct/v1/responsestoo, verified live by the cache cases/v1/messages, native Anthropic included, verified live by the guardrail and mask cases on both models and testedauthorizationpattern is tested in both. b021dfa's whole-value exception only redacts more, and everyredact_stringcaller gets it, which the live debug log case covers_assistant_blocks_to_input_itemsand_with_automatic_cache_markeach have one caller in the adapter, verified live by the split replay and prefill cases and testedmcp_serverson both legs, a pre-existing gapNot verified
Before (3e9c97e)
disable_parallel_tool_use, 4 cities
m1_parallel.jsonwithclient.messages, plain and streamingm1_parallel.json
{"model": "gpt-6.2-sol", "max_tokens": 1024, "tool_choice": {"type": "auto", "disable_parallel_tool_use": true}, "tools": [{"name": "get_weather", "description": "Get the current weather for one city", "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}], "messages": [{"role": "user", "content": "What is the weather right now in Paris, Tokyo, Lima and Cairo? Call the tool for every city."}]}{"stop_reason": "tool_use", "tool_use": 4, "cost": "0.000912"}, and streaming gave the same status. OpenAI got{"tool_choice": "auto", "tools": [{"type": "function", "name": "get_weather", "strict": false}]}. Raw output, the stream run beside itThe other 27 Before cases are in cases-before-3e9c97e1d2b.md
After (c7b29fe)
disable_parallel_tool_use, 4 cities
Send
m1_parallel.jsonthe same way as Before200 with
{"stop_reason": "tool_use", "tool_use": 1, "cost": "0.000468"}, and streaming gave the same status. OpenAI got{"parallel_tool_calls": false, "tool_choice": "auto", "tools": [{"type": "function", "name": "get_weather", "strict": false}]}. Raw output, the stream run beside it27 more cases
No parallel flag, 4 cities (200)
Send
m1_no_flag.jsonthe same way as Before200 with
{"stop_reason": "tool_use", "tool_use": 4, "cost": "0.000912"}, and streaming gave the same status. OpenAI got{"tool_choice": "auto", "tools": [{"type": "function", "name": "get_weather", "strict": false}]}. Raw output is in the gist, the stream run beside itstop_sequences (400)
Send
m0_stop_sequences.jsonthe same way as Before400 with
openai does not support parameters: ['stop'], for model=gpt-6.2-sol. To drop these, set 'litellm.drop_params=True' or for proxy:\n\n'litellm_settings:\n drop_params: true'\n. \n If you want ..., and streaming gave the same status. Raw output is in the gist, the stream run beside itStrict schema on gpt-4.1 (chat bridge) (200)
Send
h1_chat_bridge_strict.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000176"}, text{"city":"Paris","country":"France"}, and streaming gave the same status. OpenAI got{"stop": ["ZZZ"], "response_format": {"type": "json_schema", "json_schema": {"name": "structured_output", "schema": {"type": "object", "properties": {"city": {"type": "string"}, "country": {"type": "string", "default": "FR"}}, "required": ["city", "country"], "additionalProperties": false}, "strict".... Raw output is in the gist, the stream run beside itStrict tool (200)
Send
m2_strict.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000366"}, text{"color":"blue","note":"Purple is not an allowed color."}, and streaming gave the same status. OpenAI got{"text.format.strict": true}. Raw output is in the gist, the stream run beside itStrict tool, every field required (200)
Send
m2b_strict_required.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000304"}, text{"answer":"yes","confidence":1}, and streaming gave the same status. OpenAI got{"text.format.strict": true}. Raw output is in the gist, the stream run beside itspeed fast (200)
Send
m3_speed_fast.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.00014800000000000002"}, textHi, and streaming gave the same status. OpenAI got{"service_tier": "priority"}. Raw output is in the gist, the stream run beside itNo speed (200)
Send
m3_speed_none.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "7.400000000000001e-05"}, textHi, and streaming gave the same status. OpenAI got none of the case's fields. Raw output is in the gist, the stream run beside itspeed fast, service_tier auto (200)
Send
m3c_speed_fast_auto.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.00014800000000000002"}, textHi, and streaming gave the same status. OpenAI got{"service_tier": "priority"}. Raw output is in the gist, the stream run beside itmcp_servers (200)
Send
m4_mcp_servers.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["mcp_tool_use", "mcp_tool_result", "text"], "cost": "0.00335"}, textThe first three top-level topics in DeepWiki forBerriAI/li..., and streaming gave the same status. OpenAI got{"tools": [{"type": "mcp", "server_label": "deepwiki", "server_url": "https://mcp.deepwiki.com/mcp", "require_approval": "never"}]}`. Raw output is in the gist, the stream run beside itmcp_toolset (200)
Send
m5_mcp_toolset.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["mcp_tool_use", "mcp_tool_result", "text"], "cost": "0.003104"}, textThe first three top-level DeepWiki topics forBerriAI/litel..., and streaming gave the same status. 2 upstream calls, the first sent{"tools": [{"type": "mcp", "server_label": "deepwiki", "server_url": "https://mcp.deepwiki.com/mcp", "allowed_tools": ["read_wiki_structure"], "require_approval": "never"}]}`. Raw output is in the gist, the stream run beside itmcp_toolset with a disabled tool (200)
Send
m5b_mcp_toolset_blocked_tool.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000484"}, textASK_QUESTION_UNAVAILABLE, and streaming gave the same status. OpenAI got{"tools": [{"type": "mcp", "server_label": "deepwiki", "server_url": "https://mcp.deepwiki.com/mcp", "allowed_tools": ["read_wiki_structure"], "require_approval": "never"}]}. Raw output is in the gist, the stream run beside itmcp_toolset naming no server (400)
Send
m5c_orphan_toolset.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for mcp_toolset 'github' without a matching mcp_servers entry. To drop it, set 'litellm.drop_params=Tru..., and streaming gave the same status. Raw output is in the gist, the stream run beside itmcp_servers, drop_params model (200)
Send
m5d_orphan_toolset_drop.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["mcp_tool_use", "mcp_tool_result", "text"], "cost": "0.00335"}, textThe first three top-level topics in DeepWiki forBerriAI/li..., and streaming gave the same status. OpenAI got{"tools": [{"type": "mcp", "server_label": "deepwiki", "server_url": "https://mcp.deepwiki.com/mcp", "require_approval": "never"}]}`. Raw output is in the gist, the stream run beside itweb_search allowed_domains (200)
Send
m6_websearch_domains.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.030275000000000003"}, textLiteLLM is an open-source Python SDK and self-hosted AI gate..., and streaming gave the same status. OpenAI got{"tools": [{"type": "web_search", "filters": {"allowed_domains": ["docs.litellm.ai"]}}]}. Raw output is in the gist, the stream run beside itweb_search user_location (200)
Send
m6b_websearch_location.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.032029999999999996"}, textSan Francisco, California — Today, **Wednesday, November 25*..., and streaming gave the same status. OpenAI got{"tools": [{"type": "web_search_preview", "user_location": {"type": "approximate", "city": "San Francisco", "region": "California", "country": "US", "timezone": "America/Los_Angeles"}}]}. Raw output is in the gist, the stream run beside itcontainer skills (400)
Send
m7_container_callers.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for allowed_callers on tool 'get_weather'; container. To drop them, set 'litellm.drop_params=True', or ..., and streaming gave the same status. Raw output is in the gist, the stream run beside itcontainer skills, drop_params model (200)
Send
m7b_container_callers_drop.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000156"}, textHi!, and streaming gave the same status. OpenAI got{"tools": [{"type": "function", "name": "get_weather", "strict": false}]}. Raw output is in the gist, the stream run beside itcontainer id (400)
Send
r2_container_id.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for container. To drop it, set 'litellm.drop_params=True', or 'drop_params: true' in the model's 'litel..., and streaming gave the same status. Raw output is in the gist, the stream run beside itcontainer id, drop_params model (200)
Send
r2b_container_id_drop.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "8.400000000000001e-05"}, textHi!, and streaming gave the same status. OpenAI got none of the case's fields. Raw output is in the gist, the stream run beside ittop_k (400)
Send
m8_top_k.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for top_k. To drop it, set 'litellm.drop_params=True', or 'drop_params: true' in the model's 'litellm_p..., and streaming gave the same status. Raw output is in the gist, the stream run beside ittop_k, drop_params model (200)
Send
m8b_top_k_drop.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "7.8e-05"}, textRed, and streaming gave the same status. OpenAI got none of the case's fields. Raw output is in the gist, the stream run beside itinference_geo (400)
Send
m9_inference_geo.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for inference_geo. To drop it, set 'litellm.drop_params=True', or 'drop_params: true' in the model's 'l..., and streaming gave the same status. Raw output is in the gist, the stream run beside itinference_geo, drop_params model (200)
Send
m9b_inference_geo_drop.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "7.8e-05"}, textRed, and streaming gave the same status. OpenAI got none of the case's fields. Raw output is in the gist, the stream run beside itSchema with a root $ref (200)
Send
r1_root_ref.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000312"}, text{"name":"Ada","age":36}, and streaming gave the same status. OpenAI got{"text.format.strict": true}. Raw output is in the gist, the stream run beside itRoot $ref on Gemini (200)
Send
r1g_root_ref_gemini.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.000942"}, text{"name":"Ada","age":36}, and streaming gave the same status. nothing reached OpenAI. Raw output is in the gist, the stream run beside itMap fields on Gemini (200)
Send
r3_maps_gemini.jsonthe same way as Before200 with
{"stop_reason": "end_turn", "block_types": ["text"], "cost": "0.0009165"}, text{"name":"Ada","metadata":{},"tags":{"color":"blue"}}, and streaming gave the same status. nothing reached OpenAI. Raw output is in the gist, the stream run beside itMalformed mcp_servers entry (400)
Send
r4_mcp_malformed.jsonthe same way as Before400 with
openai/gpt-6.2-sol is served through the OpenAI Responses API, which has no equivalent for a malformed mcp_servers entry. To drop it, set 'litellm.drop_params=True', or 'drop_params: true' i..., and streaming gave the same status. Raw output is in the gist, the stream run beside itDirect calls to OpenAI's Responses API in its documented shape, from round 1
Each is one curl with the same prompt, and every body sent and raw response is in the gist: Parallel off, No flag (control), speed: fast, mcp_servers, Domain filter, user_location and 3-turn chat. The
speed: fastcost is the reply's token counts at the model's priority priceThe 3-turn chat sends the system prompt as a
developeritem markedprompt_cache_breakpoint: {"mode": "explicit", "ttl": "12h"}and each newest user item marked{"mode": "explicit"}, resending the history every turn with the same gaps as the proxy legsType
🐛 Bug Fix
Caveats (if any)
Medium
speed: "fast"asks for OpenAI's priority tier, billed about 2x, unlessadditional_drop_paramslistsspeed/v1/responsescalls toocontainer,top_k,inference_geoand refused domain filters answer 400 unless dropped, anddrop_paramsnow keepsmcp_servers, which a customopenai/host may rejectallowed_callerswith a code execution caller answers 400, and a follow-up tracks itheadersasREDACTEDLow
defer_loadingon anmcp_toolsetanswers 400, with no tool search round tripdrop_params, a partialmcp_toolsetdenylist drops the whole MCP serverstop_sequencesrequests and Azure models skip the new mappings, on the Chat Completions path as Beforedisable_parallel_tool_usetoo, see Decision 1Final Attestation
Bugbot summary