[BUG] Vertex: thinking.display silently stripped by provider gate — --thinking-display summarized returns empty thinking on Opus 4.7 and all later models (worked ≤2.1.140; Vertex API supports the field)
What's Wrong?
--thinking-display summarized is silently ignored when Claude Code talks to Vertex AI. The CLI accepts the flag but strips the thinking.display field from the request body it sends to Vertex, so on Opus 4.7 and every later model — all of which default to hidden thinking server-side (Opus 4.7/4.8, Sonnet 5, Opus 5/Fable 5) — thinking blocks stream back with empty thinking text — only a signature_delta arrives — while thinking_tokens > 0 is still billed in usage.
Vertex itself supports the field. Calling Vertex rawPredict directly with "thinking": {"type": "adaptive", "display": "summarized"} returns real summary text (verified 2026-08-15, transcript below). This is purely a client-side gate.
Root cause (traced through the 2.1.233 binary)
The request builder computes the display value here (minified, one occurrence in the bundle):
Yl = Za && X2() && bbn(d) ? r.display : void 0
// ...
cc = {budget_tokens: yt, type: "enabled", display: Yl} // or {type:"adaptive", display: Yl}
X2() is a provider gate:
function $Do(){let e=Jn();return e==="firstParty"||M7(e)||e==="foundry"}
function M7(e=Jn()){return e==="anthropicAws"||e==="anthropicGoogleCloud"}
function T2e(){return V.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS||SHs()}
function X2(){return $Do()&&!T2e()}
Provider "vertex" (and "bedrock") are excluded, so Yl is undefined and display never reaches the wire. The same gate explains the Bedrock sibling report (#67729).
Single-site causality confirmed: byte-patching only that one expression (X2() → (!0), same length) in a copy of the 2.1.233 binary restores full summarized-thinking output on Vertex, with no other change.
Note the interaction two lines down: when display is set, the redact-thinking-2026-02-12 beta is spliced out (if(cc&&Yl){...ji.splice(...)}) — on Vertex that beta is never pushed (same X2() gate at its push site), so allowing display through for vertex requires no beta-header changes.
Regression window
| Version | Result on Vertex + claude-opus-4-7 + --thinking-display summarized |
|---|---|
| 2.1.112 | worked (user-observed, May 2026, stream-json) |
| 2.1.140 | works — re-verified live 2026-08-15 (405-char summary, msg_vrtx_ request IDs) |
| 2.1.231 / 2.1.232 / 2.1.233 | broken — empty thinking text, signature only |
Break landed somewhere in 2.1.141–2.1.231 (happy to bisect further if useful).
What Should Happen?
thinking.display should be sent to Vertex (and, if Bedrock accepts it, Bedrock) when --thinking-display is passed — e.g. gate the field on model capability rather than provider, or add vertex to the provider set for this field specifically.
Steps to Reproduce
- Configure Vertex (
CLAUDE_CODE_USE_VERTEX=1, project/region with Opus 4.7 access). - Run:
``sh``
claude -p --model claude-opus-4-7 --thinking-display summarized \
--output-format stream-json --verbose \
"Think hard: what is the sum of all two-digit primes whose digits are both prime?"
- Observe the thinking
content_block_start/ deltas:"thinking": ""throughout; onlysignature_deltacarries data.usage.output_tokens_details.thinking_tokens≈ 200. - Control — Vertex supports the field. Direct call:
``sh`
curl -X POST "https://aiplatform.googleapis.com/v1/projects/$PROJECT/locations/global/publishers/anthropic/models/claude-opus-4-7:rawPredict" \
-H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" \
-d '{"anthropic_version":"vertex-2023-10-16","max_tokens":2048,
"thinking":{"type":"adaptive","display":"summarized"},
"messages":[{"role":"user","content":"Think carefully: sum of all two-digit primes with both digits prime?"}]}'
display
→ returns a thinking block with real summary text ("I'm checking which two-digit numbers using only the digits 2, 3, 5 and 7 are themselves prime…"). The same call **without** returns "thinking": ""` — confirming the field is required and supported.
Error Messages/Logs
No error — the failure is silent. Captured stream (2.1.233, Vertex):
{"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""}}
{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""}}
{"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EvUDCnMIEBACGAIqQPhIOIWxd0ju..."}}
Environment
- Claude Code Version: 2.1.233 (also reproduced on 2.1.231, 2.1.232)
- Platform: macOS (darwin 25.5.0, arm64)
- Provider: Vertex AI,
globalendpoint - Model:
claude-opus-4-7(verified). The mechanism is model-independent — the field is dropped for all models on 4.7-and-later families, whose thinking is hidden by default; #79052 independently confirms the same symptom forclaude-sonnet-5on Vertex. Pre-4.7 models (e.g. Sonnet 4.6) mask the bug because their server default issummarized.
Not a duplicate (related issues, and what's new here)
- #79052 — same symptom for Sonnet 5 on Vertex (currently labeled duplicate). This report adds the root cause (
X2()provider gate at thedisplayassignment), single-site patch confirmation, and a version bisect window. - #67729 — Bedrock sibling; same gate (
M7excludes"bedrock"too). - #49268 / #56356 — Opus 4.7 "no thinking summaries" reports; the first-party side was fixed, the provider-gated path was not. #56356's finding that CC 2.1.116 works matches the bisect table above.
One bug, one report: the fix is to stop excluding vertex from the thinking.display gate.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