Skip to content

feat(vertex_ai): add Meta Muse models on Vertex AI - #50768

Merged
mateo-berri merged 51 commits into
BerriAI:mainfrom
emerzon:litellm_vertex_muse_models
Nov 21, 2026
Merged

mateo-berri merged 51 commits into
BerriAI:mainfrom
emerzon:litellm_vertex_muse_models

Conversation

@emerzon

@emerzon emerzon commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

Add native Responses support for Meta Muse models

Details

TLDR

Problem this solves

  • Vertex Muse models lack catalog entries and native Responses routing.

How it solves it

  • Add Wonder 1.0, Ember 1.0, and Spark 1.3 metadata and Marketplace prices
  • Route meta/muse-* models to Vertex's Meta Responses endpoint or a custom api_base
  • Answer 400 for unsupported params, tool types and tool choices, or drop or relax them under drop_params
  • Support streaming, usage, pricing, Codex, WebSocket mode and Ember PDF input
  • Return Muse's namespace tool calls under their namespace
Endpoint and model card sources

The Google Muse guide lists three preview models, served through POST /v1/projects/PROJECT_ID/locations/global/publishers/meta/v1/responses. The request body uses a bare model ID. This adapter reuses the existing OpenAI Responses transformations and Vertex credential handling, with a model-family check that leaves other Vertex models on their existing paths.

The catalog adds vertex_ai/meta/muse-wonder-1.0, vertex_ai/meta/muse-ember-1.0, and vertex_ai/meta/muse-spark-1.3 to both copies. Capabilities and token limits follow Google's Wonder, Ember, and Spark model cards, checked on November 9, 2026. The two unspecified output limits remain unspecified.

Marketplace prices

The catalog includes Google's published Marketplace USD list prices per million tokens, verified on November 9, 2026. These rates come from the model-specific Marketplace pricing API. The general Vertex billing catalog does not return these SKUs.

Model Input Cached input Output
Muse Wonder 1.0 4.00 0.20 20.00
Muse Ember 1.0, up to 200,000 input tokens 0.10 0.004 0.50
Muse Ember 1.0, above 200,000 input tokens 0.30 0.012 1.50
Muse Spark 1.3 1.25 0.15 4.25

Sources are Google's Marketplace listings for Wonder, Ember and Spark. Offer discounts are outside these list prices. Tests verify that uncached input, cache reads and output use the catalog rates, including exactly 200,000 and 200,001 input tokens for Ember. Explicit per-call rates still override the catalog.

Tool choice handling

Muse currently accepts only tool_choice="auto". The adapter follows LiteLLM's existing drop_params policy on both the Responses API and the Chat Completions bridge. Without that opt-in, unsupported choices raise UnsupportedParamsError before provider I/O. With it, required and named choices become auto, keeping the offered tools. none becomes auto and removes the tools, so the model cannot call an offered function. Omitted choices stay omitted. As with LiteLLM's existing helper, globally enabled drop_params=True also enables normalization; a per-request False does not override that global setting. Other Vertex model families retain their existing behavior. Relaxing a forced choice does not guarantee a tool call; callers remain responsible for validating the response against their schema.

User Flow

Before, a developer who adds a Vertex-hosted Muse model to the proxy gets an HTTP 500 instead of an answer

  1. They add vertex_ai/meta/muse-ember-1.0 to the proxy config as muse-ember-1.0 with vertex_location: global and Google service account credentials
  2. They send POST http://<proxy>/v1/chat/completions with {"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}
  3. They get HTTP 500 Unknown partner model: meta/muse-ember-1.0. POST /v1/responses and POST /v1/messages fail too, and so do Wonder 1.0 and Spark 1.3

After, the same developer gets normal answers from all three Muse models on chat completions, responses and messages, with the cost tracked

  1. They add vertex_ai/meta/muse-ember-1.0 to the proxy config as muse-ember-1.0 with vertex_location: global and Google service account credentials
  2. They send POST http://<proxy>/v1/chat/completions with {"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}
  3. They get HTTP 200 with a chat completion, token usage, and an x-litellm-response-cost header
  4. They send POST http://<proxy>/v1/responses with {"model":"muse-ember-1.0","input":"hi"}, streamed and not, and get HTTP 200 with a resp_... response or a response.completed event
  5. They send POST http://<proxy>/v1/messages with an Anthropic-shaped body and get HTTP 200 with a message response
  6. They call GET http://<proxy>/spend/logs?request_id=<id> and see each request under the configured model with its cost

Relevant issues

Partially addresses #51074, for the Meta publisher only

Related pull requests

#46243 also shortens flattened namespace tool names. #49132 applies allowed-tools checks to nested Responses tools. Neither adds native Vertex Muse routing

Pre-Submission checklist

  • I have added meaningful tests.
  • The focused test files covering this change pass locally.
  • My PR passes all required CI/CD checks.
  • My PR only solves one specific problem.
  • Every automated review on the latest commit has finished and findings are addressed.

Delays 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

Live e2e on Vertex AI, before at the merge base 89e0f3b and after at b424db6, two 2-worker proxies per leg sharing Postgres and Redis. A 500 is Unknown partner model unless the row says otherwise

Last updated: fce1cc6, which merges main at 5f70d06. Main changed the bridges' long system prompts, Gemini tool result matching, the Responses guardrail translation and Redis tracking, so C1 to C21, C30 to C34, C49 to C59 and C66 to C69 ran again on both legs and kept their status codes (rerun). Other cases ran on b424db6 and base 89e0f3b, and a later test-only commit's tests pass. The PR's own diff is unchanged, so /live-pr-risk at b424db6 still applies

