google-vertex/claude-sonnet-5-5: second turn 400 messages.N.output_config: Extra inputs are not permitted (per-message effort on Vertex)
Description
Summary
Follow-up to #13795 (fixed by f868f0230 / #13797). With google-vertex/claude-sonnet-5-5, the first request works now, but the second message in the session fails with HTTP 400. omp adds a mid-conversation role: "system" control message that carries output_config.effort, and lists the mid-conversation-output-config-2026-07-01 beta in the body's anthropic_beta. Vertex AI rejects output_config on messages.
Environment
- omp: 18.4.8
- OS: macOS (darwin 27.0.0, arm64)
- Provider:
google-vertex, apianthropic-messages - Model:
claude-sonnet-5-5@default
Error
400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2.output_config: Extra inputs are not permitted"},"request_id":"req_vrtx_011CfbQYRD5YNgD8WLnLi9Wh"}Request (relevant parts, from the saved HTTP 400 log)
POST https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/publishers/anthropic/models/claude-sonnet-5-5@default:streamRawPredict/v1/messages{
"model": "claude-sonnet-5-5@default",
"anthropic_beta": [
"mid-conversation-system-clear-at-2026-08-21",
"mid-conversation-tool-changes-2026-07-01",
"mid-conversation-output-config-2026-07-01"
],
"thinking": { "type": "adaptive", "display": "summarized" }, // block_binding is gone, so the #13795 fix works
"max_tokens": 128000,
// no top-level output_config
"messages": [
{ "role": "user", "content": [ {"type":"text"}, {"type":"text"} ] },
{ "role": "assistant", "content": [ {"type":"text"} ] },
{ "role": "system", "content": [], "output_config": { "effort": "high" } }, // <- messages.2, rejected
{ "role": "user", "content": [ {"type":"text"} ] }
]
}Steps to reproduce
- Set up Vertex AI credentials for omp.
- Pick
google-vertex/claude-sonnet-5-5. - Send a prompt. The reply comes back fine.
- Send a second prompt. It returns the 400 above.
Expected
omp should only emit per-message effort controls (role: "system" + output_config) and the mid-conversation-output-config-2026-07-01 beta for provider/model pairs that accept them. On Vertex it should leave both out, and the second turn should go through.
Actual
omp sends the per-message effort control on Vertex, and Vertex rejects the whole request.
Root cause analysis (on main @ 6e4ac4a1a)
Catalog compat enables per-message effort on Vertex.
packages/catalog/src/compat/rules/classes/anthropic.kdl, blockon "anthropic" "cloudflare-ai-gateway" "google-vertex"(L80-124), setssupports-per-message-effort #truefor:sonnet >=5.5(L106-113) ← this reportopus >=5(L120-122)fable >=5.1,mythos >=5.1(L87-89, L97-99)
#13797 moved only
supports-thinking-binding-controlsout of the Vertex scope (L125-133). Its regression test (packages/catalog/test/model-thinking.test.ts, "keeps Sonnet 5.5 binding controls off Vertex…") even assertsexpect(vertex.compat.supportsPerMessageEffort).toBe(true). That assertion pins the broken behavior.That flag conflicts with Vertex's own effort gate.
packages/catalog/src/compat/rules/providers/google-vertex.kdl:13setssupports-output-effort #false, because Vertex rawPredict can't takeoutput_config.effort(#5614). SobuildParamsdrops top-level effort:anthropic.ts:4825writeseffortPlan.topLevelonlyif (model.compat.supportsOutputEffort). Per-message effort has no such gate:planAnthropicEffortControls(…, model.compat.supportsPerMessageEffort === true, …)(anthropic.ts:4786-4792, function at L4398) puts effort control markers into the history whenever the effort in force changes from the recorded tail (L4434-4440).convertAnthropicMessagesturns each marker into{ role: "system", content: [...], output_config: { effort } }(anthropic.ts:5112-5118; also the developer-message path at L5436 and L5449, gated onsupportsPerMessageEffortat L5421).resolveAnthropicControlBetas(anthropic.ts:257-267) addsmid-conversation-output-config-2026-07-01whensupportsPerMessageEffortis set. For Vertex rawPredict it goes into the bodyanthropic_beta(L4849-4851, L4881).
The first request has no recorded controls, so no marker gets inserted and it succeeds. From the second request on, the planner replays or inserts a control and Vertex returns the 400.
Why exactly the planner inserted
effort: "high"at index 2 here (instead of finding the effort unchanged) isn't confirmed. [INFERENCE] The turn-1 record's tail was different from turn 2's effort. Either way, on Vertex any inserted control fails, because the top-level effort it is meant to differ from never gets sent.
Suggested fix
- In
classes/anthropic.kdl, dropsupports-per-message-effortfrom thegoogle-vertexscope: move it into anon "anthropic" "cloudflare-ai-gateway"block, the same way #13797 did for binding controls. That covers sonnet ≥5.5, and very likely opus ≥5 / fable ≥5.1 / mythos ≥5.1 too, since the samesupports-output-effort #falsereasoning applies to them on Vertex. Regeneraterules.json, then rebake the affectedgoogle-vertexrows inmodels.json. - Alternatively or also: in
anthropic.ts, gate per-message effort onsupportsOutputEffort, i.e. passsupportsPerMessageEffort && supportsOutputEfforttoplanAnthropicEffortControlsand use the same condition inresolveAnthropicControlBetasand the developer-param path at L5421. A per-message effort control makes no sense on a route that can't carry top-level effort. This would also stop the next provider withsupports-output-effort #falsefrom hitting the same 400. - Flip the assertion in
model-thinking.test.tstoexpect(vertex.compat.supportsPerMessageEffort).toBe(false). - Check whether
supports-mid-conversation-tool-changes/supports-turn-scoped-systemhold up on Vertex Sonnet 5.5. Their betas ride in the same request, and they'd be the next suspects once tool changes or turn-scoped system messages show up mid-session. Not observed failing yet.
Notes
- Not verified whether
google-vertex/claude-opus-5-5hits the same 400 on a turn that inserts an effort control. It has the samesupports-per-message-effort #trueon Vertex, so [INFERENCE] it probably does. - Full raw request is available on request (local log
~/.omp/logs/http-400-requests/1790852660756-3ikvpy30224au.json, with credentials removed).
Platform
macOS
omp version
18.4.8
Provider
google-vertex
Area
Providers (anthropic-messages request shaping / catalog compat)
Source: can1357/oh-my-pi