windwhiterain/dsh-model-proxy ↗★ 0

dsh-model-proxy

将特定模型的请求路由至指定代理服务器 适合需要对特定模型或域名配置代理、并在失效时自动回落直连的用户。

套件
dsh-model-proxy
相容性
待驗證
版本
0.1.0
授權
MIT
最近更新
2026年9月25日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:windwhiterain/dsh-model-proxy

Configuration

- id: model-proxy
  config:
    enabled: true
    proxy: http://127.0.0.1:10793
    origins:
      - opencode.ai
    models:
      - grok-*
      - gpt-*-luna
    fallbackToDirect: true
    probeTimeoutMs: 300
    probeCacheMs: 2000
    peekBytes: 16384
FieldMeaning
enabledWhen false the plugin installs nothing and every request keeps its route.
proxyEndpoint the matching models use. http: or https:, with optional credentials.
originsHosts whose models may be routed. Requests to every other host are untouched.
modelsModel patterns; * matches any run of characters, every other character matches itself.
fallbackToDirectWhile the proxy refuses connections, matching requests use the previous route instead of failing.
probeTimeoutMsTCP connect timeout for the reachability probe.
probeCacheMsHow long one probe verdict is reused, so a burst of requests probes once.
peekBytesHow many body bytes may be inspected before giving up on finding a model name.

Edit the row in /profiles/ /cordis.patch.yml (hot-reloaded), or override the same id from a settings layer. A configuration value that cannot be used fails the activation instead of silently routing traffic to the wrong place.