scavanger2221/dsh-llm-opencode-go ↗★ 0
dsh-llm-opencode-go
OpenCode Go 模型提供商接入与配置插件
AI 分析
核心用途是将 OpenCode Go 模型作为 DSH 提供商接入,支持会话关联请求头、模型目录刷新及配置卡片。适合需要使用该平台模型服务的开发者。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:scavanger2221/dsh-llm-opencode-go说明文档
阅读完整 README ↗Web configuration
Open Settings → Plugins → OpenCode Go. The card stores the API key through
the Harness credentials service under OPENCODE_GO_API_KEY; the host never
returns the stored literal. It also edits the endpoint, the refresh interval, and
the model overrides, and it can interrogate the endpoint for the ids it currently
advertises.
The card is the supported editor for this provider because the Settings → Models
page ships layouts for the two namespaces it owns (llm-deepseek, llm-pi-ai)
and renders a deployment-added provider as a row with no editor. The Plugins page
dispatches a card by settings namespace instead, which is exactly what a plugin
distributed outside the harness repository needs.
Configuration
Everything except the key is a settings field, layered over the bundle row by the
llm-opencode-go section of $DSH_HOME/settings.yaml:
llm-opencode-go:
apiRoot: https://opencode.ai/zen/go
refreshIntervalMs: 3600000 # hourly; 0 disables the timer
refreshOnMount: true
models:
- id: some-new-model
api: anthropic-messages # openai-completions | openai-responses | anthropic-messages
contextWindow: 262144
maxTokens: 65536
reasoning: true
input: [text, image]
input is enforced: a prompt carrying an image is refused with
UNSUPPORTED_CONTENT before the request when the model does not list image.
reasoning: false hides the harness thinking levels for that model.
The credential is not a settings field — secrets go through the credentials
service, which stores them in $DSH_HOME/.credentials.yaml:
refs:
OPENCODE_GO_API_KEY: sk-...
The reference deliberately avoids the conventional OPENCODE_API_KEY: an
exported environment value shadows the managed store, so a shell that exports
another OpenCode key would silently win.
Shell export warning. If your shell exports
OPENCODE_GO_API_KEY, that value wins over the store and the card's API key field renders as read-only. Unset it, or pointapiKeyEnvat a reference nothing exports.