Repository navigation
feat(vertex_ai): add Meta Muse models on Vertex AI - #50768
Conversation
[High impact] The PR appears safe to merge, with no new actionable findings confirmed.
|
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
3 similar comments
1 similar comment
|
bugbot 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
|
bugbot run |
# Conflicts: # litellm/completion_extras/litellm_responses_transformation/handler.py
|
bugbot run |
# Conflicts: # tests/unit/completion_extras/litellm_responses_transformation/test_completion_extras_litellm_responses_transformation_transformation.py
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fce1cc6. Configure here.
mateo-berri
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution!
…#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.
Handwritten 1-3 sentence description
Add native Responses support for Meta Muse models
Details
TLDR
Problem this solves
How it solves it
meta/muse-*models to Vertex's Meta Responses endpoint or a customapi_basedrop_paramsEndpoint 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, andvertex_ai/meta/muse-spark-1.3to 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.
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 existingdrop_paramspolicy on both the Responses API and the Chat Completions bridge. Without that opt-in, unsupported choices raiseUnsupportedParamsErrorbefore provider I/O. With it,requiredand named choices becomeauto, keeping the offered tools.nonebecomesautoand removes the tools, so the model cannot call an offered function. Omitted choices stay omitted. As with LiteLLM's existing helper, globally enableddrop_params=Truealso enables normalization; a per-requestFalsedoes 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
vertex_ai/meta/muse-ember-1.0to the proxy config asmuse-ember-1.0withvertex_location: globaland Google service account credentialsPOST http://<proxy>/v1/chat/completionswith{"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}Unknown partner model: meta/muse-ember-1.0.POST /v1/responsesandPOST /v1/messagesfail too, and so do Wonder 1.0 and Spark 1.3After, the same developer gets normal answers from all three Muse models on chat completions, responses and messages, with the cost tracked
vertex_ai/meta/muse-ember-1.0to the proxy config asmuse-ember-1.0withvertex_location: globaland Google service account credentialsPOST http://<proxy>/v1/chat/completionswith{"model":"muse-ember-1.0","messages":[{"role":"user","content":"hi"}],"max_tokens":16}x-litellm-response-costheaderPOST http://<proxy>/v1/responseswith{"model":"muse-ember-1.0","input":"hi"}, streamed and not, and get HTTP 200 with aresp_...response or aresponse.completedeventPOST http://<proxy>/v1/messageswith an Anthropic-shaped body and get HTTP 200 with amessageresponseGET http://<proxy>/spend/logs?request_id=<id>and see each request under the configured model with its costRelevant 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
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 modelunless the row says otherwiseLast 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
C10 to C45 and C75 results
noneC27 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.mdin the gistC27 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.mdin the gist). The before leg fails every Muse call, so it has no expiry caseEarlier /live-pr-risk findings and their fixes are in
history.md,replay.md,c70.mdandc72.mdin the gist. At cd3be2d it left one open row, per-chunk stream hooks seeing the shortened name, which cce8839 fixes (lpr17.mdandc74.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.mdtolpr23.md)Focused validation command
The PR author's focused test command. At fa20c18 it passes 1,620 tests
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.mdin this gist. No proxy had Google ADC or a project env var, so calls used deployment credentialsThe case scripts and both legs' full output are in this gist, as
before.mdandafter.md. C35 and C36 go throughgateway.py, a stand-in gateway on port 28887 that prints each request's path and query, removes/google-vertexand thetenantquery, and forwards the rest to aiplatform.googleapis.com. Each leg rancases10.shandcases11.shfirst. The after leg then ranround2.sh(which runscases.sh,cases2.sh,cases4.shandcases5.sh),cases6.sh,cases7.sh,cases8.sh, thencases3.shwithCALL_IDSset to thex-litellm-call-idvalues from C1, C3, C5 and C6. The before leg ran that same sequence at this merge base in the previous round. C34 drivesws_case.py, a Pythonwebsocketsclient that sends oneresponse.createevent. Each case printed its command withprintf '$ %s\n'and then ran that same string witheval. Both legs then rancases13.sh(C39 to C45),codex_tui.sh(C46) andfc_run.sh, which runsforced_choice.pywith each tree's Python (C47). C48 runscodex_tui_v1.sh. C49 runscases14.sh policyon proxy A, which stores the policy in the leg's database, then starts a third proxy from the leg's tree withguard_boot.shandguard.yaml(thetool_policyguardrail, 2 workers, the leg's database) and runscases14.shagainst it. C50 runscases15.shagainst that third proxy. C51 runscodex_mcp.sh, which starts Codex withweather_server.pyas an MCP server, thencases16.shagainst 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 withPROJECT_IDBefore (89e0f3b)
C1 the reporter's chat request
C2 to C45 before
The before leg's C2 to C45 commands and output are in
before.mdin this gist, since they do not fit GitHub's body limit beside the after leg. Every case there fails with 500Unknown partner model, except C6, C7, C24, C42 and C43 with 400 forreasoning_effort, C19a, which prints 0 for both proxies as on the after leg, C31, where token counting gets Vertex's 404 for acount-tokensmodel, C32, which gets Vertex's 404 as on the after leg, C34, whose WebSocket gets anUnknown partner modelerror event, and C37, which showsNone. C10 lists the 5 calls as failure rows at $0C46 to C75 before
C46 Codex TUI on muse-ember-1.0
codex_tui.shpointing itslitellmmodel provider at proxy A's/backend-api/codexand the modelmuse-ember-1.0Run the shell command: echo QA_TOOL_OK. Then reply with its output only.and press EnterC47 litellm.responses with a forced tool_choice on a namespace member whose joined name is 67 characters, anthropic/claude-haiku-5-5
C48 Codex TUI over /v1 with drop_params
codex_tui_v1.shpointing itslitellmmodel provider at proxy A's/v1with an API key, and the modelmuse-ember-1.0-dropparams, a deployment withdrop_params: trueRun the shell command: echo QA_TOOL_OK. Then reply with its output only.and press EnterC49a block mcp__codex_apps__github_enterprise_connector_prod__delete_repository (68 characters) through proxy A
C49b, C49c, C50 and C50b tool policy and shortened namespace members, claude-haiku-5-5
cases14.shandcases15.shto the third proxy, started from the leg's tree withguard.yaml. Their commands and raw output are inc49.mdin the gistC51 Codex TUI over /v1 calls an MCP tool on muse-spark-1.3
codex_mcp.shpointing itslitellmmodel provider at proxy A's/v1with an API key, the modelmuse-spark-1.3, andweather_server.pyas theweatherMCP server, whoseget_weathertool returns a code wordUse the weather MCP tool to get the weather in Paris, then tell me the code word it returns.and press EnterC52 tool policy on, colliding shortened names, gpt-5.6 and muse-spark-1.3
cases17.shto the fourth proxy, started from the leg's tree withguard2.yaml(gpt-5.6, muse-spark-1.3 and the tool_policy guardrail on by default). Their commands and raw output are inc52.mdin the gistC53 a guardrail service drops or edits tools sharing a chat name, gpt-5.6 and muse-spark-1.3
cases18.shandcases20.shto the fifth proxy, started from the leg's tree withguard3.yaml(gpt-5.6, muse-spark-1.3 and a generic_guardrail_api guardrail on by default, pointed attool_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 inc53.mdin the gistC53f, 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
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 withguard4.yaml(the same guardrail service inlogging_onlymode), then read C55's spend log from the sixth proxy. Their commands and raw output are inc53.mdin the gistC57 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
cases22.shto the fifth proxy, whose guardrail service also drops a tool whose description holds REPLACEME and adds a function with the same name and parameters. Onlymcp__docs'sget_documentfetches documents starting with N, the ones the prompt asks for. Their commands and raw output are inc57.mdin the gistC60 a namespace member over 64 characters in the tool list, tool detail and tool logs, claude-haiku-5-5
cases23.shto the third proxy. The namespace ends in the leg's name, so each leg starts with no row for it. The model callsmcp__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}/detailand/v1/tool/{name}/logsfor it. Their commands and raw output are inc60.mdin the gistC61 Muse with
web_searchbeside a function tool, without and with drop_paramscases24.shto proxy A. Their commands and raw output are inc61.mdin the gistC62 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
cases25.shto the seventh proxy, started from the leg's tree withguard5.yaml(claude-haiku-5-5, gemini-flash, the tool_policy guardrail andstore_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 bothlitellm_bridged_tool_namesandfull_tool_names, then read the spend log and the tool detail. Their commands and raw output are inc62.mdin the gistC65 Muse with a namespace holding a function and a custom member, without and with drop_params
cases26.shto proxy A. Their commands and raw output are inc65.mdin the gistC66 to C69 a client name map on a failed call, a replayed turn after a long member call, and Muse tools Vertex refuses
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 withprevious_response_id, streamed and not. Each line below is cut at 300 characters. Their commands and whole output, at 7e46e6e too, are inc66.mdin the gistC70 and C71 replays of a namespace sent in
additional_tools, and the spend of streamed file searchcases28.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 anadditional_toolsinput item, as Codex does, and the model calls its member, whose full name is over 64 characters. Turn 2 replays it withprevious_response_id, twice plain and twice streamed. C71 sends muse-ember-1.0 with drop_params a requiredfile_search, plain and streamed, twice each, and compares each spend log row'sspendwith its tokens at the/model/infoprices. 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 inc70.mdin the gistThe whole output of both cases is in
c70.mdin the gist, since it does not fit GitHub's body limit beside C75C72 a replay after a client tool search loaded a member whose full name is over 64 characters
cases29.shto the seventh proxy, three rounds on gemini-flash. Turn 1 carries a clienttool_search_calland itstool_search_output, which loads a namespace whose member's full name is over 64 characters, and the model calls that member. Turn 2 sendsprevious_response_idand only the tool output, plain and streamed, each with and without thetool_searchtool sent again. Every streamedresponse.failedon both legs is the same Gemini 400 oncontents[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 inc72.mdin the gistC73 and C74 a sync SDK success callback and per-chunk stream hooks on a namespace member whose full name is over 64 characters
sync_callback.pyandstream_callback.pywith this tree's litellm. Each makes a synclitellm.responsescall to gemini-flash with a user-writtenCustomLogger, one namespace whose member's full name is over 64 characters, andtool_choicerequired, the second one streamed. The success callback and the per-chunk hooks see the full name. The scripts, commands and output are inc73.mdandc74.mdin the gistC75 a Vertex project and location URL as api_base
cases30.shas the After section says. Both calls answer 500Unknown partner model(c75.mdin the gist)After (b424db6)
C1 the reporter's chat request
C2 to C75 after
C2 to C45 commands and output are in
after.mdin this gist, since they do not fit GitHub's body limit, and the table above has each result. Every case below ran at b424db6C46 Codex TUI on muse-ember-1.0
codex_tui.shpointing itslitellmmodel provider at proxy A's/backend-api/codexand the modelmuse-ember-1.0Run 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 boxC47 litellm.responses with a forced tool_choice on a namespace member whose joined name is 67 characters, anthropic/claude-haiku-5-5
C48 Codex TUI over /v1 with drop_params
codex_tui_v1.shpointing itslitellmmodel provider at proxy A's/v1with an API key, and the modelmuse-ember-1.0-dropparams, a deployment withdrop_params: trueRun 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 sandboxC49a block mcp__codex_apps__github_enterprise_connector_prod__delete_repository (68 characters) through proxy A
C49b to C50b tool policy and colliding shortened names, claude-haiku-5-5
cases14.shandcases15.shto the third proxy, started from the leg's tree withguard.yaml. Each line below is cut at 300 characters. Their commands and whole output are inc49.mdin the gistC51 Codex TUI over /v1 calls an MCP tool on muse-spark-1.3
codex_mcp.shpointing itslitellmmodel provider at proxy A's/v1with an API key, the modelmuse-spark-1.3, andweather_server.pyas theweatherMCP server, whoseget_weathertool returns a code wordUse the weather MCP tool to get the weather in Paris, then tell me the code word it returns.and press EnterCodex sends an MCP tool as a namespace, here
mcp__weatherwith the memberget_weather. C51a to C51d send that shape with curlC51a to C51d namespaced function calls on muse-spark-1.3, plain, streamed, dotted and replayed
cases16.shto proxy A. Their commands and whole output are inafter.mdin the gistC52 to C59 guardrail cases, gpt-5.6 and muse-spark-1.3
cases17.sh,cases18.shandcases20.shtocases22.shto the fourth, fifth and sixth proxies, as the Before section says. Their commands and raw output at b424db6 are inc52.md,c53.mdandc57.mdin the gist, and every status code and tool list matches 9d957b9C60 a namespace member over 64 characters in the tool list, tool detail and tool logs, claude-haiku-5-5
cases23.shto the third proxy. The namespace ends in the leg's name, so each leg starts with no row for it. The model callsmcp__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}/detailand/v1/tool/{name}/logsfor it. Their commands and raw output are inc60.mdin the gistC61 Muse with
web_searchbeside a function tool, without and with drop_paramscases24.shto proxy A. Their commands and raw output are inc61.mdin the gistC62 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
cases25.shto the seventh proxy, started from the leg's tree withguard5.yaml(claude-haiku-5-5, gemini-flash, the tool_policy guardrail andstore_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 bothlitellm_bridged_tool_namesandfull_tool_names, then read the spend log and the tool detail. Their commands and raw output are inc62.mdin the gistC65 Muse with a namespace holding a function and a custom member, without and with drop_params
cases26.shto proxy A. Their commands and raw output are inc65.mdin the gistC66 to C69 a client name map on a failed call, a replayed turn after a long member call, and Muse tools Vertex refuses
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 withprevious_response_id, streamed and not. Each line below is cut at 300 characters. Their commands and whole output, at earlier heads too, are inc66.mdin the gistC70 and C71 replays of a namespace sent in
additional_tools, and the spend of streamed file searchcases28.shas the Before section says. The commands and whole output, at earlier heads too, are inc70.mdin the gistC72 a replay after a client tool search loaded a member whose full name is over 64 characters
cases29.shas 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 inc72.mdin the gistC73 and C74 the sync success callback and per-chunk stream hooks
mcp__codex_apps__codex_document_control_sync_prev__get__97436ba4, and at cd3be2d the per-chunk hooks sawmcp__codex_apps__codex_document_control_stream_prev__ge_46bc0eb4. The outputs are inc73.mdandc74.mdC75 a Vertex project and location URL as api_base
cases30.sh. C75a sends/v1/responsesto proxy A for a deployment whoseapi_baseishttps://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/global, and C75b sends/v1/chat/completionsto proxy B for one whoseapi_baseis 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 inc75.mdin the gistObservations
Type
🆕 New Feature
Caveats (if any)
Low
max_tokens1048576, their input limit, since Google publishes no output limit andget_model_infofalls back tomax_input_tokensfor every model without onepicomatch, a new advisory with no fix that fails other PRs' scans too (run)Decisions
A non-global
vertex_locationanswers 400, or is ignored underdrop_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 modelsThe chat and messages bridge forwards
vertex_project,vertex_locationandvertex_credentialsfrom the deployment, preferring them over thevertex_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 upgradebackgroundandprevious_response_idanswer 400, or are dropped underdrop_params, because Muse keeps no server-side state.store=trueanswers 400, or is sent asstore=falseunderdrop_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 holdUnder
drop_params,requiredand named tool choices becomeauto, andnoneremoves the offered tools. Without it they answer 400. Relaxing a forced choice does not guarantee a tool callUnder
drop_params, anallowed_toolstool choice becomesauto, 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. Trimmingtoolsto the allowed subset was rejected because no other provider does it and it would change which tools the caller offeredToken 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_tokenizerstill counts locally. Estimating with a generic tokenizer was rejected because its counts would not match what Muse billsMuse chat advertises only the params the Responses bridge forwards and Vertex accepts. Others, like
stop,seed,nandlogprobs, answer 400, or are dropped underdrop_params, instead of being dropped silently.allowed_openai_paramslifts 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 asseedorpresence_penalty, as it does for every bridged model, and sends the rest as asked, so Vertex answers 400 forbackground. Changing the bridge was rejected because it would change every bridged modeltruncationother thandisabledanswers 400, or is dropped underdrop_params, since Vertex accepts onlydisabledA reasoning effort the model's catalog row marks unsupported answers 400, or is dropped under
drop_paramswhile the rest ofreasoningis kept. The rows follow live Vertex calls on November 14, 2026, wherenonewas refused on all three models andmaxon Wonder and Spark. Mapping a refused effort to the nearest accepted one was rejected because it would change the reasoning budget the caller asked forAn
api_baseending in/publishers/meta/v1gets/responsesadded, and one ending in/publishers/meta/v1/responsesis 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/responsesin 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/eucounts as one. Requiring/v1/was rejected because that gateway would get/v1/projects/...added again. A location written inapi_baseis 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 graftingWhen 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 existingtruncate_tool_nameshortening (a 55-character prefix,_and an 8-character hash) and maps the name back in the response and in a forcedtool_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 descriptionThis covers the Meta publisher only, matched on the
meta/muse-prefix, so avertex_ai/muse-*name withoutmeta/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 differMuse requests with tools other than
functionandnamespace, 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. Underdrop_paramsthose tools and members are dropped, a namespace is dropped when none of its members are left, andtoolsis dropped when none are left. Vertex answers 400 forweb_search,local_shell,mcpand custom tools, and Codex over/v1sendsweb_searchby default.file_searchis 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 themWhen 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 replayedfunction_callthat carries the full name without anamespacemaps to the shortened nameTwo 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: falseand 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 asstrictleft 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. Alogging_onlyguardrail 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 alogging_onlyguardrail is there to record what passed throughMuse returns a call to a namespace member as one function named
{namespace}.{member}with nonamespacefield, 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-levelweather.get_weatherwould be renamedA 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 400Final Attestation
Bugbot summary