Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture, with extensibility achieved through plugins. When using DSH, integrating ModelGo models requires a dedicated plugin to mount ModelGo’s model catalog and API capabilities into DSH’s model selector. dsh-modelgo-provider is the plugin that does exactly that.
Plugin Overview¶
dsh-modelgo-provider is a model provider plugin for ModelGo, maintained by the modelgo team. It adds ModelGo’s models to DSH’s model selector, allowing DSH users to directly select and use ModelGo models. The plugin itself does not serve models; it is responsible solely for fetching the model list from ModelGo’s server and forwarding requests.
Core Features¶
- Model list retrieval: The plugin sends a request to ModelGo’s
/v1/modelsendpoint to fetch the list of models available for the current account. The list is cached for 10 minutes and persisted to disk, so it can be used immediately after a restart. - Protocol adaptation: Based on the endpoint information provided by ModelGo for each model, the plugin automatically uses the corresponding protocol. Claude models use
/v1/messages; other chat models use/v1/chat/completions. - Parameters & capabilities: Model capabilities such as context window size and image input are taken directly from the server-side published metadata. Reasoning levels reference
data/model-profiles.json; if no level is selected, the server-side default behavior applies. - Interactive capabilities: Streaming output, tool calling, and reasoning replay are handled by DSH’s built-in pi-ai adapter, behaving consistently with native providers.
- Limitations: The current version covers chat models only. Embedding, image, video, and audio models are not listed.
Installation & Activation¶
Before installing, ensure your DSH version is: >=0.2.1-rc.1 <0.3.0.
Desktop installation:
1. Open the DSH desktop application.
2. Navigate to Plugins → Add plugin.
3. Enter @model-go/dsh-modelgo-provider and confirm.
Command-line installation (web profile):
dsh plugin --profile web add @model-go/dsh-modelgo-provider@0.3.1
Use the corresponding --profile parameter for other profiles (e.g., tui, headless).
The plugin is installed via its npm package name rather than a GitHub URL, so that DSH can manage updates.
Setting Up the API Key¶
After installation, you need to configure your API Key. This is the only required configuration step:
- In the DSH desktop app, go to Plugins → ModelGo.
- Paste your ModelGo API Key (starts with
mgk_), then click Verify and save. - Return to the chat interface, click the model name in the bottom-right corner, and select a model from the ModelGo group. No DSH restart is needed.
If you are running DSH in headless mode or via scripts, you can set the environment variable at startup:
export MODELGO_API_KEY=mgk_...
The key is validated against the ModelGo site before being saved; invalid input is rejected immediately. The key is stored in DSH’s credential store, is not written to any config file, and will not be displayed again.
Configuration Options (Optional)¶
The plugin’s default behavior covers most use cases. To override, add the following to your profile’s cordis.patch.yml:
- id: modelgo
config:
sites:
modelgo:
models:
- id: some-new-model
contextWindow: 256000
input: [text, image]
reasoningLevels: [off, low, high]
Available configuration keys:
- sites.modelgo.enabled: Whether to display the ModelGo group in the model selector. Defaults to true.
- sites.modelgo.apiKeyEnv: The environment variable name for the API Key. Defaults to MODELGO_API_KEY.
- sites.modelgo.baseURL: ModelGo service URL. Defaults to https://api.modelgo.ai.
- sites.modelgo.displayName: Display name for the group. Defaults to ModelGo.
- sites.modelgo.headers: Additional HTTP request headers.
- sites.modelgo.models: When non-empty, only the listed models are provided; otherwise, all chat models are included.
- catalogTtlMs: Model list cache duration in milliseconds. Defaults to 600000.
- streamIdleTimeoutMs: Streaming idle timeout in milliseconds. Defaults to 300000.
- retryPolicy: Request retry policy. Defaults to DSH’s built-in policy.
Model entries support the following fields: id (required), name, contextWindow, maxTokens, input, reasoningLevels, and api (openai-completions, anthropic-messages, or openai-responses).
FAQ¶
- ModelGo group not visible in the model selector: The API Key has not been saved. Go to Plugins → ModelGo to configure it.
- Key reports as invalid: The key was entered incorrectly or has been revoked. Obtain a new one and paste it again.
- A specific model is not listed: The model’s policy does not allow listing, or the model is not a chat model.
- No update prompt on the plugin page: The plugin was installed via a GitHub URL. Remove it and re-add it using the npm package name.
Use Cases & Notes¶
- Ideal for DSH users who are already using ModelGo and want to select ModelGo models directly within DSH.
- The plugin runs with the same permissions as the DSH process. It is recommended to review the source code and license (MIT) before installing.
Summary¶
dsh-modelgo-provider integrates ModelGo’s models into DSH’s model selector. Once the API Key is configured, models are ready to use immediately. The model list stays in sync with the server, and streaming output and tool calling are supported. For custom model lists or parameter overrides, adjust the settings in cordis.patch.yml.
- Directory page: https://www.skillhub.cn/plugins/modelgo/dsh-modelgo-provider
- GitHub: https://github.com/modelgo/dsh-modelgo-provider