DeepSeek Harness (DSH) provides adapters for official models by default. When models are hosted behind NewAPI, LiteLLM, Higress, or any OpenAI-compatible gateway backend, maintaining a static model list and guessing parameters such as context window and output limit is usually required. This plugin allows users to mount a gateway directly as a provider route, eliminating the manual maintenance steps.
What This Is¶
dsh-gateway-provider is a general-purpose LLM gateway provider plugin maintained by Luck9Star. It mounts NewAPI, LiteLLM, Higress, or any OpenAI-compatible gateway as a provider route, enabling use of models behind these gateways in DeepSeek Harness.
Core Features¶
- Mount Gateway Routes: Mount NewAPI / LiteLLM / Higress / any OpenAI-compatible gateway as a provider route.
- Automatic Model Discovery: Automatically discover the model list from the gateway API.
- Parameter Enrichment: Retrieve real parameters (context window, output limit, reasoning support) from models.dev to enrich model information.
- Native Protocol Dispatch: Dispatch requests using native protocols (OpenAI / Anthropic / Gemini) via the pi-ai SDK.
- Multi-Gateway Support: Supports using multiple gateways simultaneously, with each gateway having independent routes and keys.
- Web UI Configuration: Provides a settings page UI for configuration without editing YAML files.
Installation and Enablement¶
- Install the plugin:
dsh plugin --profile web add dsh-gateway-provider
- Store the key (recommended):
echo "NEWAPI_API_KEY: sk-REPLACE_WITH_YOUR_KEY" >> ~/.dsh/.credentials.yaml
- Restart and open settings:
dsh --profile web
Navigate to **Settings → Gateway Models**.
Typical Usage¶
In Gateway Models on the settings page, add a gateway. Select a template (NewAPI / LiteLLM / Higress / OpenAI-compatible / fully custom), enter the gateway address, configure the key variable, click Test to test the connection, and finally click Sync to synchronize the model list.
Use Cases and Notes¶
- Runtime Environment: Requires DeepSeek Harness (dsh) with the
webprofile, because the settings page is a Web UI extension; the provider itself can run under any profile. - Credential Storage: A gateway API key is required. The key is stored in dsh’s credential store (
~/.dsh/.credentials.yaml). - Permission Note: The plugin runs with the permissions of the current dsh process.
Summary¶
By mounting gateways and automatically enriching model parameters, this plugin solves the problem of cumbersome manual configuration maintenance and inaccurate parameters when using third-party gateway models in DSH. For more details, refer to the plugin directory or the GitHub repository.