GeezerVison is showing github.com — fix(opencode): generate reasoning variants for all OpenRouter models. by AnthonyMLau · Pull Request #30332 · anomalyco/opencode
Conversation
AnthonyMLau
commented
Jun 2, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #30216
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
The variants() function in the OpenRouter provider case returns {} for any model whose ID doesn't contain gpt, gemini-3, or claude, even when the model has capabilities.reasoning: true. OpenRouter's reasoning.effort parameter is provider-agnostic and works across all reasoning models, so this filter is unnecessarily restrictive.
The fix replaces the return {} with a fallback that generates default variants (none/minimal/low/medium/high/xhigh) for any reasoning-capable model routed through OpenRouter. GPT, Gemini, and Claude models keep their existing model-specific effort lists unchanged.
How did you verify your code works?
- Built and ran the TUI via
bun dev
- Connected to OpenRouter and selected
deepseek/deepseek-v4-pro — variants now appear in the Ctrl+T selector
- Tested
xhigh variant — produces a visible chain-of-thought trace before the final answer
- Confirmed GPT models on OpenRouter still show their model-specific effort levels
Screenshots / recordings
Before:
After:
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AnthonyMLau
changed the title
fix(opencode): generate reasoning variants for all OpenRouter models
fix(opencode): generate reasoning variants for all OpenRouter models.
Jun 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
thepagent
pushed a commit
to openabdev/openab
that referenced
this pull request
Jun 12, 2026
…els (#1083)
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.
Co-authored-by: wangyuyan-agent <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.