Skip to content

fix(opencode): bump pin to 1.17.3 to recover OpenRouter reasoning models - #1083

Merged
thepagent merged 1 commit into
openabdev:mainfrom
wangyuyan-agent:chore/bump-opencode-1.17.3
Jun 12, 2026
Merged

fix(opencode): bump pin to 1.17.3 to recover OpenRouter reasoning models#1083
thepagent merged 1 commit into
openabdev:mainfrom
wangyuyan-agent:chore/bump-opencode-1.17.3

Conversation

@wangyuyan-agent

Copy link
Copy Markdown
Contributor

Summary

Bump the Dockerfile.opencode pin from 1.16.2 to 1.17.3 and document
the minimum version required for OpenRouter reasoning models (e.g.
openrouter/google/gemini-3-flash).

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365157010542652/1514522869768654868

Root cause

OpenAB consumes opencode's ACP server via stdio JSON-RPC and renders text solely from sessionUpdate: agent_message_chunk notifications (src/acp/protocol.rs::classify_notification). On opencode-ai 1.16.2 — and, based on changelog inspection, the entire 1.16.x line — the ACP server fails to emit agent_message_chunk for OpenRouter reasoning models. The assistant text part is correctly written into opencode's internal session storage (visible via opencode export <session_id>), but never reaches OpenAB. OpenAB's recv loop sees only usage_update followed by a stopReason: end_turn response, runs through compose_display, finds an empty buffer, and falls back to _(no response)_ (src/adapter.rs:660-665).

The upstream fix is sst/opencode#30332 ("fix(opencode): generate reasoning variants for all OpenRouter models"), released in opencode 1.17.0. We pin to the more conservative 1.17.3 because that is the version verified end-to-end by a community reporter (Discord thread linked above).

What this PR does

No Rust source touched. No behavior change inside OpenAB itself — this is a pure dependency floor lift plus documentation.

Verification

  • Reporter confirmed end-to-end recovery on openrouter/google/gemini-3-flash after upgrading opencode 1.16.2 → 1.17.3:
    • debug log now shows {"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"..."}} arriving before the usage_update and the session/prompt response, in the order the OpenAB parser expects.
  • npm view opencode-ai@1.17.3 version resolves cleanly on the public registry.
  • No Rust source modified, so cargo build/cargo test are unaffected. The Docker builder stage will exercise the new pin via npm install -g opencode-ai@1.17.3 in CI's Dockerfile.opencode runtime stage.
  • docs/opencode.md markdown renders correctly in GitHub preview; fix(opencode): generate reasoning variants for all OpenRouter models. anomalyco/opencode#30332 URL resolves to the merged upstream PR.
OpenCode 1.16.x ships an ACP regression where OpenRouter reasoning models
(e.g. openrouter/google/gemini-3-flash) never emit a final
`agent_message_chunk` over ACP. The assistant text part is correctly
written into opencode's internal session storage (visible via
`opencode export <session_id>`) but the ACP server only emits
`usage_update` followed by `stopReason: end_turn`. From OpenAB's side
this surfaces as `(no response)` because src/adapter.rs falls back to
that string when no agent_message_chunk arrived during the prompt
window.

The upstream fix landed in opencode 1.17.0 as anomalyco/opencode#30332
("generate reasoning variants for all OpenRouter models"). 1.17.3 is
the latest 1.17.x verified end-to-end by a community reporter.

- Dockerfile.opencode: OPENCODE_VERSION 1.16.2 -> 1.17.3, with an inline
  comment block capturing the regression so the next bump preserves the
  >= 1.17.0 floor.
- docs/opencode.md: append a 'Minimum version for OpenRouter reasoning
  models' bullet to the Notes section, linking anomalyco/opencode#30332.

No Rust source touched; no behavior change in OpenAB itself.
@thepagent
thepagent enabled auto-merge (squash) June 12, 2026 04:37
@thepagent
thepagent merged commit 26553e4 into openabdev:main Jun 12, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants