OpenCode zen 免费模型(big-pickle)在 DSH 中必现 429 FreeUsageLimitError(附修复补丁) #1455
Liyuntong123
started this conversation in
Ideas
Replies: 11 comments 10 replies
|
为啥不做成插件,这种绕过怎么可能给你合并 |
4 replies
|
OpenCode 免费套餐(zen / big-pickle)有严格的速率限制,DSH 这种高频工具调用场景很容易触发 429 FreeUsageLimitError——不是 DSH 的问题,是免费额度扛不住 agent 的调用频率。 实测建议:
三个方案的 base URL、模型名、邀请链接对比,整理在这:https://dshbase.com/blog/dsh-model-setup/ |
2 replies
|
求插件 |
0 replies
|
好巧,插件咱已经做了:https://github.com/QiE2035/dsh-llm-headers |
1 reply
|
好巧,插件咱已经做了:https://github.com/mc-lhz/dsh-add-headers-to-completions |
0 replies
|
不是只需要在保存provider的那个文件里加2行声明一下提供方就行了吗 |
3 replies
|
对 User-Agent: opencode/1.18.18
在 2026-08-24 13:33:02,"zqy1-1" ***@***.***> 写道:
详细讲讲?
opencode在github里也有仓库,那边issue里有人说,就是加个请求头而已
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you commented.Message ID: ***@***.***>
|
0 replies
|
似乎不行了 |
0 replies
|
这和dsh没关系,你需要自己有点手法才能解决 |
0 replies
|
现在又加了新的限制
在 2026-09-18 14:21:27,shenxiu666 ***@***.***> 写道:
这和dsh没关系,你需要自己有点手法才能解决
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you commented.Message ID: ***@***.***>
|
0 replies
|
加了新的限制 必须带完整工具,不然会403
在 2026-09-18 12:35:29,igofind ***@***.***> 写道:
似乎不行了
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you commented.Message ID: ***@***.***>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
问题 / Problem
在 DSH 中使用 opencode provider 的 zen 免费模型(如 big-pickle)时,每次生成请求都失败:
根因 / Root cause
OpenCode zen 网关(
https://opencode.ai/zen/v1)的免费额度只放行带 opencode CLI 客户端标识(User-Agent: opencode/latest/<version>/cli)的请求;任何其他 User-Agent 都会被当作匿名客户端拒绝(直连实测可复现同一错误)。而 DSH 的 LLM 适配器按强制 attribution 策略给每个 provider 请求发送User-Agent: deepseek-harness/<version> (+https://github.com/deepseek-ai/deepseek-harness)——正是被网关拒绝的身份。pi-ai 的 opencode 目录模型也没有自带 CLI headers(对比 github-copilot / kimi-coding 都在目录 JSON 里声明了 UA)。社区常见绕行方案是本地起一个代理改写 UA(如 pi 的 zen headers 修复 方向一致),但需要用户额外运行一个进程,体验很差。
修复方案 / Proposed fix(补丁已完成,全部门禁通过)
在
dsh-llm-pi-ai的 adapter 中,对指向 zen 网关的请求(provider 为opencode/opencode-go,或解析后 baseURL 主机为opencode.ai)发送 opencode CLI 客户端标识:User-Agent: opencode/latest/1.18.18/clix-opencode-client: cli其余 provider 仍发送 harness attribution UA。这属于 attribution 政策中的 provider 专属请求身份类别(与 DeepSeek 的 user-id / session-id 请求身份并列),并用新的 Agent Note 记录决策。
完整补丁在 fork 分支:https://github.com/Liyuntong123/deepseek-harness/tree/feat/opencode-zen-client-identity
包含:
packages/llm/llm-pi-ai/src/adapter.ts(+54 行)adapter.ts覆盖率 100%docs/subsystems/llm-streaming.md中英)验证 / Verification
User-Agent: opencode/latest/1.18.18/cli的 chat completions → HTTP 200;不带 → 429(与上述错误一致)/models不校验 UA(200),模型列表探测不受影响如果维护者认可这个方向,我可以把补丁整理成正式 PR 提交。
All reactions