Luck9Star/dsh-gateway-provider ↗★ 4

dsh-gateway-provider

接入兼容OpenAI的通用大模型网关路由 适合需要将LiteLLM、NewAPI等网关模型接入DSH的用户。

套件
dsh-gateway-provider
相容性
待驗證
Harness 依賴範圍
^0.1.2-rc.1
Cordis 依賴範圍
^4.0.2
版本
1.0.12
授權
MIT
最近更新
2026年9月11日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Luck9Star/dsh-gateway-provider

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:

KeyDefaultMeaning
baseURLhttps://api.newapi.aiYour gateway's base URL. Env fallbacks: NEWAPI_BASE_URL, NEWAPI_API_URL.
apiKeyEnvNEWAPI_API_KEYWhich env/credential variable holds the key.
labelNewAPIRoute label shown in the picker.
flavornewapiTemplate 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 / modelsUrltrue / models.devParameter enrichment source (supports file: URLs for offline).
excludePatternsimage/speech/…Regex list of model ids to keep out of the picker (matched case-insensitively).
sortModelsByReleasetrueNewest models first.
catalogModeautov1 (/v1/models only) / management (newapi user API) / auto.
endpointPriorityresponses → anthropic → openai → geminiWhich protocol to prefer when a model supports several.
openaiURL / responsesURL / anthropicURL—Fully-custom gateways only: per-protocol endpoint URLs; unset = that protocol off.
maxTokens / defaultContextWindow32768 / 128000Fallbacks when models.dev has no data.
streamIdleTimeoutMs600000Idle timeout while streaming.
headers—Extra HTTP headers sent to the gateway.