OpenCode: requests "low" reasoning variant for models that do not support it (hy4-flash-free), causing rpc_error turns

未关闭
#35 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
59/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
backend

调研方向

Start by tracing how DuskBot selects and sends reasoning variants to OpenCode, then find where the selected model's advertised variants are available to that path. Compare the chosen variant with the model's supported variants and identify where the failure is reported. Done means a model without low receives a supported fallback and its turn can complete; the issue names no files or tests.

由索引模型根据 Issue 内容生成。

描述

Summary

DuskBot requests the low reasoning variant when calling OpenCode for models that do not advertise it. The most visible case is opencode/hy4-flash-free, whose own model entry in DuskBot lists only none, high, and default variants. The request fails with OpenCode did not apply variant low and the bot turn ends with stop: rpc_error.

Evidence

From ~/.duskbot/providers/engine-models/opencodeGo.json (build 0.2.15):

  • opencode/beam-free: variants low, medium, high, xhigh, default (supports low)
  • opencode/hy4-flash-free: variants none, high, default (does not support low)

From ~/.config/duskbot/logs/trail-server.jsonl, repeated entries:

{"ev":"error","code":"bot.runtime","msg":"OpenCode did not apply variant low","bot":"...","thread":"...","turn":"..."}
{"ev":"bot.turn.end",...,"ok":false,"stop":"rpc_error",...}

Five rpc_error turns were recorded in a single session, and the free model (opencode-go/hy4-flash-free) times out repeatedly before falling back.

Impact

Bots that DuskBot routes to hy4-flash-free cannot complete turns. From the user side this looks like the main agent (Kiwi) cannot get answers from the other bots, because every downstream call fails before producing a reply.

Expected behavior

DuskBot should only send a reasoning variant that the selected model advertises. When the model has no low variant, it should fall back to none or default instead of sending low and failing the whole turn.

Environment

  • DuskBot 0.2.15 (Linux, amd64)
  • OpenCode backend, free model opencode-go/hy4-flash-free
  • Reported by Dario Cositore (https://dariocositore.com)
主要语言
TypeScript
星标
277
派生
27
平均合并
2 小时 47 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DuskBotAI/duskbot 的其他 Issue

查看 DuskBotAI/duskbot 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。