Luck9Star/dsh-gateway-provider0

dsh-gateway-provider

通用 LLM 网关模型提供商插件:支持将 NewAPI、LiteLLM、Higress 等兼容 OpenAI 的网关挂载为路由,自动发现模型并分发。

AI 分析

用于接入第三方 LLM 网关。适合需要统一管理多平台大模型、使用 NewAPI/LiteLLM 等网关进行模型分发和参数微调的用户。

套件
dsh-gateway-provider
版本
1.0.2
授權
MIT
最近更新
2026年8月15日

安裝

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

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 / …).

FieldDefaultDescription
labelNewAPIDisplay name of the default gateway route
apiKeyEnvNEWAPI_API_KEYCredential reference (environment variable name)
baseURLenv NEWAPI_BASE_URL / NEWAPI_API_URLhttps://api.newapi.aiGateway base URL (unused when protocol URLs are set)
flavornewapiGateway template: newapi / litellm / higress / openai-compatible / custom
openaiURLFull chat-completions endpoint URL (custom template; empty = protocol disabled)
responsesURLFull Responses endpoint URL (custom template; empty = protocol disabled)
anthropicURLFull Anthropic messages endpoint URL (custom template; empty = protocol disabled)
modelsUrlhttps://models.dev/models.jsonmodels.dev source (file: URLs work offline)
useModelsDevtrueEnrich gateway models with models.dev parameters
extendedReasoningLevelsfalseWiden the unknown-model reasoning fallback to off~max (default off/low/medium/high)
sortModelsByReleasetrueSort the picker newest-first by release date (unknown dates first)
catalogModeautoModel-list source: auto / v1 / management
catalogTtlMs1800000Model-list cache freshness window
includeChatOnlytrueOnly expose chat-capable models to the picker
excludePatternsimage/speech/embed/…Regex patterns excluding models from the picker
endpointPriority["openai-response","anthropic","openai","gemini"]Wire-format preference order (first match wins per model)
userId1New-Api-User header for the management API
maxTokens32768Output cap fallback when models.dev lacks data
defaultContextWindow128000Context window fallback when models.dev lacks data
streamIdleTimeoutMs300000Stream idle watchdog
retryPolicystandardSame shape as llm-deepseek