Case Before After
C1 chat, Ember 500 200, cost header
C2 chat stream, Ember 500 200, usage chunk
C3 responses, Ember 500 200, cost header
C4 responses stream, Spark 500 all events
C5 messages, Wonder 500 200, cost header
C6, C7 reasoning, chat and responses 400 unsupported param 200
C8 store=true 500, 500 400, then 200
C9 unlisted Spark 1.4 500 Vertex 404
C46, C48 Codex TUI, both URLs error runs a tool
C47 SDK forced namespace tool call call
C49 tool policy, 68-char name 400 blocked 400 blocked
C50 two members, same short name 200 400
C51 Codex /v1 MCP tool error answers
C52 tool policy, colliding names gpt 200, Muse 500 200 for both
C53 guardrail drops a twin kept tool, Muse 500 kept tool, both
C53c drop plus edit edited tool, Muse 500 edited tool, both
C53f, C56 reorder, replayed call gpt 200, Muse 500 200 for both
C55 logging_only scans logged gpt 2, Muse 500 2 for both
C57 to C59 name shared with a member 500 name conflict right member, both
C60 tool registry, name over 64 chars full name, 1 log full name, 1 log
C61, C65, C68 tools Muse refuses 500 400 before sending
C61a, C65a, C68a drop_params, C61b 500 200
C62, C73, C74 spend log and callbacks, name over 64 chars full name full name
C63, C64 client name map or 5 real name, charged real name, charged
C66 client name map, failed call declared name declared name
C67 replay after a long name, Gemini 200 200
C69 Muse file_search, streamed chat 500 200, streamed
C70 replay, tools in additional_tools 200 200, 12 of 12
C71 streamed file search spend 500 both calls billed
C72 replay after client tool search 9 of 12 ok 10 of 12 ok
C10 to C45 and C75 results
Case Before After
C10 spend logs 5 failures, $0 5 successes, priced
C11 messages, more tokens 500 200, "Earth"
C12 chat tool 500 200, get_weather call
C13 tool_choice required 500, 500 400, then a call
C14 tool_choice none 500 200, no call
C15 responses tool stream 500 function_call events
C16 messages stream 500 events with usage
C17 messages tool 500 200, tool_use
C18 background, drop_params 500 200, completed
C19 deployment credentials 500 x3 200 x3
C20 us-central1 deployment 500, 500 400, global only
C21 previous_response_id 500, 500 400, then 200
C22 chat stop 500 400 unsupported param
C23 stop and seed, drop_params 500 200
C24 chat user, reasoning_effort 400 unsupported param 200
C25 truncation auto, disabled 500 x3 400, 200, 200
C27, C28 past token expiry not run 200
C30 chat PDF, Ember 500 200, "ZEBRA"
C31 token counting Vertex 404 x2 400 x2, names model
C32 name without meta/ 500 Vertex 404 500 Vertex 404
C33 custom api_base 500 200
C34 WebSocket mode, Wonder error event completed, cost
C35, C36 gateway api_base, /v1 or query 500 200
C37 Ember PDF flag, /model/info None True
C39, C40 effort none or max, drop_params 500 200
C41 Spark thinking disabled 500 200
C42 Spark effort none 400, generic 400, names none
C43 Ember effort max 400 unsupported param 200
C44, C45 publisher URLs as api_base 500 200
C75 project and location URL as api_base 500 200
C27 and C28 past token expiry, and earlier /live-pr-risk findings

Every case ran on the PR head at b424db6, and every case except C27 and C28 also ran at the merge base 89e0f3b. Only C49, C50, C52, C53, C53f, C55, C56 and C57 to C59 run a request guardrail. What earlier tips did on the cases that changed is in history.md in the gist

C27 and C28 ran on the after leg at b424db6 with the proxies up 63 minutes, past the one-hour Google access token lifetime, and both answered 200 (expiry.md in the gist). The before leg fails every Muse call, so it has no expiry case

Earlier /live-pr-risk findings and their fixes are in history.md, replay.md, c70.md and c72.md in the gist. At cd3be2d it left one open row, per-chunk stream hooks seeing the shortened name, which cce8839 fixes (lpr17.md and c74.md). Every run since found no regression, at cce8839, after each merge of main, for the project and location base, and at b424db6 for main at 89e0f3b (lpr18.md to lpr23.md)

Focused validation command

The PR author's focused test command. At fa20c18 it passes 1,620 tests

LITELLM_LOCAL_MODEL_COST_MAP=True python -m pytest \
  tests/unit/llms/vertex_ai/responses/test_vertex_muse_responses_transformation.py \
  tests/unit/responses/litellm_completion_transformation/test_litellm_completion_responses.py \
  tests/unit/completion_extras/litellm_responses_transformation/test_completion_extras_litellm_responses_transformation_transformation.py \
  tests/unit/llms/openai/responses/test_openai_responses_guardrail_handler.py \
  tests/unit/llms/anthropic/messages/adapters/test_anthropic_messages_adapters_transformation.py \
  tests/unit/proxy/guardrails/guardrail_hooks/test_headroom.py \
  tests/unit/proxy/guardrails/guardrail_hooks/test_tool_policy_guardrail.py \
  -o addopts= -q --disable-warnings
Shared setup: config, proxy start command, env vars, Redis and case scripts

The config, proxy start command, env var names and Redis checks are in setup.md in this gist. No proxy had Google ADC or a project env var, so calls used deployment credentials

The case scripts and both legs' full output are in this gist, as before.md and after.md. C35 and C36 go through gateway.py, a stand-in gateway on port 28887 that prints each request's path and query, removes /google-vertex and the tenant query, and forwards the rest to aiplatform.googleapis.com. Each leg ran cases10.sh and cases11.sh first. The after leg then ran round2.sh (which runs cases.sh, cases2.sh, cases4.sh and cases5.sh), cases6.sh, cases7.sh, cases8.sh, then cases3.sh with CALL_IDS set to the x-litellm-call-id values from C1, C3, C5 and C6. The before leg ran that same sequence at this merge base in the previous round. C34 drives ws_case.py, a Python websockets client that sends one response.create event. Each case printed its command with printf '$ %s\n' and then ran that same string with eval. Both legs then ran cases13.sh (C39 to C45), codex_tui.sh (C46) and fc_run.sh, which runs forced_choice.py with each tree's Python (C47). C48 runs codex_tui_v1.sh. C49 runs cases14.sh policy on proxy A, which stores the policy in the leg's database, then starts a third proxy from the leg's tree with guard_boot.sh and guard.yaml (the tool_policy guardrail, 2 workers, the leg's database) and runs cases14.sh against it. C50 runs cases15.sh against that third proxy. C51 runs codex_mcp.sh, which starts Codex with weather_server.py as an MCP server, then cases16.sh against proxy A. Long opaque values in the outputs (encrypted reasoning and response ids, which carry Google project metadata) are replaced with their length, and the Google project id with PROJECT_ID

Before (89e0f3b)

C1 the reporter's chat request

  1. Send it to proxy A
$ curl -sS -D /tmp/tmp.5US9XRVHii -w '\nHTTP %{http_code}\n' http://127.0.0.1:24613/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}'; hdr
{"error":{"message":"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-ember-1.0\n\nLiteLLM: model group 'muse-ember-1.0' failed with the error above. No fallback was attempted.","type":"internal_server_error","param":null,"code":"500"}}
HTTP 500
x-litellm-call-id: 4bd77981-f84f-4640-8472-552d2d72f375
x-litellm-response-cost: 0
C2 to C45 before

The before leg's C2 to C45 commands and output are in before.md in this gist, since they do not fit GitHub's body limit beside the after leg. Every case there fails with 500 Unknown partner model, except C6, C7, C24, C42 and C43 with 400 for reasoning_effort, C19a, which prints 0 for both proxies as on the after leg, C31, where token counting gets Vertex's 404 for a count-tokens model, C32, which gets Vertex's 404 as on the after leg, C34, whose WebSocket gets an Unknown partner model error event, and C37, which shows None. C10 lists the 5 calls as failure rows at $0

C46 to C75 before

C46 Codex TUI on muse-ember-1.0

  1. Start Codex 0.169.0 in tmux, signed in with ChatGPT, with codex_tui.sh pointing its litellm model provider at proxy A's /backend-api/codex and the model muse-ember-1.0
  2. Type Run the shell command: echo QA_TOOL_OK. Then reply with its output only. and press Enter
Codex shows a high demand error at the merge base, where Muse calls answer 500

C47 litellm.responses with a forced tool_choice on a namespace member whose joined name is 67 characters, anthropic/claude-haiku-5-5

  1. Run the SDK script below with the tree's Python
