Luck9Star/dsh-gateway-provider ↗★ 0
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
AI Analysis
用于接入第三方 LLM 网关。适合需要统一管理多平台大模型、使用 NewAPI/LiteLLM 等网关进行模型分发和参数微调的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Luck9Star/dsh-gateway-providerREADME
Read the full README ↗Configuration reference
Section llm-newapi: of $DSH_HOME/settings.yaml. The flat fields
(baseURL / apiKeyEnv / …) seed the default newapi route; gateways in
the gateways array support most of the same fields per gateway
(label / apiKeyEnv / flavor / catalogMode / endpointPriority / …).
| Field | Default | Description |
|---|---|---|
label | NewAPI | Display name of the default gateway route |
apiKeyEnv | NEWAPI_API_KEY | Credential reference (environment variable name) |
baseURL | env NEWAPI_BASE_URL / NEWAPI_API_URL → https://api.newapi.ai | Gateway base URL (unused when protocol URLs are set) |
flavor | newapi | Gateway template: newapi / litellm / higress / openai-compatible / custom |
openaiURL | – | Full chat-completions endpoint URL (custom template; empty = protocol disabled) |
responsesURL | – | Full Responses endpoint URL (custom template; empty = protocol disabled) |
anthropicURL | – | Full Anthropic messages endpoint URL (custom template; empty = protocol disabled) |
modelsUrl | https://models.dev/models.json | models.dev source (file: URLs work offline) |
useModelsDev | true | Enrich gateway models with models.dev parameters |
extendedReasoningLevels | false | Widen the unknown-model reasoning fallback to off~max (default off/low/medium/high) |
sortModelsByRelease | true | Sort the picker newest-first by release date (unknown dates first) |
catalogMode | auto | Model-list source: auto / v1 / management |
catalogTtlMs | 1800000 | Model-list cache freshness window |
includeChatOnly | true | Only expose chat-capable models to the picker |
excludePatterns | image/speech/embed/… | Regex patterns excluding models from the picker |
endpointPriority | ["openai-response","anthropic","openai","gemini"] | Wire-format preference order (first match wins per model) |
userId | 1 | New-Api-User header for the management API |
maxTokens | 32768 | Output cap fallback when models.dev lacks data |
defaultContextWindow | 128000 | Context window fallback when models.dev lacks data |
streamIdleTimeoutMs | 300000 | Stream idle watchdog |
retryPolicy | standard | Same shape as llm-deepseek |