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.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Viyangle/dsh-opencode-model-syncREADME
Read the full README ↗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
| Field | Default | Meaning |
|---|---|---|
enabled | true | Master switch. Off registers no tool and performs no sync. |
syncOnStart | true | Run a sync a few seconds after DSH starts. |
intervalMinutes | 360 | Automatic refresh period. 0 disables the periodic refresh. |
modelsUrl | https://opencode.ai/zen/go/v1/models | Catalog endpoint. The chat base URLs come from each model record, not from this URL. |
apiKeyEnv | OPENCODE_API_KEY | Credential reference / environment variable name. |
routePrefix | opencode-go | Prefix of the three managed routes (` |
-chat, | ||
-anthropic, | ||
| -responses`). | ||
displayNamePrefix | OpenCode Go | Display prefix shown in the model picker. |
sessionId | 00000000-0000-7000-8000-000000000000 | Value of the required x-opencode-session header. All conversations on the generated routes share it. |
retiredModels | drop | drop follows the live catalog; keep keeps models that disappeared from the catalog on the same route. |
retireBundledRoute | false | Remove 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. |
timeoutMs | 20000 | Catalog 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).