Repository navigation
[BUG] Claude Fable 5 (Vertex Anthropic) streams a response but no text is rendered — empty thinking block with signature-only delta #31738
Description
Description
When using claude-fable-5 through the google-vertex-anthropic provider, the request succeeds, the model streams for ~13s, the agent loop completes cleanly (step=0 → step=1 → exiting loop), no error is logged, but no assistant text is rendered in the UI. Other Vertex Anthropic models with the same adaptive-reasoning format (e.g. claude-opus-4-8) work perfectly.
Root cause analysis
claude-fable-5 only supports the new adaptive-thinking API. Direct API testing confirms:
thinking.type.enabled → rejected: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
thinking.type.disabled → rejected: thinking cannot be disabled ("Thinking defaults to adaptive mode when not specified").
Valid output_config.effort values: low | medium | high | xhigh | max.
The model always returns a thinking content block first, and in the common case that block is empty with a signature only (no thinking_delta). Verified via streamRawPredict:
content_block_start index 0 -> { "type": "thinking", "thinking": "", "signature": "" }
content_block_delta index 0 -> { "type": "signature_delta", "signature": "..." } # no thinking_delta
content_block_stop index 0
content_block_start index 1 -> { "type": "text", "text": "" }
content_block_delta index 1 -> { "type": "text_delta", "text": "¡Hola! ..." }
...
message_delta -> stop_reason: "end_turn"
The text part (index 1) is present and well-formed. OpenCode’s handling appears to swallow the response when the leading thinking block is empty/signature-only for this model, so the text block is never surfaced. Behavior differs by config:
Manual model entry with "reasoning": true → on 1.16.2 the request 400s (thinking.type.enabled sent); on 1.17.1 no error but blank output.
Manual model entry with "reasoning": false → blank output, no error.
Why catalog models work but a manual entry doesn’t
claude-fable-5 is not yet in the Models.dev catalog, so it has to be added as a manual provider model. Adding it manually makes OpenCode treat it as a generic Anthropic model and it doesn’t get the Fable/Opus-4.7+ adaptive-reasoning handling introduced in v1.17.0 (“Added Claude Fable reasoning support”) and v1.15.12/v1.16.0 (“adaptive reasoning controls for Anthropic Opus 4.7+”). Catalog-backed models like claude-opus-4-8 get the correct handling and render fine; a user-defined claude-fable-5 does not.
Relevant log (1.17.1)
stream providerID=google-vertex-anthropic modelID=claude-fable-5 ... step=0
("failed to add snapshot files" warnings unrelated)
loop ... step=1
exiting loop # ~13s of streaming, no error, no rendered text
Plugins
No response
OpenCode version
OpenCode Desktop v1.17.1 (also reproduced on v1.16.2)
Steps to reproduce
- Configure the google-vertex-anthropic provider and add a manual model:
{
"provider": {
"google-vertex-anthropic": {
"options": { "project": "", "location": "global" },
"models": {
"claude-fable-5": { "name": "Claude Fable 5", "reasoning": true, "tool_call": true }
}
}
}
}
(Vertex requires enabling Anthropic data sharing once via setPublisherModelConfig → dataSharingEnabledProvider: "anthropic".) - Select Claude Fable 5, send any prompt.
- The stream runs and completes with no error, but no assistant text appears.
Screenshot and/or share link
No response
Operating System
macOS 26.3.1 (Apple Silicon)
Terminal
No response
Activity
[-]Claude Fable 5 (Vertex Anthropic) streams a response but no text is rendered — empty thinking block with signature-only delta[/-][+][BUG] Claude Fable 5 (Vertex Anthropic) streams a response but no text is rendered — empty thinking block with signature-only delta[/+]m1hawkgsm commentedon Jun 12, 2026
Reproduced on the direct
anthropicprovider (not Vertex) — catalog-backed model with a config override.Setup: opencode 1.17.2 (also seen on 1.17.3), macOS (Apple Silicon),
claude-fable-5via the standardanthropicprovider. The model is present in my models.dev cache, but myopencode.jsonoverrides it (provider.anthropic.models.claude-fable-5with customname/limit/variantsfor effort) — possibly putting me on the same "user-defined model" handling path described in the OP.Symptom matches exactly: stream starts, runs ~8–17s, agent loop exits cleanly (
step=0 → step=1 → exiting loop), nothing logged at any log level, nothing rendered in the TUI.In
opencode.db, the assistant message completes with:finish: "unknown"error: nullstep-finishpart (reason: "unknown") — no thinking or text parts storedNotably intermittent in long sessions: the same session + model alternates between fully working turns (hundreds of K of context, normal output) and these silent zero-token deaths — consistent with adaptive thinking only sometimes leading with an empty signature-only thinking block. Trivial
opencode run --model anthropic/claude-fable-5 "ping"requests usually render fine.Happy to provide sanitized DB rows or run a patched build if useful.
fix(opencode): default adaptive Anthropic models to summarized thinking
eXamadeus commentedon Jul 2, 2026
Good research! This helped me craft up a fix here: #34848
opencode-agent commentedon Jul 25, 2026
Addressed by #38733. Google Vertex Anthropic uses the shared V2 Anthropic Messages stream protocol, which now opens empty thinking blocks at
content_block_start, retains signature-only deltas untilcontent_block_stop, preserves the final signature in continuation metadata, and independently preserves following text blocks. Focused tests cover omitted thinking represented only by a signature delta and continuation lowering. Closing as resolved on the v2 branch.