Viyangle/dsh-opencode-model-sync ↗★ 0

dsh-opencode-model-sync

Keep the DSH model picker in sync with the live OpenCode Go model catalog — new models appear without a DSH release.

包名
dsh-opencode-model-sync
兼容性
待验证
Harness 依赖范围
>=0.0.1-rc <2
版本
0.2.0
许可证
MIT
最近更新
2026年11月3日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Viyangle/dsh-opencode-model-sync

Usage

Select any model from OpenCode Go · Chat Completions, OpenCode Go · Messages, or OpenCode Go · Responses in the model picker. New catalog entries show up after the next sync.

Manual sync with the agent tool

The plugin registers one tool:

opencode_model_sync action=status
opencode_model_sync action=sync
opencode_model_sync action=sync dryRun=true
opencode_model_sync action=remove
  • status — last attempt/success, last error, the live model count of each generated route, and how the live catalog compares with DSH's bundled one.
  • sync — fetch the catalog now. Only changed routes are written.
  • remove — delete the three generated routes from settings.

Configuration

Configuration is the bundle row's config in the Cordis patch. Defaults are shown below; every field is optional.

- id: opencode-model-sync
  name: dsh-opencode-model-sync
  config:
    enabled: true
    syncOnStart: true
    intervalMinutes: 360
    modelsUrl: https://opencode.ai/zen/go/v1/models
    apiKeyEnv: OPENCODE_API_KEY
    routePrefix: opencode-go
    displayNamePrefix: OpenCode Go
    sessionId: 00000000-0000-7000-8000-000000000000
    retiredModels: drop
    retireBundledRoute: false
    excludeModels: []
    timeoutMs: 20000
FieldDefaultMeaning
enabledtrueMaster switch. Off registers no tool and performs no sync.
syncOnStarttrueRun a sync a few seconds after DSH starts.
intervalMinutes360Automatic refresh period. 0 disables the periodic refresh.
modelsUrlhttps://opencode.ai/zen/go/v1/modelsCatalog endpoint. The chat base URLs come from each model record, not from this URL.
apiKeyEnvOPENCODE_API_KEYCredential reference / environment variable name.
routePrefixopencode-goPrefix of the three managed routes (`
-chat,
-anthropic,
-responses`).
displayNamePrefixOpenCode GoDisplay prefix shown in the model picker.
sessionId00000000-0000-7000-8000-000000000000Value of the required x-opencode-session header. All conversations on the generated routes share it.
retiredModelsdropdrop follows the live catalog; keep keeps models that disappeared from the catalog on the same route.
retireBundledRoutefalseRemove the bundled opencode-go provider after a sync and move the default model to the matching generated route. One-way; see below.
excludeModels[]Model ids that must never be synced.
timeoutMs20000Catalog fetch timeout.

Keep the routePrefix stable: changing it creates a new set of routes and leaves the old ones behind (action=remove cleans up the current prefix).