You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Beta header rewrite breaks Opus 5.5, Sonnet 5.5 and Fable 5.1 on OpenCode 1.18.x #33
On AI assistance: Claude (Opus 5.5 / 1M context) helped me narrow down the behavior and draft the wording below, including the repro steps. The actual issue and workflow are mine. — @balaji-dutt
Summary
With opencode 1.18.31 and opencode-claude-bridge 1.10.12, every request to a Claude 5.1+ model through the anthropic provider fails:
thinking.adaptive.block_binding: Extra inputs are not permitted
Since anomalyco/opencode#46653 (scoped to 5.1+ by anomalyco/opencode#46848), opencode adds thinking.block_binding to these requests and sends the thinking-binding-controls-2026-08-01 beta with it. buildBetaFlags() ignores the incoming anthropic-beta value and replaces it with BETA_FLAGS, so the field reaches the API without its beta.
#32 fixes this by merging the incoming flags. I'm filing this so the error is searchable, and to ask for #32 to be merged and released.
opencode run -m anthropic/claude-opus-5-5 'Reply with exactly: OK'
Confirming the cause
Adding the beta to the bridge's own list makes the same request succeed over OAuth, so the subscription path accepts it once it survives the rewrite:
ANTHROPIC_BETA_FLAGS="interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,claude-code-20250219,advisor-tool-2026-03-01,effort-2025-11-24,extended-cache-ttl-2025-04-11,thinking-binding-controls-2026-08-01" \
opencode run -m anthropic/claude-opus-5-5 'Reply with exactly: OK'# OK
Keep type: "adaptive". Without it, opencode drops the thinking object, and THINKING_MODELS only re-adds thinking for 4.x models, so the request goes out with no thinking at all.
Ask
Please merge and release #32. A release would also ship the #19 loader fix from #27: npm latest is still 1.10.12 (2026-07-02), and on 1.18.31 every start still logs failed to load plugin ... modelId.match is not a function. The request rewriting still runs despite that error; the ANTHROPIC_BETA_FLAGS test above changes the outcome.
Status update: #37 has been merged to main (f226b45, slated for 1.11.0), which adds thinking-binding-controls-2026-08-01 to BETA_FLAGS (credited to @TomasRichtr) and unblocks thinking.adaptive.block_binding on Claude 5.x models across both OpenCode 1.18.x and v2.
Keeping this issue linked to #32, which remains open to dynamically merge any future incoming SDK anthropic-beta flags rather than relying on a static list.
Merged #32 (buildBetaFlags now preserves incoming SDK anthropic-beta headers on both v1 and v2, alongside thinking-binding-controls-2026-08-01 from #37). This will ship in v1.11.1 shortly. Closing as completed — thanks @balaji-dutt and @mkazlauskas!
Activity
fix: add thinking-binding-controls beta flag for 5.x models
feat: opencode v2 plugin support (setup) alongside v1 server()
dotCipher commentedon Nov 19, 2026
Status update: #37 has been merged to
main(f226b45, slated for1.11.0), which addsthinking-binding-controls-2026-08-01toBETA_FLAGS(credited to @TomasRichtr) and unblocksthinking.adaptive.block_bindingon Claude 5.x models across both OpenCode 1.18.x and v2.Keeping this issue linked to #32, which remains open to dynamically merge any future incoming SDK
anthropic-betaflags rather than relying on a static list.dotCipher commentedon Nov 19, 2026
Merged #32 (
buildBetaFlagsnow preserves incoming SDKanthropic-betaheaders on both v1 and v2, alongsidethinking-binding-controls-2026-08-01from #37). This will ship inv1.11.1shortly. Closing as completed — thanks @balaji-dutt and @mkazlauskas!