anomalyco / anomalyco/opencode
[Bug] Desktop provider "Connect" only stores API key — provider definition is not scaffolded, no in-UI editor
Open
@Hona is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Provider "Connect" only stores API key; provider definition must be configured separately
桌面端 Provider「Connect」只存 API key,provider 定义需手动补全
Environment
- OpenCode Desktop v1.18.9
- Windows x64
- Provider example: SiliconFlow (China) / generic OpenAI-compatible
环境
- OpenCode Desktop v1.18.9
- Windows x64
- 示例 provider:SiliconFlow(中国)/ 通用 OpenAI 兼容
Steps to reproduce
- Settings → Providers → click "Connect" on e.g. "SiliconFlow (China)"
- Paste API key and confirm
- UI shows "connected"
复现步骤
- Settings → Providers → 点击例如 "SiliconFlow (China)" 的 "Connect"
- 粘贴 API key 并确认
- UI 显示「已连接」
Expected
- "Connect" also creates/scaffolds the corresponding
providerentry in~/.config/opencode/opencode.jsonc, so the provider becomes usable - OR the UI provides an in-app editor to configure provider definition (npm package, base URL, model list)
- The provider can be edited or disabled without deleting credentials
期望
- 「Connect」应同时创建/生成对应的
provider条目写入~/.config/opencode/opencode.jsonc,使该 provider 可用 - 或提供 UI 内编辑器来配置 provider 定义(npm 包、base URL、模型列表)
- provider 应可编辑或禁用,而非删除凭证
Actual
- Only the API key is written to
~/.local/share/opencode/auth.json, e.g.
{ "siliconflow-cn": { "key": "...", "type": "..." } } - No
providerentry is added to~/.config/opencode/opencode.jsoncby the "Connect" flow - The UI exposes only a "Disconnect" button, which deletes the credential from
auth.json— there is no edit or disable toggle - To make the provider actually work, the user must manually edit
opencode.jsoncand add the provider block
实际
- 「Connect」仅把 API key 写入
~/.local/share/opencode/auth.json,例如
{ "siliconflow-cn": { "key": "...", "type": "..." } } - 「Connect」流程不会向
~/.config/opencode/opencode.jsonc添加任何provider条目 - UI 只暴露一个「Disconnect(断开)」按钮,其作用是从 auth.json 删除凭证——没有编辑或禁用的开关
- 要让 provider 真正可用,用户必须手动编辑
opencode.jsonc并补全 provider 块
Impact
- A desktop app that requires hand-editing JSON to finish provider setup is effectively broken for ordinary users; the "Connect" flow is misleading.
影响
- 一个需要手改 JSON 才能完成 provider 配置的桌面应用,对普通用户而言形同残缺;「Connect」流程具有误导性。
Workaround
- Manually add the provider block to
opencode.jsonc(id must match the auth.json credential key to reuse the stored key).
临时规避
- 手动向
opencode.jsonc添加 provider 块(id 必须与 auth.json 凭证键一致,才能复用已存的 key)。
Suggested fix
- Have "Connect" also scaffold the provider definition, OR provide a real in-UI editor for providers.
建议修复
- 让「Connect」同时生成 provider 定义,或提供真正的 UI 内 provider 编辑器。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.