$ .venv/bin/python forced_choice.py
status ok
[('function_call', 'mcp__codex_apps__codex_document_control', '_get_document_tool_schemas')]

C48 Codex TUI over /v1 with drop_params

  1. Start Codex 0.169.0 in tmux with codex_tui_v1.sh pointing its litellm model provider at proxy A's /v1 with an API key, and the model muse-ember-1.0-dropparams, a deployment with drop_params: true
  2. Type Run the shell command: echo QA_TOOL_OK. Then reply with its output only. and press Enter
Codex over /v1 shows a high demand error at the merge base

C49a block mcp__codex_apps__github_enterprise_connector_prod__delete_repository (68 characters) through proxy A

  1. Send the request below to proxy A
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:24613/v1/tool/policy -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"tool_name":"mcp__codex_apps__github_enterprise_connector_prod__delete_repository","input_policy":"blocked"}'
{"tool_name":"mcp__codex_apps__github_enterprise_connector_prod__delete_repository","input_policy":"blocked","output_policy":"untrusted","updated":true,"team_id":null,"key_hash":null}
HTTP 200

C49b, C49c, C50 and C50b tool policy and shortened namespace members, claude-haiku-5-5

  1. Send the requests in cases14.sh and cases15.sh to the third proxy, started from the leg's tree with guard.yaml. Their commands and raw output are in c49.md in the gist
### C49b responses on the proxy with the tool_policy guardrail, claude-haiku-5-5, namespace tool whose member is the blocked one
HTTP 400
### C49c the same request with an unblocked member, list_repositories
HTTP 200
### C50 responses, claude-haiku-5-5, mcp__codex_apps__codex_document_control__get_document_tool_schemas (67 characters) beside a member named after its shortened name, _get_document__ec6f04fd
HTTP 200
### C50b the same request with only the long member
HTTP 200

C51 Codex TUI over /v1 calls an MCP tool on muse-spark-1.3

  1. Start Codex 0.169.0 in tmux with codex_mcp.sh pointing its litellm model provider at proxy A's /v1 with an API key, the model muse-spark-1.3, and weather_server.py as the weather MCP server, whose get_weather tool returns a code word
  2. Type Use the weather MCP tool to get the weather in Paris, then tell me the code word it returns. and press Enter
Codex over /v1 shows a high demand error at the merge base, where Muse calls answer 500

C52 tool policy on, colliding shortened names, gpt-5.6 and muse-spark-1.3

  1. Send the requests in cases17.sh to the fourth proxy, started from the leg's tree with guard2.yaml (gpt-5.6, muse-spark-1.3 and the tool_policy guardrail on by default). Their commands and raw output are in c52.md in the gist

C53 a guardrail service drops or edits tools sharing a chat name, gpt-5.6 and muse-spark-1.3

  1. Send the requests in cases18.sh and cases20.sh to the fifth proxy, started from the leg's tree with guard3.yaml (gpt-5.6, muse-spark-1.3 and a generic_guardrail_api guardrail on by default, pointed at tool_filter_server.py, which drops tools whose description holds BLOCKED, rewrites EDITME to edited, and returns the kept tools reversed when one holds REVERSE). Their commands and raw output are in c53.md in the gist

C53f, C55 and C56 a guardrail reorders kept tools, logs only, or masks a message beside a replayed namespaced call, gpt-5.6 and muse-spark-1.3

  1. Send the requests in cases21.sh, C53f and C56 to the fifth proxy, whose guardrail service masks MASKME in the last user message, and C55 to the sixth proxy, started from the leg's tree with guard4.yaml (the same guardrail service in logging_only mode), then read C55's spend log from the sixth proxy. Their commands and raw output are in c53.md in the gist

C57 to C59 a guardrail reorders, replaces or edits tools sharing a full name with a namespace member, gpt-5.6 and muse-spark-1.3

  1. Send the requests in cases22.sh to the fifth proxy, whose guardrail service also drops a tool whose description holds REPLACEME and adds a function with the same name and parameters. Only mcp__docs's get_document fetches documents starting with N, the ones the prompt asks for. Their commands and raw output are in c57.md in the gist

C60 a namespace member over 64 characters in the tool list, tool detail and tool logs, claude-haiku-5-5

  1. Send the requests in cases23.sh to the third proxy. The namespace ends in the leg's name, so each leg starts with no row for it. The model calls mcp__codex_apps__codex_document_control_<leg>___get_document_tool_schemas, whose full name is over 64 characters, then the script reads /v1/tool/list, /v1/tool/{name}/detail and /v1/tool/{name}/logs for it. Their commands and raw output are in c60.md in the gist
### C60 responses, claude-haiku-5-5, the model calls a namespace member whose full name is over 64 characters
HTTP 200
[{"namespace":"mcp__codex_apps__codex_document_control_b34","name":"_get_document_tool_schemas"}]
### C60a tool list, every name starting with the namespace (waits up to 120 s for the registry write)
["mcp__codex_apps__codex_document_control_b34___get_document_tool_schemas"]
### C60b tool detail under the full name
HTTP 200
"mcp__codex_apps__codex_document_control_b34___get_document_tool_schemas"
### C60c tool logs under the full name (waits up to 120 s for the log index)
{"total":1,"models":["anthropic/claude-haiku-5-5"]}

C61 Muse with web_search beside a function tool, without and with drop_params

  1. Send the requests in cases24.sh to proxy A. Their commands and raw output are in c61.md in the gist
### C61 responses, muse-spark-1.3 without drop_params, web_search beside a function tool
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-spark-1.3\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error above. No fallback was 
### C61a responses, muse-ember-1.0 with drop_params, the same tools
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-ember-1.0\n\nLiteLLM: model group 'muse-ember-1.0-dropparams' failed with the error above. No fa
### C61b responses, muse-spark-1.3 without drop_params, only the function tool
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-spark-1.3\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error above. No fallback was 

C62 to C64 a namespace member over 64 characters in the spend log, and a client-sent tool name map, claude-haiku-5-5 and gemini-flash

  1. Send the requests in cases25.sh to the seventh proxy, started from the leg's tree with guard5.yaml (claude-haiku-5-5, gemini-flash, the tool_policy guardrail and store_prompts_in_spend_logs). The namespace and tool names end in the leg's name, so each leg starts with no row for them. C62 reads the spend log of a call to a member whose full name is over 64 characters, streamed and not. C63 and C64 send a name map, then 5, under both litellm_bridged_tool_names and full_tool_names, then read the spend log and the tool detail. Their commands and raw output are in c62.md in the gist

C65 Muse with a namespace holding a function and a custom member, without and with drop_params

  1. Send the requests in cases26.sh to proxy A. Their commands and raw output are in c65.md in the gist
### C65 responses, muse-spark-1.3 without drop_params, a namespace holding a function and a custom member
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-spark-1.3\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error above. No fallback was 
### C65a responses, muse-ember-1.0 with drop_params, the same namespace
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-ember-1.0\n\nLiteLLM: model group 'muse-ember-1.0-dropparams' failed with the error above. No fa

