Repository navigation
fix(mcp)!: backport large SSE results and main cost map to 1.105 - #47240
joshua-berri wants to merge 32 commits into
Conversation
|
@litereview code-review Please review this release backport at the current tip, including SDK compatibility and the large SSE response regression |
|
@greptileai Please review this release backport at its current tip, including the SDK upgrade and large SSE response regression |
|
bugbot run Please review this release backport at its current tip, including SDK compatibility and the large SSE response regression |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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 22d7bd6. Configure here.
|
|
|
||
| # MCP timeout defaults (seconds). Override via env vars for slow/custom MCP servers. | ||
| MCP_CLIENT_TIMEOUT: Final = float(os.getenv("LITELLM_MCP_CLIENT_TIMEOUT", "60.0")) | ||
| MCP_MAX_SSE_EVENT_SIZE_BYTES: Final = get_env_int("LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES", 64 * 1024 * 1024) |
There was a problem hiding this comment.
Low · Non-positive SSE limit makes every HTTP MCP server return no tools
- An operator sets
LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES=0, a common way to mean "unlimited". The same applies to any negative value. get_env_intaccepts the value unchanged and storesMCP_MAX_SSE_EVENT_SIZE_BYTES = 0.MCPClient._create_transport_contextpasses this value tostreamable_http_client(max_sse_event_size=0)for every Streamable HTTP server.- In MCP 2.3.0,
StreamableHTTPTransport.__init__raisesValueError("max_sse_event_size must be positive or None").MCPClient.list_tools()catches the error and returns[], so every HTTP MCP server appears to have no tools. Tool calls fail too.
The PR caveat tells operators to use a positive integer, but that does not prevent the failure. The repository already has get_env_int_in_range in litellm_core_utils/env_utils.py for this case. It logs a warning and falls back to the default when a value is out of range. Using it here with a minimum of 1 would keep a bad value from disabling MCP everywhere.
Evidence
Reproduced against the head checkout: LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES=0 python -c '... MCPClient(server_url="http://127.0.0.1:9/mcp", transport_type=MCPTransport.http).list_tools()' logged a traceback ending in streamable_http.py line 122: ValueError: max_sse_event_size must be positive or None and printed [].
litellm/litellm_core_utils/env_utils.py:26 get_env_int_in_range docstring: "Values outside the range fall back to the default and warn, so a misconfigured knob can neither crash the caller nor silently change the meaning of what it computes."
Latest summary by code-review · View this review · Reviewed 22d7bd65cddc
There was a problem hiding this comment.
This backport preserves #47034’s documented positive integer requirement. Zero is unsupported, and no previously supported configuration breaks. Please reassess accordingly
There was a problem hiding this comment.
Finding still applies
Thanks for the context. I agree that no previously supported configuration breaks. The finding does not claim a compatibility break. It reports a failure mode in the knob this PR adds.
- An operator sets
LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES=0.0is a common way to say "unlimited". get_env_intaccepts the value unchanged (litellm/constants.py:202).MCPClient._create_transport_contextpasses it tostreamable_http_client(max_sse_event_size=0)(litellm/experimental_mcp_client/client.py:495).- The installed MCP 2.3.0 raises
ValueError("max_sse_event_size must be positive or None").list_tools()then returns[]for every HTTP MCP server, with only a logged traceback to explain why.
The positive-integer requirement appears only in the PR caveats. I found no other mention of the variable in the repository, so operators get no guard and no clear error. The repository already provides get_env_int_in_range for this kind of setting. That helper warns and falls back to the default, and constants.py uses it for nearby limits. Switching to get_env_int_in_range("LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES", 64 * 1024 * 1024, 1, <max>) would turn a silent outage into a warning. The severity stays low because the trigger requires an explicit misconfiguration.
Evidence
litellm/constants.py:202: MCP_MAX_SSE_EVENT_SIZE_BYTES: Final = get_env_int("LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES", 64 * 1024 * 1024). get_env_int (litellm/litellm_core_utils/env_utils.py:10-23) returns any parsable int, including 0 and negative values.
Installed mcp version 2.3.0, mcp/client/streamable_http.py:121-122: if max_sse_event_size is not None and max_sse_event_size <= 0: raise ValueError("max_sse_event_size must be positive or None").
litellm/litellm_core_utils/env_utils.py:26-43: get_env_int_in_range warns and falls back to the default when a value is outside the range. litellm/constants.py:451-463 already uses it for TIKTOKEN_ENCODE_CHUNK_SIZE_CHARS and the TOKEN_COUNTER_* limits.
grep -rn LITELLM_MCP_MAX_SSE on .py and .md files outside .venv finds only litellm/constants.py:202. The PR caveat "Set LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES to a positive integer" is the only documentation of the requirement.
Original reproduction on the head checkout: LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES=0 makes MCPClient(..., transport_type=MCPTransport.http).list_tools() log the ValueError and return [].
Reviewed 22d7bd65cddc · View follow-up
|
@litereview code-review Please reassess the low-severity finding against the documented positive integer requirement and the clarification in its review thread |
…kport_mcp_sse_1_105
…5, and fix Fable 5 and Sonnet 4.6 schema 400s (#46870) * fix(bedrock): use native structured output on every Claude model whose Bedrock profiles accept it Bedrock accepts outputConfig structured output on every reachable profile of Claude Opus 4.7, 4.8, 5, 5.5, Sonnet 5, 5.5, Haiku 5.5, and Fable 5.1, so json_schema now goes out natively there instead of as a forced tool, which kept Bedrock from returning adaptive thinking. Fable 5 rejects outputConfig, so its keys go back to the tool path. GovCloud keys keep their flags, and the drift tests let GovCloud lag its commercial base but never lead it. * fix(bedrock): clean Claude schemas for native structured output and keep recursive schemas on the old path Bedrock native output rejects minimum/maximum, minItems, uniqueItems, oneOf, additionalProperties true, and recursive or unresolved $ref, all of which the forced tool accepted. Claude schemas on the Bedrock native paths now go through the cleaner the Anthropic native path already uses, and a schema with a recursive or unresolved $ref keeps the forced tool, inline, or drop path it had. * fix(bedrock): keep older installs on the json tool with a Bedrock-only native output key Older installs fetch the model map from main, so flipping supports_native_structured_output moved them onto native output with their old schema handling. The new supports_bedrock_native_structured_output key is ignored by older code. Schemas native output cannot hold (recursive refs, open objects such as dict fields) keep the json tool on the new key, models on the old key keep their current behavior for those shapes, and the Anthropic API, Vertex AI, and Azure keep their current behavior. * chore(cost-map): regenerate the model prices schema for the Bedrock native output key * fix(bedrock): keep native output to profiles every account accepts and route schemas Bedrock rejects to the json tool Only Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 keep the Bedrock native output key, since Opus 4.8 and Sonnet 5 answer 400 on some accounts and Opus 5 garbles escaped characters. Lookaround patterns and string formats outside Bedrock's list now keep the json tool, objects typed as a union with null are closed, and the cleaner keeps minItems of 0 or 1. * fix(bedrock): keep Opus 5.5 and Fable 5.1 on the json tool, since native output stops their adaptive thinking * fix(bedrock): keep shared $defs in native schemas and send refused schemas to the json tool on every native model Native output now keeps $defs instead of inlining each use, so a submodel reused across a schema counts once against Bedrock's optional and union limits. Schemas native output cannot hold use the json tool on Converse and Invoke chat for both native keys, and minItems is only kept when it is an integer 0 or 1 * fix(bedrock): keep the json tool unless thinking is requested and bound native output schemas The Bedrock native output key now applies only when the call asks for thinking, so calls without thinking keep the json tool as before. Schemas past Bedrock's documented union and optional counts, or past a grammar size estimate fitted to live probes, keep the json tool on both map keys. Open objects keep the json tool on the Anthropic API, Vertex AI and Azure AI, where native output returned them empty. The $ref check no longer expands $defs, so doubling definitions no longer stall the request. * fix(bedrock): resolve root-path $defs refs so nested Pydantic models keep native output on Invoke * test(bedrock): cover native structured output and json tool routing through the proxy Integration cells drive the proxy against a scripted Bedrock peer that enforces Bedrock's structured output schema rules, covering thinking with native output on Converse, Converse streaming, Invoke, /v1/responses and /v1/messages, the deployment opt-in, Fable 5, schema cleaning on every native entry, open objects, and malformed schemas. Vertex, Anthropic and Azure AI cells cover open objects on native-capable models and the cleaner's minItems and nullable object handling. The unit table now covers reasoning_effort none and disabled thinking * fix(bedrock): keep native output for numeric formats and wide old-key schemas, and keep thinking in json mode Check string formats only on nodes that can be strings, apply the 64-field cap only to the Bedrock-only key, carry thinking blocks into the json mode message, and send malformed json tool schemas as object schemas. * fix(anthropic): keep native output for dict fields unless the json tool can be forced * fix(anthropic): keep native output for dict fields when the caller sends tools * test(bedrock): close the dangerous-tool-use test schema, since Bedrock native output requires closed objects * test(anthropic): cover forced and unforced open-object routing, json mode thinking, numeric formats and wide schemas Add proxy cells for open-object schemas that keep native output when the json tool cannot be forced (a model that refuses forced tools on the Anthropic API and Vertex AI, thinking, caller tools), for the thinking block a json mode answer keeps on Vertex AI and Bedrock Invoke, and for integer and number formats and 65-field schemas on each Bedrock map key. Point the forced open-object cells at the Anthropic API and Azure AI only, since no Vertex AI model in the cost map takes both native output and a forced tool * fix(bedrock): keep the native output opt-in on the deployment that sets it, and route effort none open objects to native output * test(bedrock): cover deployment-scoped native output opt-in, register_model and effort none open objects
…net 5 and fall back to the json tool when Bedrock rejects it (#47100) * fix(bedrock): send native structured output first on Opus 4.8 and Sonnet 5 and fall back to the json tool when Bedrock rejects it * fix(bedrock): retry with the json tool when Bedrock refuses the native output schema Count a 400 under output_config.format.schema: as a native output rejection, so a schema Bedrock cannot compile (like a pattern with a nested {n,m} group) gets the json tool retry instead of reaching the caller * fix(bedrock): make the native output retry send what an opted-out deployment sends The retry after a native output rejection now reruns the same optional param mapping completion() ran, with the deployment model_info opted out of supports_bedrock_native_structured_output, so tool_choice, effort and the json tool schema match an opted-out deployment instead of a hand-built tool. Each config keeps only the predicate that decides when native output came from the opt-in key. Bedrock batch records for Anthropic models map with the opt-in turned off, since a batch job has no retry. Models on supports_native_structured_output keep native output in batch * fix(bedrock): build the messages retry from the caller's request and keep other errors unchanged * fix(bedrock): give sync converse stream errors the upstream body as text * fix(bedrock): let a malformed caller outputConfig reach Bedrock instead of raising A Converse json_schema request whose caller outputConfig failed litellm's shape check raised a pydantic error before the request was sent, so the caller got a 500 where the merge base passed Bedrock's 400 through. The opt-in check now treats that outputConfig as carrying no native output. Also opts the vertex wire test's pinned Opus 4.8 json tool deployment out of native output, and extends the Bedrock native output integration tests. * fix(bedrock): send a refused caller outputConfig once and give opt-out advice only when native output is unsupported A caller can send its own outputConfig on Converse. When Bedrock refused that schema on an opt-in deployment, the retry still carried the caller's textFormat, so Bedrock got the same request twice and the warning told the operator to turn off an opt-in that was not the cause. The retry is now skipped when the opted-out request would still carry a native textFormat, so Bedrock's 400 reaches the caller after one call as on the merge base. The opt-out advice is logged only for the account-level "Extra inputs are not permitted" rejection. * fix(bedrock): keep the caller's continuation message on the native output retry The Converse transform pops user_continue_message from litellm_params on the first attempt, so a retry built from those params afterwards dropped it. Both Bedrock chat routes now hand the fallback a copy taken before the first attempt. * test(bedrock): pin additional_drop_params on the /v1/messages native output retry * fix(bedrock): give the Converse native output retry the fake stream timeout
|
@litereview code-review Please review the complete backport at b89d48b, including catalog test corrections and the security test migration |
|
@greptileai Please review the complete backport at b89d48b, including catalog test corrections and the security test migration |
This comment has been minimized.
This comment has been minimized.
|
@greptileai Restored the unchanged Python credential template at dbfa91a and verified synthetic credentials parse successfully; please reassess the current tip |
|
@litereview code-review Please review dbfa91a, including the restored Python credential template and the main-aligned Sonnet catalog test correction |
| raise AssertionError(provider) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("provider", ["anthropic", "azure_ai"]) |
There was a problem hiding this comment.
High · New Vertex/Anthropic structured-output integration tests fail in the providers shard
- This PR adds
test_vertex_anthropic_structured_output_wire.pyundertests/integration/providers/.run.pyruns that directory in theprovidersCI shard. - The
forced_tool_refused-vertex_aiandtest_vertex_chat_native_schema_keeps_min_items_one_and_closes_a_nullable_objectcases send ajson_schemaresponse_formatto avertex_ai/claude-opus-5-5deployment. The tests expect the schema atoutput_config.format. - The Vertex Anthropic transformation on this line still sends the schema as the top-level
output_format. The scripted Vertex peer rejects that field as deprecated, so both cases get a 400 instead of a 200. - Two more cases,
test_native_model_json_schema_with_an_open_object_takes_the_json_tool_and_keeps_the_object_open[anthropic]and[azure_ai], send a schema whose only property isvalues. They expect the answer{"values": {...}}.AnthropicConfig._convert_tool_response_to_messagestill strips any top-levelvalueskey, so the caller gets{...}without the wrapper. That answer no longer matches the caller's schema.
The product behavior predates this PR. The new tests fail because the matching main-line fixes were not backported. To fix this, backport the Vertex output_config.format folding and the values-unwrap fix, or drop these four cases from this batch.
Evidence
Ran python tests/integration/run.py providers tests/integration/providers/test_vertex_anthropic_structured_output_wire.py against a local proxy, scripted upstream, Postgres 15 and Redis started the way .circleci/scripts/run_integration.sh starts them. Result: 4 failed, 7 passed.
Failures ([anthropic] and [azure_ai]): assert {'tier': 2, 'summary': '…'} == {'values': {'tier': 2, 'summary': '…'}} at line 551.
Failures (forced_tool_refused-vertex_ai and test_vertex_chat_native_schema_keeps_min_items_one…): Vertex_aiException BadRequestError - output_format: this field is deprecated, use output_config.format, assert 400 == 200.
On this checkout, litellm.get_optional_params(model='claude-opus-5-5', custom_llm_provider='vertex_ai', response_format=…) returns the keys {'json_mode', 'output_format'}. The output has no output_config.
litellm/llms/anthropic/chat/transformation.py:2836: if isinstance(args, dict) and (values := args.get("values")) is not None: _message = litellm.Message(content=json.dumps(values)).
tests/integration/run.py: GROUPS['providers'] = ('providers', 'routing', 'streaming', 'messages_endpoint'), selected recursively, so CI runs this file.
The rest of the same run (the Bedrock native-output wire suite and the Bedrock batch files wire suite) passed: 70 passed in total across the three files.
Latest summary by code-review · View this review · Reviewed dbfa91aaaf07
|
@greptileai The obsolete integration marker is removed. Please review the current tip with refreshed MCP proof and baseline-failure attribution |
|
@litereview code-review Please review the final marker-only follow-up, using the documented integration proof tier and independently reproduced baseline failures |
|
@litereview code-review Please review be83a81, including the main response-preservation repair, release compatibility and the refreshed before-and-after evidence |
|
@greptileai Please review be83a81 for MCP correctness and regressions, including the main schema-preservation repair and refreshed integration evidence |
|
bugbot run Please review be83a81 for actionable MCP and structured-output regressions, using the refreshed before-and-after evidence in the description |
|
@litereview code-review Please verify the current tip, including copied provider tests adapted to release interfaces and the documented response-shape repairs. |
|
@greptileai Please review this final tip. Main-shared findings are documented, streamed values conversion is repaired, and catalog tests follow main. |
|
bugbot run Please review this final MCP backport tip for release-specific regressions, using the refreshed verification evidence in the description. |
| schema = {"type": "object", "properties": {"values": {"type": "array"}}, "required": ["values"]} | ||
| answer = json.dumps({"values": [3, 5, 8]}) |
There was a problem hiding this comment.
New tests omit required annotations
These bindings lack Final. AGENTS.md requires it on every variable. Annotate these and the preceding new test's bindings before merging
Context Used: AGENTS.md (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!
TLDR
Problem this solves:
How it solves it:
4aec80f5ee1b3bbd2804abc123fe6663be77f775Intentional product change: the exact main catalog mirror retires model-price rows and updates capability flags. Integrations relying on removed bundled prices need explicit registered pricing or a supported catalog entry, and callers must use the mirrored capability flags
User Flow
Before, a large tool result fails through the proxy
POST http://localhost:4000/mcp-rest/tools/callSSE stream ended without a responseAfter, the same tool returns its complete result
POST http://localhost:4000/mcp-rest/tools/callisError=falseRelevant issues
Backports merged #47034 to
stable/1.105.x. The separate dependency PR #47707 is closed. Remaining findings use versions still on main and are disclosed belowLinear ticket
Resolves LIT-9750
Picked changes and necessity
The new fallback route exposed a response regression. Main #45871 supplies only the needed response-envelope handling and its regression cases. A required top-level
valuesobject is preserved again. Its separate Vertex request-field migration is excluded because that field location is unchanged from the release baseThe two-line guard from main #46331 makes streamed
valuesconversion agree with non-streaming output and main. Only that guard and its regression cases are includedRelease timeout interfaces remain intact. Main #47162 is not needed. Catalog-only retargets stay in separate test-only commits. Copied Vertex wire tests now validate this release's existing
output_formatinterface while retaining their schema and routing assertions. No provider cases are skipped or removedPre-Submission checklist
Verification
Current base
fc436409e8c7ac2d59495424bf76080794e7842c, candidate1e4a04f3eb8c5654ce7a29fee615964816776328The affected suite passed 3962 tests before the final streaming and test-interface follow-ups. The streaming-fix focused run reports 600 passed, 38 warnings in 52.80s. At this final test-only tip, the affected unit run reports 20 passed, 1 warning in 22.43s, and copied provider collection reports 74 tests collected in 0.07s. These overlapping runs are separate measurements
Backend canonical lint, formatting, strict rules, type discipline and test-quality checks pass. The overall canonical result retains previously established unrelated dashboard budget failures and generated API-type drift. Generated output was discarded and no unrelated repairs were made
Local changed executable-line coverage is 582/588 (98.98%). Touched-function branch coverage is separately 582/806 (72.21%). Hosted Codecov is complete at this exact tip, reporting 82.23% repository line coverage after the unit workflow completed
Both cost-map JSON files and their schema are byte-identical to main
4aec80f5ee1b3bbd2804abc123fe6663be77f775. There are no line-only catalog editsThe candidate passes all 32 live MCP observations. Both transports list tools and preserve exact 500000-byte and 3145728-byte results. The configured SSE limit rejects an oversized event and accepts the next smaller result. JSON remains independent of that limit. Zero, negative, invalid and unset limits use the safe default. All replay processes were stopped
SDK integration against a local HTTP peer preserves the requested
{"values":{}}object. Streaming and non-streaming conversion of the legacyvalueswrapper both return[1, 2], matching main. Commands and results are recorded belowThe source Grype scan uses an empty configuration and reports zero retired JavaScript dependency findings. The remaining 36 fixable matches use versions still locked by main
159b5b2f7243bba757c08e4ddc45a2514e4cd037. Exact-main upgrades cannot resolve those findings yet. No suppressions or line-only dependency overrides were addedProvider proof reaches the approved integration tier. Real-provider credentials are unavailable. The source PR's actual provider captures are linked below, and release behavior is exercised through the SDK and HTTP wire
Screenshots / Proof of Fix
The Bedrock rejection fixtures come from the source PRs’ real-provider captures. grammar_limits.txt records the grammar-limit rejection, proof_cases.md records the unsupported output-format rejection, and native_schema_keywords.txt records schema-keyword rejection. These are source-PR captures, not a claim of real-provider execution on this release. Release verification uses the executed integration tier because provider credentials are unavailable
The fixture is a real MCP SDK server. Paid LLM calls are not needed for this MCP flow. The commands and measured output below came from source-built proxies with their locked MCP versions, 2.2.0 before and 2.3.0 after. Ports in the captured commands are ephemeral; use port 4000 with the replay setup
Replay setup
Paths are relative and the key is a dummy local value. Run it once per SHA, base and head.
big_server.py. It is a real SDK MCPServer, SSE by default and JSON whenBIG_JSON_RESPONSE=1:config.yaml:LITELLM_MCP_MAX_SSE_EVENT_SIZE_BYTES=200000in front of the proxy command for the override cases:dumpand check the returned text exactly:The limit case uses sizes 90000, then 110000, then 90000 against
big.Expected output
big 3145728 isError True len 45 exact False MCPError: SSE stream ended without a response, and every other rowexact True.exact True.Before (fc43640)
Large tool result
Run
curl -sS --max-time 30 -w ' %{http_code}' 'http://127.0.0.1:62983/mcp-rest/tools/list?server_id=big' -H 'Authorization: Bearer sk-local-sse-verification'Output summary
{"status":200,"tools":["dump"],"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:62983/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 3145728}}'Output summary
{"status":200,"size":3145728,"isError":true,"length":45,"exact":false,"error":"MCPError: SSE stream ended without a response"}Configured limit and recovery
Run
curl -sS --max-time 30 -w ' %{http_code}' 'http://127.0.0.1:62868/mcp-rest/tools/list?server_id=big' -H 'Authorization: Bearer sk-local-sse-verification'Output summary
{"status":200,"tools":["dump"],"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:62868/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 90000}}'Output summary
{"status":200,"size":90000,"isError":false,"length":90000,"exact":true,"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:62868/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 110000}}'Output summary
{"status":200,"size":110000,"isError":false,"length":110000,"exact":true,"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:62868/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 90000}}'Output summary
{"status":200,"size":90000,"isError":false,"length":90000,"exact":true,"error":null}After (1e4a04f)
Large tool result
Run
curl -sS --max-time 30 -w ' %{http_code}' 'http://127.0.0.1:52189/mcp-rest/tools/list?server_id=big' -H 'Authorization: Bearer sk-local-sse-verification'Output summary
{"status":200,"tools":["dump"],"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:52189/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 3145728}}'Output summary
{"status":200,"size":3145728,"isError":false,"length":3145728,"exact":true,"error":null}Configured limit and recovery
Run
curl -sS --max-time 30 -w ' %{http_code}' 'http://127.0.0.1:52072/mcp-rest/tools/list?server_id=big' -H 'Authorization: Bearer sk-local-sse-verification'Output summary
{"status":200,"tools":["dump"],"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:52072/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 90000}}'Output summary
{"status":200,"size":90000,"isError":false,"length":90000,"exact":true,"error":null}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:52072/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 110000}}'Output summary
{"status":200,"size":110000,"isError":true,"length":78,"exact":false,"error":"MCPError: SSE stream failed: Server-sent event exceeded the 200000 byte limit."}Run
curl -sS --max-time 30 -w ' %{http_code}' http://127.0.0.1:52072/mcp-rest/tools/call -H 'Authorization: Bearer sk-local-sse-verification' -H 'Content-Type: application/json' -d '{"server_id": "big", "name": "dump", "arguments": {"size": 90000}}'Output summary
{"status":200,"size":90000,"isError":false,"length":90000,"exact":true,"error":null}The reproducible response-shape commands are in the companion 1.103 backport. At
1e4a04f3eb8c5654ce7a29fee615964816776328, the required-object replay returns{"values": {}}withmatches_requested_shape=true, and both streamed and non-streamed wrapper replies return[1, 2]Adversarial review
Independent final verification passed the executed cases at
1e4a04f3eb8c5654ce7a29fee615964816776328, using this head’s frozen lock and a matching release-base source build. It passed 551 focused unit cases and all 74 batch, native-output and Vertex provider integration cases. Before, the 3 MiB MCP SSE response failed. After, both transports return exact results and the configured limit rejects an oversized event followed by successful recovery. The streamed values replay returns[1, 2]consistently. Commands and caller-visible proof are recorded aboveThe current-tip full unit workflow completed with failures, so full CI is not green. Its failed jobs repeat previously classified baseline or infrastructure failures. These are distinct from the reviewer findings below
LiteReview reports OpenRouter Responses usage.cost being ignored. Comparison with main is pending, so this is not yet classified as a line-only regression. Greptile is 4/5 and requests Final annotations in the new streamed-wrapper tests. Bugbot refuses the full catalog-sized diff, and no current-tip Veria review is available. Readiness is not claimed
Main-shared behavior is disclosed without a line-only repair. With only
output_config.format, a Converse native rejection retries without the requested schema and can return plain text. The same two-request SDK/HTTP-wire probe reproduces on main159b5b2f7243bba757c08e4ddc45a2514e4cd037Main's response helper also treats omitted
additionalPropertiesas disallowed when deciding whether to unwrap an object. Schema{"type":"object","properties":{"score":{"type":"integer"}}}and tool input{"meta":{"score":7}}produce{"score":7}on both builds. This is a helper-level reproduction. Independent SDK replay on the native route preserves the original object and does not reach that helperFor an empty-property open schema, the new forced-tool route returns
[1, 2]from{"values":[1,2]}, matching main. The release base used native output and preserved the wrapper. This shared-main conversion is disclosed; the line-only streaming inconsistency is fixed by the selected #46331 guardIndependent SDK replay also confirms the
parameters-first wrapper concern on main and 1.105. Input{"parameters":{"tier":2},"name":"json_tool_call"}remains wrapped when streamed but returns{"tier":2}without streaming. Puttingnamefirst returns{"tier":2}in both modes on both builds. This main-shared behavior is reported without extending the release patchType
Bug Fix
Caveats
High
Medium
Release-note publication is pending the actual shipping patch version. No release version or published release note is claimed
Final Attestation
Current-tip CI reports a Vertex realtime timeout and a passthrough-auth mock missing
state. The tests, relevant production files and httpx, websockets, pytest, pytest-asyncio and respx versions are unchanged from the release base. These unrelated failures are retained as failed checks and are not repaired by this batchGreptile’s credential-template finding is fixed by restoring the unchanged release-base template. A synthetic-key probe fails with
MalformedErrorwithout it and parses credentials with it. Main’s retired OpenRouter Sonnet variant was removed from the mirror test, and all 10 cases pass. The remaining release-version test assumes an RC version and is unchanged from this stable release baseThe final test-only follow-up removes the obsolete covers decorator from the new streaming-spend test. Its body and runtime remain unchanged, and the integration module still collects. Its earlier real proxy/database spend-tag proof remains applicable
All 32 live MCP observations were replayed successfully at this final tip. Current-tip hosted CI, coverage and final independent review are being refreshed