Luck9Star/dsh-gateway-provider ↗★ 4
dsh-gateway-provider
Generic LLM gateway model provider plugin for DeepSeek Harness: mounts newapi / LiteLLM / Higress / any OpenAI-compatible gateway as provider routes, auto-discovers the model list, enriches every model with models.dev parameters, and dispatches each model over its native wire protocol (OpenAI / Anthropic / Gemini) via the pi-ai SDK 适合需要将LiteLLM、NewAPI等网关模型接入DSH的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Luck9Star/dsh-gateway-providerREADME
Read the full README ↗Configuration reference
Optional — everything below has a working default. Config lives in the
llm-newapi: section of ~/.dsh/settings.yaml (the settings page edits
the same keys). The frequently used ones:
| Key | Default | Meaning |
|---|---|---|
baseURL | https://api.newapi.ai | Your gateway's base URL. Env fallbacks: NEWAPI_BASE_URL, NEWAPI_API_URL. |
apiKeyEnv | NEWAPI_API_KEY | Which env/credential variable holds the key. |
label | NewAPI | Route label shown in the picker. |
flavor | newapi | Template label only (newapi / litellm / higress / openai-compatible / custom). |
gateways | — | Array of extra gateways: { id, baseURL, apiKeyEnv, label, … }, each becoming a gateway: route. |
models | — | Per-model overrides: { id, name, disabled, protocol, contextWindow, maxTokens, reasoningLevels }. |
useModelsDev / modelsUrl | true / models.dev | Parameter enrichment source (supports file: URLs for offline). |
excludePatterns | image/speech/… | Regex list of model ids to keep out of the picker (matched case-insensitively). |
sortModelsByRelease | true | Newest models first. |
catalogMode | auto | v1 (/v1/models only) / management (newapi user API) / auto. |
endpointPriority | responses → anthropic → openai → gemini | Which protocol to prefer when a model supports several. |
openaiURL / responsesURL / anthropicURL | — | Fully-custom gateways only: per-protocol endpoint URLs; unset = that protocol off. |
maxTokens / defaultContextWindow | 32768 / 128000 | Fallbacks when models.dev has no data. |
streamIdleTimeoutMs | 600000 | Idle timeout while streaming. |
headers | — | Extra HTTP headers sent to the gateway. |