C66 to C69 a client name map on a failed call, a replayed turn after a long member call, and Muse tools Vertex refuses

  1. Send the requests in cases27.sh, C66 and C67 to the seventh proxy and C68 and C69 to proxy A. The tool names end in the leg's name, so each leg starts with no row for them. C66 sends a tool name map on a chat request Anthropic refuses, then reads the tool detail under the declared and the mapped name. C67 has gemini-flash call a namespace member whose full name is over 64 characters, then sends turn 2 with previous_response_id, streamed and not. Each line below is cut at 300 characters. Their commands and whole output, at 7e46e6e too, are in c66.md in the gist
### C66 chat completions, claude-haiku-5-5, the client sends a tool name map and the provider refuses the request
HTTP 400
"litellm.BadRequestError: AnthropicException - {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"litellm_bridged_tool_names: Extra inputs are not permitted\"},\"request_i
### C66a tool detail under the declared name (waits up to 120 s for the registry write)
HTTP 200
{"tool_name":"qa27_get_weather_b34","call_count":1,"detail":null}
### C66b tool detail under the name the client sent in the map
HTTP 404
{"tool_name":null,"call_count":null,"detail":"Tool 'qa27_spoofed_b34' not found"}
### C67 responses turn 1, gemini-flash, the model calls the namespace member whose full name is over 64 characters
HTTP 200
[{"namespace":"mcp__codex_apps__codex_document_control_b34","name":"_get_document_tool_schemas"}]
### C67a wait for the turn 1 spend log row, then send turn 2 with previous_response_id and the tool output
HTTP 200
{"status":"completed","items":["message"],"text":["The schemas for document D-42 are title and body, and the code word is PELICAN."]}
### C67s the same turn 2 streamed, the last event and its text
HTTP 200
events  1 response.completed, 1 response.content_part.added, 1 response.content_part.done, 1 response.created, 1 response.in_progress, 1 response.output_item.added, 1 response.output_item.done, 2 resp
{"type":"response.completed","status":"completed","error":null,"items":["message"],"text":["Document D-42 has the schemas title and body, and the code word is PELICAN."]}
### C68 responses, muse-spark-1.3 without drop_params, a namespace holding a function and a member with no type
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-spark-1.3\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error above. No fallback was 
### C68a responses, muse-ember-1.0 with drop_params, the same namespace
HTTP 500
"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-ember-1.0\n\nLiteLLM: model group 'muse-ember-1.0-dropparams' failed with the error above. No fa
### C69 chat completions streamed, muse-spark-1.3 with a function tool and top-level file_search
HTTP 500
chunks 0, done marker 0
{"error":{"message":"litellm.InternalServerError: Vertex_aiException InternalServerError - Unknown partner model: meta/muse-spark-1.3\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error abo

C70 and C71 replays of a namespace sent in additional_tools, and the spend of streamed file search

  1. Send the requests in cases28.sh, C70 to the seventh proxy and C71 to proxy A. C70 runs three rounds on gemini-flash and one on claude-haiku-5-5. Turn 1 sends the namespace only in an additional_tools input item, as Codex does, and the model calls its member, whose full name is over 64 characters. Turn 2 replays it with previous_response_id, twice plain and twice streamed. C71 sends muse-ember-1.0 with drop_params a required file_search, plain and streamed, twice each, and compares each spend log row's spend with its tokens at the /model/info prices. The reply reports only the last of its two Muse calls' tokens, so 1 means one call was billed. The tally, statuses and spend lines are below, and the commands and whole output are in c70.md in the gist

The whole output of both cases is in c70.md in the gist, since it does not fit GitHub's body limit beside C75

C72 a replay after a client tool search loaded a member whose full name is over 64 characters

  1. Send the requests in cases29.sh to the seventh proxy, three rounds on gemini-flash. Turn 1 carries a client tool_search_call and its tool_search_output, which loads a namespace whose member's full name is over 64 characters, and the model calls that member. Turn 2 sends previous_response_id and only the tool output, plain and streamed, each with and without the tool_search tool sent again. Every streamed response.failed on both legs is the same Gemini 400 on contents[9] of the replayed history, which the merge base hits too. How many streamed turns hit it changes from run to run on both legs, from one to three of six. The tally and failures are below, and the commands and whole output are in c72.md in the gist
### C72 tally of every turn 2 above, by model and transport
6 gemini-flash plain completed
3 gemini-flash streamed response.completed
3 gemini-flash streamed response.failed
{"type":"response.failed","status":"failed","error":"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid value at 
{"type":"response.failed","status":"failed","error":"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid value at 
{"type":"response.failed","status":"failed","error":"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid value at 

C73 and C74 a sync SDK success callback and per-chunk stream hooks on a namespace member whose full name is over 64 characters

  1. Run sync_callback.py and stream_callback.py with this tree's litellm. Each makes a sync litellm.responses call to gemini-flash with a user-written CustomLogger, one namespace whose member's full name is over 64 characters, and tool_choice required, the second one streamed. The success callback and the per-chunk hooks see the full name. The scripts, commands and output are in c73.md and c74.md in the gist

C75 a Vertex project and location URL as api_base

  1. Run cases30.sh as the After section says. Both calls answer 500 Unknown partner model (c75.md in the gist)

After (b424db6)

C1 the reporter's chat request

  1. Send it to proxy A
$ curl -sS -D /tmp/tmp.BWh8Ixqdm1 -w '\nHTTP %{http_code}\n' http://127.0.0.1:20310/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}'; hdr
{"id":"resp_1fefc748b658a569","created":1795066125,"model":"muse-ember-1.0","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"","role":"assistant"}}],"usage":{"completion_tokens":16,"prompt_tokens":9,"total_tokens":25,"completion_tokens_details":{"reasoning_tokens":14},"prompt_tokens_details":{"cached_tokens":0},"extra_properties":{"google":{"traffic_type":"ON_DEMAND"}}}}
HTTP 200
x-litellm-call-id: 83cf13aa-2294-4fc0-90c6-1480037c8d70
x-litellm-response-cost: 8.9e-06
C2 to C75 after

C2 to C45 commands and output are in after.md in this gist, since they do not fit GitHub's body limit, and the table above has each result. Every case below ran at b424db6

C46 Codex TUI on muse-ember-1.0

  1. Start Codex 0.169.0 in tmux, signed in with ChatGPT, with codex_tui.sh pointing its litellm model provider at proxy A's /backend-api/codex and the model muse-ember-1.0
  2. Type Run the shell command: echo QA_TOOL_OK. Then reply with its output only., press Enter, and approve the command when Codex asks to run it outside its sandbox, which cannot start on the QA box
Codex runs echo QA_TOOL_OK through proxy A and replies with its output

C47 litellm.responses with a forced tool_choice on a namespace member whose joined name is 67 characters, anthropic/claude-haiku-5-5

  1. Run the SDK script below with the tree's Python
$ .venv/bin/python forced_choice.py
status ok
[('function_call', 'mcp__codex_apps__codex_document_control', '_get_document_tool_schemas')]

C48 Codex TUI over /v1 with drop_params

  1. Start Codex 0.169.0 in tmux with codex_tui_v1.sh pointing its litellm model provider at proxy A's /v1 with an API key, and the model muse-ember-1.0-dropparams, a deployment with drop_params: true
  2. Type Run the shell command: echo QA_TOOL_OK. Then reply with its output only., press Enter, and approve the command when Codex asks to run it outside its sandbox
Codex over /v1 runs echo QA_TOOL_OK with drop_params

C49a block mcp__codex_apps__github_enterprise_connector_prod__delete_repository (68 characters) through proxy A

  1. Send the request below to proxy A
$ curl -sS -w '\nHTTP %{http_code}\n' http://127.0.0.1:20310/v1/tool/policy -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{"tool_name":"mcp__codex_apps__github_enterprise_connector_prod__delete_repository","input_policy":"blocked"}'
{"tool_name":"mcp__codex_apps__github_enterprise_connector_prod__delete_repository","input_policy":"blocked","output_policy":"untrusted","updated":true,"team_id":null,"key_hash":null}
HTTP 200

C49b to C50b tool policy and colliding shortened names, claude-haiku-5-5

  1. Send the requests in cases14.sh and cases15.sh to the third proxy, started from the leg's tree with guard.yaml. Each line below is cut at 300 characters. Their commands and whole output are in c49.md in the gist
### C49b responses on the proxy with the tool_policy guardrail, claude-haiku-5-5, namespace tool whose member is the blocked one
{"error":{"message":"Violated tool policy","type":"invalid_request_error","param":null,"code":"400","provider_specific_fields":{"error":"Violated tool policy","blocked_tools":["mcp__codex_apps__github
HTTP 400
### C49c the same request with an unblocked member, list_repositories
HTTP 200
### C50 responses, claude-haiku-5-5, mcp__codex_apps__codex_document_control__get_document_tool_schemas (67 characters) beside a member named after its shortened name, _get_document__ec6f04fd
{"error":{"message":"litellm.BadRequestError: Flattened namespace tools share a name: mcp__codex_apps__codex_document_control___get_document__ec6f04fd\n\nLiteLLM: model group 'claude-haiku-5-5' failed
HTTP 400
### C50b the same request with only the long member
HTTP 200

C51 Codex TUI over /v1 calls an MCP tool on muse-spark-1.3

  1. Start Codex 0.169.0 in tmux with codex_mcp.sh pointing its litellm model provider at proxy A's /v1 with an API key, the model muse-spark-1.3, and weather_server.py as the weather MCP server, whose get_weather tool returns a code word
  2. Type Use the weather MCP tool to get the weather in Paris, then tell me the code word it returns. and press Enter
Codex calls weather.get_weather through proxy A and answers PELICAN

Codex sends an MCP tool as a namespace, here mcp__weather with the member get_weather. C51a to C51d send that shape with curl

C51a to C51d namespaced function calls on muse-spark-1.3, plain, streamed, dotted and replayed

  1. Send the requests in cases16.sh to proxy A. Their commands and whole output are in after.md in the gist
### C51a responses, muse-spark-1.3, namespace mcp__weather with member get_weather, function_call items in the reply
[{"namespace":"mcp__weather","name":"get_weather","arguments":"{\"city\":\"Paris\"}"}]
### C51b the same request streamed, function_call items in output_item.added, output_item.done and response.completed
{"type":"response.output_item.added","namespace":"mcp__weather","name":"get_weather"}
{"type":"response.output_item.done","namespace":"mcp__weather","name":"get_weather"}
{"type":"response.completed","output":[{"namespace":"mcp__weather","name":"get_weather"}]}
### C51c a top-level function named weather.get_weather keeps its dotted name
[{"namespace":null,"name":"weather.get_weather"}]
### C51d the namespaced call replayed as history with its output, then the final answer
{"status":"completed","text":["Sunny, 21C, code word PELICAN"]}

C52 to C59 guardrail cases, gpt-5.6 and muse-spark-1.3

  1. Send the requests in cases17.sh, cases18.sh and cases20.sh to cases22.sh to the fourth, fifth and sixth proxies, as the Before section says. Their commands and raw output at b424db6 are in c52.md, c53.md and c57.md in the gist, and every status code and tool list matches 9d957b9

C60 a namespace member over 64 characters in the tool list, tool detail and tool logs, claude-haiku-5-5

  1. Send the requests in cases23.sh to the third proxy. The namespace ends in the leg's name, so each leg starts with no row for it. The model calls mcp__codex_apps__codex_document_control_<leg>___get_document_tool_schemas, whose full name is over 64 characters, then the script reads /v1/tool/list, /v1/tool/{name}/detail and /v1/tool/{name}/logs for it. Their commands and raw output are in c60.md in the gist
### C60 responses, claude-haiku-5-5, the model calls a namespace member whose full name is over 64 characters
HTTP 200
[{"namespace":"mcp__codex_apps__codex_document_control_h33","name":"_get_document_tool_schemas"}]
### C60a tool list, every name starting with the namespace (waits up to 120 s for the registry write)
["mcp__codex_apps__codex_document_control_h33___get_document_tool_schemas"]
### C60b tool detail under the full name
HTTP 200
"mcp__codex_apps__codex_document_control_h33___get_document_tool_schemas"
### C60c tool logs under the full name (waits up to 120 s for the log index)
{"total":1,"models":["anthropic/claude-haiku-5-5"]}

C61 Muse with web_search beside a function tool, without and with drop_params

  1. Send the requests in cases24.sh to proxy A. Their commands and raw output are in c61.md in the gist
### C61 responses, muse-spark-1.3 without drop_params, web_search beside a function tool
HTTP 400
"litellm.UnsupportedParamsError: Vertex Muse supports only function and namespace tools, got web_search. Set drop_params=True to omit them.\n\nLiteLLM: model group 'muse-spark-1.3' failed with the err
### C61a responses, muse-ember-1.0 with drop_params, the same tools
HTTP 200
[{"name":"get_weather","arguments":"{\"city\":\"Paris\"}"}]
### C61b responses, muse-spark-1.3 without drop_params, only the function tool
HTTP 200
[{"name":"get_weather","arguments":"{\"city\":\"Paris\"}"}]

C62 to C64 a namespace member over 64 characters in the spend log, and a client-sent tool name map, claude-haiku-5-5 and gemini-flash

  1. Send the requests in cases25.sh to the seventh proxy, started from the leg's tree with guard5.yaml (claude-haiku-5-5, gemini-flash, the tool_policy guardrail and store_prompts_in_spend_logs). The namespace and tool names end in the leg's name, so each leg starts with no row for them. C62 reads the spend log of a call to a member whose full name is over 64 characters, streamed and not. C63 and C64 send a name map, then 5, under both litellm_bridged_tool_names and full_tool_names, then read the spend log and the tool detail. Their commands and raw output are in c62.md in the gist
### C62 responses, claude-haiku-5-5, the model calls the namespace member whose full name is over 64 characters
HTTP 200
[{"namespace":"mcp__codex_apps__codex_document_control_h33","name":"_get_document_tool_schemas"}]
### C62a the spend log row for that request, every tool name in its response field (waits up to 180 s for the row)
[{"status":"success","charged":true,"response_tool_names":["mcp__codex_apps__codex_document_control_h33___get_document_tool_schemas"]}]
### C62s the same request streamed, every tool name the client saw in the stream
HTTP 200
{"namespace":"mcp__codex_apps__codex_document_control_h33","name":"_get_document_tool_schemas"}
### C62t the spend log row for the streamed request, every tool name in its response field (waits up to 180 s for the row)
[{"status":"success","charged":true,"response_tool_names":["mcp__codex_apps__codex_document_control_h33___get_document_tool_schemas"]}]
### C63 chat completions, gemini-flash, the client sends a tool name map under both bridge keys
HTTP 200
["qa25_get_weather_h33"]
### C63a the spend log row for that request (waits up to 180 s for the row)
[{"status":"success","charged":true}]
### C63b tool detail under the name the model called (waits up to 120 s for the registry write)
HTTP 200
"qa25_get_weather_h33"
### C63c tool detail under the name the client sent in the map
HTTP 404
"Tool 'qa25_spoofed_h33' not found"
### C64 chat completions, gemini-flash, the client sends 5 under both bridge keys
HTTP 200
["qa25_get_weather_five_h33"]
### C64a the spend log row for that request (waits up to 180 s for the row)
[{"status":"success","charged":true}]
### C64b tool detail under the name the model called (waits up to 120 s for the registry write)
HTTP 200
"qa25_get_weather_five_h33"

C65 Muse with a namespace holding a function and a custom member, without and with drop_params

  1. Send the requests in cases26.sh to proxy A. Their commands and raw output are in c65.md in the gist
### C65 responses, muse-spark-1.3 without drop_params, a namespace holding a function and a custom member
HTTP 400
"litellm.UnsupportedParamsError: Vertex Muse supports only function and namespace tools, got custom. Set drop_params=True to omit them.\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error a
### C65a responses, muse-ember-1.0 with drop_params, the same namespace
HTTP 200
[{"namespace":"weather","name":"get_weather","arguments":"{\"city\":\"Paris\"}"}]

C66 to C69 a client name map on a failed call, a replayed turn after a long member call, and Muse tools Vertex refuses

  1. Send the requests in cases27.sh, C66 and C67 to the seventh proxy and C68 and C69 to proxy A. The tool names end in the leg's name, so each leg starts with no row for them. C66 sends a tool name map on a chat request Anthropic refuses, then reads the tool detail under the declared and the mapped name. C67 has gemini-flash call a namespace member whose full name is over 64 characters, then sends turn 2 with previous_response_id, streamed and not. Each line below is cut at 300 characters. Their commands and whole output, at earlier heads too, are in c66.md in the gist
### C66 chat completions, claude-haiku-5-5, the client sends a tool name map and the provider refuses the request
HTTP 400
"litellm.BadRequestError: AnthropicException - {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"litellm_bridged_tool_names: Extra inputs are not permitted\"},\"request_id\":\"req_011ChBkzH56CzNCxs8B1QDzx\"}\n\nLiteLLM: model group 'claude-haiku-5-5' failed with the err
### C66a tool detail under the declared name (waits up to 120 s for the registry write)
HTTP 200
{"tool_name":"qa27_get_weather_h33e","call_count":1,"detail":null}
### C66b tool detail under the name the client sent in the map
HTTP 404
{"tool_name":null,"call_count":null,"detail":"Tool 'qa27_spoofed_h33e' not found"}
### C67 responses turn 1, gemini-flash, the model calls the namespace member whose full name is over 64 characters
HTTP 200
[{"namespace":"mcp__codex_apps__codex_document_control_h33e","name":"_get_document_tool_schemas"}]
### C67a wait for the turn 1 spend log row, then send turn 2 with previous_response_id and the tool output
HTTP 200
{"status":"completed","items":["message"],"text":["The schemas for document D-42 are title and body, and the code word is PELICAN."]}
### C67s the same turn 2 streamed, the last event and its text
HTTP 200
events  1 response.completed, 1 response.content_part.added, 1 response.content_part.done, 1 response.created, 1 response.in_progress, 1 response.output_item.added, 1 response.output_item.done, 1 response.output_text.delta, 1 response.output_text.done,
{"type":"response.completed","status":"completed","error":null,"items":["message"],"text":["The schemas are title and body, and the code word is PELICAN."]}
### C68 responses, muse-spark-1.3 without drop_params, a namespace holding a function and a member with no type
HTTP 400
"litellm.UnsupportedParamsError: Vertex Muse supports only function and namespace tools, got None. Set drop_params=True to omit them.\n\nLiteLLM: model group 'muse-spark-1.3' failed with the error above. No fallback was attempted."
### C68a responses, muse-ember-1.0 with drop_params, the same namespace
HTTP 200
[{"namespace":"weather","name":"get_weather","arguments":"{\"city\":\"Paris\"}"}]
### C69 chat completions streamed, muse-spark-1.3 with a function tool and top-level file_search
HTTP 200
chunks 2, done marker 1
{"finish":null,"tool":null,"text":"I'll check the current weather in Paris for you."}
{"finish":"stop","tool":null,"text":null}

C70 and C71 replays of a namespace sent in additional_tools, and the spend of streamed file search

  1. Send the requests in cases28.sh as the Before section says. The commands and whole output, at earlier heads too, are in c70.md in the gist
### C70 tally of every turn 2 above, by model and transport
2 claude-haiku-5-5 plain completed
2 claude-haiku-5-5 streamed response.completed
6 gemini-flash plain completed
6 gemini-flash streamed response.completed
C71 prices: {"input_cost_per_token":1E-7,"output_cost_per_token":5E-7}
C71 plain 1: {"spend":0.0003055999999999999,"prompt_tokens":270,"completion_tokens":226,"usage_at_list_price":0.00014,"spend_over_usage_price":2.18}
C71s streamed 1: {"spend":0.0003109,"prompt_tokens":248,"completion_tokens":263,"usage_at_list_price":0.0001563,"spend_over_usage_price":1.99}
C71 plain 2: {"spend":0.0002353,"prompt_tokens":257,"completion_tokens":101,"usage_at_list_price":7.62e-05,"spend_over_usage_price":3.09}
C71s streamed 2: {"spend":0.0002289,"prompt_tokens":263,"completion_tokens":177,"usage_at_list_price":0.0001148,"spend_over_usage_price":1.99}

C72 a replay after a client tool search loaded a member whose full name is over 64 characters

  1. Send the requests in cases29.sh as the Before section says. At 33488a3 turn 2 answered 400 whenever it reached the worker that served turn 1. The commands and whole output, with what /live-pr-risk ran at 33488a3, are in c72.md in the gist
### C72 tally of every turn 2 above, by model and transport
6 gemini-flash plain completed
4 gemini-flash streamed response.completed
2 gemini-flash streamed response.failed
{"type":"response.failed","status":"failed","error":"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid value at 
{"type":"response.failed","status":"failed","error":"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid value at 

C73 and C74 the sync success callback and per-chunk stream hooks

  1. Run both scripts on the head. At b424db6 the success callback and the per-chunk hooks see the full name. At bdfb7a0 the success callback saw mcp__codex_apps__codex_document_control_sync_prev__get__97436ba4, and at cd3be2d the per-chunk hooks saw mcp__codex_apps__codex_document_control_stream_prev__ge_46bc0eb4. The outputs are in c73.md and c74.md

C75 a Vertex project and location URL as api_base

  1. Run cases30.sh. C75a sends /v1/responses to proxy A for a deployment whose api_base is https://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/global, and C75b sends /v1/chat/completions to proxy B for one whose api_base is the stand-in gateway with /google-vertex/v1/projects/PROJECT_ID/locations/global/endpoints/openapi?tenant=a. Both answer 200, and the gateway logs the Meta responses path under that project and location. Before e3d6e52 both got a doubled /v1/projects/... path. Commands and output are in c75.md in the gist

Observations

  • Small max_tokens go to reasoning, vendor behavior
  • Messages stream usage comes in message_delta, not message_start
  • File search replies report only the final call's usage, pre-existing
  • Gemini refuses some streamed-turn replays, pre-existing

Type

🆕 New Feature

Caveats (if any)

Low

  • Wonder and Spark report max_tokens 1048576, their input limit, since Google publishes no output limit and get_model_info falls back to max_input_tokens for every model without one
  • A pre-existing gap went to security engineering
  • The optional OSV Scan flags picomatch, a new advisory with no fix that fails other PRs' scans too (run)
Decisions
  • A non-global vertex_location answers 400, or is ignored under drop_params. Honoring it is impossible because Muse is served from global only, and ignoring it silently would hide a misconfigured deployment. Env and module-level location defaults are not read, since they configure the other Vertex models

  • The chat and messages bridge forwards vertex_project, vertex_location and vertex_credentials from the deployment, preferring them over the vertex_ai_* aliases, in the same order the Vertex credential helpers read them. It does this for Vertex Muse models only, so other bridged Vertex models keep today's region, project and credentials. Forwarding for every bridged Vertex model was rejected because it would move existing deployments on upgrade

  • background and previous_response_id answer 400, or are dropped under drop_params, because Muse keeps no server-side state. store=true answers 400, or is sent as store=false under drop_params. Replaying earlier turns from spend logs, as the Responses-to-chat bridge does, was rejected because Muse already speaks Responses natively, and replay needs a database and silently rebuilds context the caller asked the provider to hold

  • Under drop_params, required and named tool choices become auto, and none removes the offered tools. Without it they answer 400. Relaxing a forced choice does not guarantee a tool call

  • Under drop_params, an allowed_tools tool choice becomes auto, so the model may call any offered tool, the same as LiteLLM's shared allowed_tools handling for other providers. Without it the choice answers 400. Trimming tools to the allowed subset was rejected because no other provider does it and it would change which tools the caller offered

  • Token counting answers 400 naming the model, the convention for Vertex partner models with no count route, since Vertex has no Muse count endpoint. A custom_tokenizer still counts locally. Estimating with a generic tokenizer was rejected because its counts would not match what Muse bills

  • Muse chat advertises only the params the Responses bridge forwards and Vertex accepts. Others, like stop, seed, n and logprobs, answer 400, or are dropped under drop_params, instead of being dropped silently. allowed_openai_params lifts that 400, as it does for every provider. The shared chat-to-Responses bridge then drops a lifted param that has no Responses field, such as seed or presence_penalty, as it does for every bridged model, and sends the rest as asked, so Vertex answers 400 for background. Changing the bridge was rejected because it would change every bridged model

  • truncation other than disabled answers 400, or is dropped under drop_params, since Vertex accepts only disabled

  • A reasoning effort the model's catalog row marks unsupported answers 400, or is dropped under drop_params while the rest of reasoning is kept. The rows follow live Vertex calls on November 14, 2026, where none was refused on all three models and max on Wonder and Spark. Mapping a refused effort to the nearest accepted one was rejected because it would change the reasoning budget the caller asked for

  • An api_base ending in /publishers/meta/v1 gets /responses added, and one ending in /publishers/meta/v1/responses is used as is, since Google's guide shows that URL. A base that already names a project and location, such as .../v1/projects/<project>/locations/global, keeps them and gets /publishers/meta/v1/responses in place of anything after the location, such as /endpoints/openapi, since only that path serves Muse. Adding the default path after it was rejected because it repeated /v1/projects/.... The match ends at the last project and location in the path, with or without /v1/ before it, so a gateway prefix such as /gw/projects/team-a/locations/eu counts as one. Requiring /v1/ was rejected because that gateway would get /v1/projects/... added again. A location written in api_base is sent as is and skips the global-only check, since Vertex's global host answered 200 for a us-central1 path while the regional hosts answered 404 or 400 (c75.md). Other bases keep the existing path grafting

  • When the Responses-to-chat bridge joins a namespace and a member as {namespace}__{member} and the result is longer than 64 characters, it uses the existing truncate_tool_name shortening (a 55-character prefix, _ and an 8-character hash) and maps the name back in the response and in a forced tool_choice. This applies to every provider behind the bridge, since chat APIs like OpenAI's and Vertex's cap tool names at 64 and Codex signed in with ChatGPT sends longer MCP names. Shortening only for providers with that cap was rejected because the bridge has no per-provider name limit, and the model still gets each tool's description

  • This covers the Meta publisher only, matched on the meta/muse- prefix, so a vertex_ai/muse-* name without meta/ keeps its existing path. Taking the publisher from the model prefix for every Vertex Responses publisher, as [Feature]: Support Vertex AI partner models served via publisher Responses API (Meta Muse, OpenAI GPT 6.x, ...) in vertex_ai/ provider #51074 item 4 suggests, was rejected for now because no other publisher could be tested live, and their params and endpoints differ

  • Muse requests with tools other than function and namespace, or with a namespace member other than a function, including one with no type, answer 400 before anything is sent to Vertex, naming the refused types, the same as other unsupported params. Under drop_params those tools and members are dropped, a namespace is dropped when none of its members are left, and tools is dropped when none are left. Vertex answers 400 for web_search, local_shell, mcp and custom tools, and Codex over /v1 sends web_search by default. file_search is not refused, since LiteLLM's emulated file search turns it into a function that the proxy runs itself, as it does for other providers. Turning the other built-ins into function tools was rejected because nothing would run them

  • When the bridge shortens a namespace member's full {namespace}__{member} name for the provider, the rest of the proxy keeps the full name. A tool policy on the full name still blocks the tool, the tool registry, the per-tool logs and the spend logs record the full name, as the merge base did, a Headroom retrieve result in Responses input is still held back from compression, a top-level function with that name is still rejected as a collision, and a replayed function_call that carries the full name without a namespace maps to the shortened name

  • Two namespace members whose {namespace}__{member} names shorten to the same name answer 400, the same as other flattened name collisions such as a top-level function named like a member's full name, since a call to that name could not be mapped back to one member and the client can rename the tools. The merge base sent both members because it did not shorten names, and answered 500 for the other flattened name collisions. These checks run only in the bridge, which sends the shortened names. A request guardrail scans the full {namespace}__{member} names, as the merge base does, and replayed calls in its messages carry the same names. gpt-5.6 and Muse get the namespaces as declared. When a guardrail returns tools whose full name it was shown more than once, which needs a top-level function or another namespace member with the same full name, each returned tool is matched to an original by content in any order, first exactly, then ignoring descriptions, then in order among the tools still unmatched, with null fields, strict: false and empty descriptions counted as absent. A returned tool left over after that goes out as a new tool. When fewer tools come back than the originals still unmatched and a namespace member is among those originals, the request answers 500 rather than going out with a tool the guardrail dropped. When they are all top-level functions that differ only in fields the guardrail cannot see, such as strict left out or set to false, the guardrail's own tool goes out instead of a guess at one of them. The merge base answered 500 when a top-level function shared a namespace member's full name and matched the rest by position, which for some requests sent the tool the guardrail dropped. Matching by position alone was rejected because a guardrail that reordered, replaced or dropped tools got one tool's name sent with another's description, and taking the first match was rejected for the same reason. A logging_only guardrail whose request rewrite cannot be applied still scans and logs the response, on chat, messages and Responses alike, so the guardrail service gets one more call and the spend log one more guardrail entry, with the same response to the client. The merge base skipped that scan. Keeping the skip was rejected because the response still reaches the client and a logging_only guardrail is there to record what passed through

  • Muse returns a call to a namespace member as one function named {namespace}.{member} with no namespace field, in JSON and streamed replies. The adapter splits that name back only when the request declared that namespace with that member. Splitting every dotted name was rejected because Muse also accepts dotted names for top-level functions, so a declared top-level weather.get_weather would be renamed

  • A call replayed from a row rebuilt from cold storage, whose stored request holds the provider-shaped model_parameters.tools, is renamed to its shortened name only when those tools declare the shortened name and not the full one. Other rows keep the stored name, as the merge base does. Always keeping it was rejected because the worker's tool call cache adds the shortened call back and Gemini answers 400

Final Attestation

  • Live inference proof and external review gates are complete.
Bugbot summary

[!NOTE]
Medium Risk
Touches core routing, Responses↔chat bridging, spend/guardrail paths, and tool naming for all bridged models—not only Muse—so regressions could affect billing, logging, and tool policies at scale.

Overview
Adds native Vertex AI Responses routing for Meta Muse models (meta/muse-*), including catalog pricing, a dedicated VertexAIMuseResponsesAPIConfig (auth, URL shaping, param/tool validation with drop_params), and treating Muse as responses-only so chat still bridges correctly.

Alongside that, it hardens long and namespaced tools across the Responses↔chat bridge: centralized truncation (truncate_tool_name), qualified member naming, logging of litellm_bridged_tool_names, renaming tool calls in logged output, and replay/session history that respects shortened vs full names. Proxy spend and tool registry now index the full tool names when the bridge shortened them.

Guardrails get smarter tool merge/write-back (content-based matching, UnappliableRequestRewrite suppressed in logging-only mode), Headroom retrieve pairing on raw Responses input, and the completion bridge now streams already-completed Responses results while preserving precomputed response_cost.

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

@emerzon emerzon changed the title feat(vertex_ai): add native Responses support for Meta Muse models feat(vertex_ai): Add support to GCP Meta Muse models Nov 10, 2026
@emerzon
emerzon marked this pull request as ready for review November 10, 2026 01:07
@veria-ai

veria-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 4 · PR risk: 0/10

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge, with no new actionable findings confirmed.

Summary

Adds native Vertex AI Responses support for Meta Muse models, including catalog prices, Google credentials, parameter checks, streaming, and chat/messages bridging. Shared bridge changes preserve full namespace tool names in callbacks, logs, policies, and replay.

No new actionable findings were confirmed. The previous-review commits have different merge bases, so the full PR was reviewed.

Prior decisions remain recorded. mateo-berri accepted forcing Responses because Muse has no chat endpoint and accepted unset output limits because Google publishes none. Greptile withdrew the raw extra_body concern and the narrow client-search collision finding after discussion with mateo-berri.

  • Vertex AI callers can use Meta Muse models through LiteLLM.
  • Long namespace tool names stay usable across chat calls and their records.
  • Responses guardrails keep tool identities when tools change or move.
  • Completed Responses results can stream with their cost attached.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Chat[Chat Completions] --> Bridge[Responses bridge]
    Messages[Anthropic Messages] --> Chat
    Bridge --> Adapter[Vertex Muse adapter]
    Responses[Responses API] --> Adapter
    Adapter --> Vertex[Vertex Meta Responses endpoint]
    Vertex --> Adapter
    Adapter --> Result[Response or stream with usage]
Loading

Reviews (33) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread examples/vertex_muse.md Resolved
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri mateo-berri changed the title feat(vertex_ai): Add support to GCP Meta Muse models feat(vertex_ai): add Meta Muse models on Vertex AI Nov 14, 2026
@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 45 untouched benchmarks


Comparing emerzon:litellm_vertex_muse_models (53d8567) with main (4d512ca)

Open in CodSpeed

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/responses/bridge_check.py Resolved
Comment thread model_prices_and_context_window.json Resolved
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

3 similar comments
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

1 similar comment
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

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

Stale Bugbot comment from a previous run.

# Conflicts:
#	litellm/llms/anthropic/messages/adapters/transformation.py
# Conflicts:
#	litellm/completion_extras/litellm_responses_transformation/handler.py
# Conflicts:
#	litellm/responses/litellm_completion_transformation/session_handler.py
#	litellm/responses/litellm_completion_transformation/transformation.py
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

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

Stale Bugbot comment from a previous run.

# Conflicts:
#	litellm/completion_extras/litellm_responses_transformation/handler.py
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

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

Stale Bugbot comment from a previous run.

# Conflicts:
#	tests/unit/completion_extras/litellm_responses_transformation/test_completion_extras_litellm_responses_transformation_transformation.py
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@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 fce1cc6. Configure here.

@mateo-berri mateo-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 for the contribution!

@mateo-berri
mateo-berri merged commit 4420a5a into BerriAI:main Nov 21, 2026
53 checks passed
yujonglee-berri added a commit that referenced this pull request Nov 21, 2026
#50768 annotated two cold storage helpers with "SpendLogsPayload" after #52768
had dropped that import, so ruff fails with F821 on main and on every PR. The
helpers only read the spend log with .get() and their caller passes a
Mapping[str, object], so they take that type instead of the TypedDict.
yujonglee-berri added a commit that referenced this pull request Nov 21, 2026
…#53430)

#50768 annotated two cold storage helpers with "SpendLogsPayload" after #52768
had dropped that import, so ruff fails with F821 on main and on every PR. The
helpers only read the spend log with .get() and their caller passes a
Mapping[str, object], so they take that type instead of the TypedDict.
yuneng-berri added a commit that referenced this pull request Nov 21, 2026
…ops failing on main (#53436)

#50768 merged code that names SpendLogsPayload after #52768 removed that
import, so ruff check reports F821 on main and fails the lint job on every
PR that merges main. Use Mapping[str, object] like the rest of the module.
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.

2 participants