#13994·oh-my-pi

google-vertex/claude-sonnet-5-5: second turn 400 messages.N.output_config: Extra inputs are not permitted (per-message effort on Vertex)

Author: sFritsch09Created Oct 1, 2026Updated Oct 1, 2026
Labelsbugprovidersprio:p1triagedprovider:google-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, api anthropic-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
jsonc
{
  "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

  1. Set up Vertex AI credentials for omp.
  2. Pick google-vertex/claude-sonnet-5-5.
  3. Send a prompt. The reply comes back fine.
  4. 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)

  1. Catalog compat enables per-message effort on Vertex. packages/catalog/src/compat/rules/classes/anthropic.kdl, block on "anthropic" "cloudflare-ai-gateway" "google-vertex" (L80-124), sets supports-per-message-effort #true for:

    • sonnet >=5.5 (L106-113) ← this report
    • opus >=5 (L120-122)
    • fable >=5.1, mythos >=5.1 (L87-89, L97-99)

    #13797 moved only supports-thinking-binding-controls out 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 asserts expect(vertex.compat.supportsPerMessageEffort).toBe(true). That assertion pins the broken behavior.

  2. That flag conflicts with Vertex's own effort gate. packages/catalog/src/compat/rules/providers/google-vertex.kdl:13 sets supports-output-effort #false, because Vertex rawPredict can't take output_config.effort (#5614). So buildParams drops top-level effort: anthropic.ts:4825 writes effortPlan.topLevel only if (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).
    • convertAnthropicMessages turns each marker into { role: "system", content: [...], output_config: { effort } } (anthropic.ts:5112-5118; also the developer-message path at L5436 and L5449, gated on supportsPerMessageEffort at L5421).
    • resolveAnthropicControlBetas (anthropic.ts:257-267) adds mid-conversation-output-config-2026-07-01 when supportsPerMessageEffort is set. For Vertex rawPredict it goes into the body anthropic_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, drop supports-per-message-effort from the google-vertex scope: move it into an on "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 same supports-output-effort #false reasoning applies to them on Vertex. Regenerate rules.json, then rebake the affected google-vertex rows in models.json.
  • Alternatively or also: in anthropic.ts, gate per-message effort on supportsOutputEffort, i.e. pass supportsPerMessageEffort && supportsOutputEffort to planAnthropicEffortControls and use the same condition in resolveAnthropicControlBetas and 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 with supports-output-effort #false from hitting the same 400.
  • Flip the assertion in model-thinking.test.ts to expect(vertex.compat.supportsPerMessageEffort).toBe(false).
  • Check whether supports-mid-conversation-tool-changes / supports-turn-scoped-system hold 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-5 hits the same 400 on a turn that inserts an effort control. It has the same supports-per-message-effort #true on 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)