Preface¶
The DeepSeek Harness (DSH) ecosystem emphasizes modularity, aiming to encapsulate specific capabilities into pluggable modules. When configuring an LLM gateway, developers typically need to handle routing, model discovery, and API key management manually. The gateway-config plugin, through its web settings panel and Host tooling, addresses the need to integrate any OpenAI-compatible gateway (i.e., one that supports the GET /models endpoint) directly as a provider within DSH.
Plugin Overview¶
- Name: gateway-config
- Positioning: DSH web profile and TapSVC model configuration plugin
- Owner: iceprosurface
- Category: Model Inference
- License: MIT
- Stars: 1
Core Features¶
This plugin provides the following capabilities:
- Host tooling: Provides the
gateway_configurecommand-line utility. - Web settings panel: Offers an LLM Gateway Configuration interface with support for Chinese and English localization.
- Model discovery: Automatically discovers models supported by the gateway via the
GET /modelsinterface, filtering out non-chat models. - Capability mapping: Supports configuring reasoning-effort levels and text/image input capabilities per model.
- Credential management: Manages a single credential per route, stored as
<ROUTE>_API_KEY(e.g.,CINDY_API_KEY). These credentials are stored in DSH-managed local credentials and are not written to this repository. - OpenAI Codex support: For the
openai-codexprovider, supports native ChatGPT OAuth login and automatically refreshes access tokens via pi-ai. - Provider presets: Provides fixed preset routes (e.g., Cindy, Sub2API, Generic); dynamic route creation is not supported.
Installation and Activation¶
This is a plugin package that must be installed into an existing DSH profile.
dsh plugin --profile web add https://github.com/iceprosurface/dsh-gateway-config.git
If your DSH version requires the Git URL format, use:
dsh plugin --profile web add git+https://github.com/iceprosurface/dsh-gateway-config.git
After installation, if the plugin entry does not sync automatically, add the following to $DSH_HOME/profiles/web/cordis.patch.yml:
- insert:
- id: gateway-config
name: gateway-config
Finally, restart the DSH web process.
Typical Usage¶
1. Web UI Configuration¶
- Open the LLM Gateway Configuration panel.
- Select the gateway type from the dropdown list (e.g., Cindy, Sub2API, Generic, or other OpenAI-compatible public providers).
- Enter the Base URL (the OpenAI-compatible root path of the gateway, typically ending in
/v1). - Click Fetch Models; the system will list supported chat models.
- Check the models you wish to enable and mark a default model.
- Click Write Configuration. At this point, the API key will be automatically populated into DSH local credentials, so you do not need to enter it again in the UI.
2. OpenAI Codex OAuth Login¶
- Select
openai-codexin the gateway selector. - Click Sign in to ChatGPT.
- The browser will open the authorization page; after completing the callback, DSH will store the authorization as
llm-pi-ai/openai-codex. - You can then discover and import models as with a standard gateway.
3. Command-Line Usage¶
Invoke directly via the Host tool:
gateway_configure(apiKey?, baseURL?, route, displayName, defaultModel?)
Parameter descriptions:
* route: Required. Route name (e.g., cindy).
* baseURL: Gateway base address.
* apiKey: API key.
* displayName: Display name.
* defaultModel: Default model name.
Note: For openai-codex, after completing OAuth login, apiKey and baseURL may be omitted.
Important Notes¶
- Security: The plugin runs with the permissions of the current DSH process. Do not commit API keys, private gateway addresses, credential files, personal DSH settings, session data, or runtime databases to this repository.
- Provider limitations: The plugin only offers fixed preset providers; manual creation of ad-hoc routes is not supported.
- Credential storage: All keys are managed locally by DSH and are not written to this code repository.
Conclusion¶
The gateway-config plugin lowers the barrier to integrating various LLM gateways via the standardized OpenAI GET /models interface and a visual configuration panel. For developers who need to manage multiple private or public gateways, this is a concise and secure configuration solution.
- Directory page: https://www.skillhub.cn/plugins/iceprosurface/dsh-gateway-config
- GitHub repository: https://github.com/iceprosurface/dsh-gateway-config