anomalyco / anomalyco/opencode

Long assistant responses truncated mid-generation with thinking model opencode-go/hy3 (no local config knob)

Open
#43,945 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

When the orchestrator model is a "thinking" model served by the opencode-go provider (e.g. opencode-go/hy3), long assistant responses — including long internal reasoning — are truncated mid-generation. The message simply stops, often mid-sentence, with no error. This makes it impossible to complete multi-step tasks that require long output; the agent appears to "hang" or "interrupt."

Environment

  • OpenCode client (Go build, model reported as opencode-go/hy3)
  • OS: Windows
  • The opencode-go provider is enabled via the oh-my-opencode-slim preset ("preset": "opencode-go" in ~/.config/opencode/oh-my-opencode-slim.json)

Reproduction

  1. Set the orchestrator to a thinking model such as opencode-go/hy3.
  2. Give it a task that requires a long reasoning trace or a long response (e.g. analyzing a ~970-line script, counting struct fields, etc.).
  3. The assistant response is cut off partway through, repeatedly, even when the intended output is not that large.

Key observation

The model ID opencode-go/hy3 is not present in any local config file:

  • ~/.config/opencode/opencode.jsonc — no hy3
  • ~/.config/opencode/opencode.json — no hy3
  • ~/.config/opencode/oh-my-opencode-slim.json — preset defines opencode-go/minimax-m3 (orchestrator, variant: "thinking"), opencode-go/qwen3.7-max, opencode-go/deepseek-v4-flash, opencode-go/kimi-k2.7-code, opencode-go/mimo-v2.5 — but no hy3.

So there is no obvious local knob (e.g. max_tokens / reasoning budget) to raise the output/thinking token limit for this model. Users cannot easily work around the truncation.

Impact

  • Multi-step coding tasks that need long outputs cannot be completed.
  • The agent looks broken ("thinking interrupted") to the user.
  • Switching models is the only apparent workaround, but the desired model (hy3) is not even configurable locally.

Request

  1. Make the output / thinking token limit configurable for provider models (e.g. a max_tokens or reasoning-budget field in the model/preset config), or raise the default so long responses are not hard-truncated.
  2. Document where opencode-go/hy3 (and other opencode-go/* models) parameters are defined, since they are absent from the local config files.
  3. Ideally, avoid silently truncating mid-generation — stream the full output or emit a clear warning/error instead of cutting off.

Additional notes

  • gh is authenticated (confirmed gh auth status → logged in to github.com as RuszLi with repo scope), so this can be reproduced/verified by maintainers if needed.
  • This report describes the observed symptom; the exact root cause (client-side output cap vs. provider-side thinking budget) is not yet confirmed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing ~/.config/opencode/opencode.jsonc, ~/.config/opencode/opencode.json, and ~/.config/opencode/oh-my-opencode-slim.json, then reproduce the truncation with opencode-go/hy3 using a long task. Trace where provider model limits are defined; done means the limit is configurable or safely increased, truncation is reported clearly, and the model parameter location is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.