Skip to content

[BUG] Claude Fable 5 (Vertex Anthropic) streams a response but no text is rendered — empty thinking block with signature-only delta #31738

Closed

Description

@deusmusic00

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

  1. 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".)
  2. Select Claude Fable 5, send any prompt.
  3. 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

  1. changed the title [-]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[/+] on Jun 11, 2026
  2. m1hawkgsm commented on Jun 12, 2026

    @m1hawkgsm

    Reproduced on the direct anthropic provider (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-5 via the standard anthropic provider. The model is present in my models.dev cache, but my opencode.json overrides it (provider.anthropic.models.claude-fable-5 with custom name / limit / variants for 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"
    • 0 tokens across all categories (input / output / reasoning / cache read / cache write)
    • error: null
    • only a step-finish part (reason: "unknown") — no thinking or text parts stored

    Notably 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.

  3. added a commit that references this issue on Jul 2, 2026
    535a10c
  4. eXamadeus commented on Jul 2, 2026

    @eXamadeus
    Contributor

    Good research! This helped me craft up a fix here: #34848

  5. opencode-agent commented on Jul 25, 2026

    @opencode-agent
    Contributor

    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 until content_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions