Introduction¶
The built-in “Get Available Models” button on the DeepSeek Harness (DSH) settings page does not make network requests for providers in the catalog. It directly returns the static snapshot packaged in the pi-ai npm package (usually 19 models for OpenCode Go). The server-side model list changes frequently (new releases, deprecations, temporary unavailability), so the static snapshot is always outdated. To obtain the actual list of available models, use the real path: fetch the full set with GET /models → test each model individually → write them back to settings.yaml.
Plugin Introduction¶
dsh-opencode-models is a plugin for DeepSeek Harness (DSH). It adds an “OpenCode Go Model Sync” section to the settings page, allowing you to fetch all models from the OpenCode Go server in one click, test each model’s availability and vision capabilities individually, and write the available models back to the model list in llm-pi-ai.
- Maintainer: Retr67
- License: MIT
- Technical features: Zero build, zero runtime dependencies
Installation and Activation¶
Install using npx:
npx -y @deepseek-ai/dsh plugin --profile web add https://github.com/Retr67/dsh-opencode-models
After installation, restart dsh web and refresh the page.
Usage Steps¶
- Open dsh settings and find OpenCode Go Model Sync;
- Click “Update the Latest OpenCode Go Model List”;
- Wait for progress to complete (about 1 minute: list fetching + two rounds of probing for all models). The page will show added, retained, removed, and server-rejected models.
Core Features and Policies¶
The plugin sends two types of small live requests for each model (max_tokens: 1, concurrency of 6) to determine status:
- Text ping: 200 → available; 400/401 → explicitly rejected (not added to the list); 403 → requires data policy opt-in; 5xx → temporary failure (retained); network error → indeterminate (retained).
- Image ping: Send a 1x1 PNG, 200 → mark
input: [text, image]; otherwise text-only.
When writing back to settings.yaml, the following protection policies apply:
- No write if no changes: If the list is identical to the current configuration, do not modify the file.
- Abort when many failures occur: If more than half of the models are “indeterminate” (network-layer errors), abandon this write-back and never clear the list.
- Preserve manual metadata: Preserve the
name/contextWindow/maxTokensof existing entries as-is. - Do not hardcode specs for new entries: For new models, write only
id/name(plus the measured vision and reasoning effort level). LeavecontextWindowandmaxTokensto dsh to resolve the actual specs from the built-in pi-ai catalog.
Context Window and Max Output Sources¶
When a model entry does not declare contextWindow / maxTokens, the plugin resolves them in the following order:
- The actual entry for that model in the built-in pi-ai catalog (for example
kimi-k3→ context 1048576, output 131072). - If the catalog does not recognize it, fall back to the route’s
defaultContextWindow/defaultMaxTokens(dsh defaults to 262144 / 32768).
Therefore: do not manually fill in guessed values. Once contextWindow is written in an entry, it permanently overrides the actual specs from the catalog.
Configuration and Compatibility¶
The default target provider is opencode-go. To adjust it, override by entry ID in the profile’s cordis.patch.yml:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: opencode-models
config:
provider: opencode-go
concurrency: 6
timeoutMs: 25000
- Compatibility: dsh ≥ 0.1.0-rc.7 (development verified on 0.1.2-alpha.x).
- Reasoning effort: Synced models include
reasoningEffortsdeclarations, and a reasoning effort selector appears in the WebUI (Off / Minimal / Low / Medium / High / Max). Manually setting it tofalsedisables it.
Conclusion¶
This plugin fills the gap of the static snapshot through live probing, automatically adding newly released models, removing deprecated models, and marking vision capabilities. All probe requests carry the headers from the provider’s route configuration. Some aggregation gateways (such as OpenCode Go) require the x-opencode-session request header. Make sure the configuration is correct.