autorouter0-ai/dsh-llm-autorouter1

dsh-llm-autorouter

AutoRouter (model routing gateway / relay) LLM adapter for the DeepSeek Harness

包名
dsh-llm-autorouter
版本
0.1.1
许可证
NOASSERTION
最近更新
2026年8月21日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:autorouter0-ai/dsh-llm-autorouter

Configuration

The bundle has two entries with one installation: the Host entry supplies the LLM adapter, settings namespace, and model discovery; the browser entry supplies the AutoRouter card on the Web Plugins page.

Web UI (recommended)

After install, open the AutoRouter card under Plugins. Enter the gateway URL https://api.autorouter.top and API key (generated in the AutoRouter console). The key is stored only through the credentials service (AUTOROUTER_API_KEY by default) — never in settings.yaml or the browser.

Use Fetch models and Import selected to populate the models allowlist that chat selectors read from.

Headless / CLI profiles

Headless profiles load only the Host entry. Set AUTOROUTER_API_KEY in the launching environment, or store the key through the credentials service.

Config fields

Defaults apply when the bundle is installed with no extra config. Override any field in your profile's cordis.patch.yml or a --patch overlay:

FieldDefaultMeaning
baseURL$AUTOROUTER_BASE_URLhttps://api.autorouter.topGateway origin, without a trailing slash.
apiKeyEnvAUTOROUTER_API_KEYCredential reference resolved per request through the credentials service.
providers['autorouter']Provider routes this adapter owns.
thinking(neutral)'enabled' / 'disabled'. Neutral: nothing is sent; upstream keeps its own default.
reasoningEffort(neutral)'off' / 'low' / 'high' / 'max'. When set, materialized into requests that omit one.
defaultContextWindow128000Context capacity when the selected model has no exact value.
models[]Saved chat-model allowlist ({ id, name?, description?, contextWindow?, maxTokens?, inputModalities? }).
streamIdleTimeoutMs300000Max idle time while one stream read is outstanding.
discoveryTimeoutMs10000Network timeout for model listing.
retryPolicynormal defaultsProvider-owned request retry policy.

Example cordis.patch.yml:

- insert:
    - id: llm-autorouter
      name: dsh-llm-autorouter
      config:
        baseURL: https://api.autorouter.top
        apiKeyEnv: AUTOROUTER_API_KEY
        thinking: enabled
        reasoningEffort: high
        models:
          - id: deepseek-v4-flash
            contextWindow: 1000000

Environment overrides for local overlays:

  • AUTOROUTER_BASE_URL — gateway origin
  • AUTOROUTER_API_KEY_ENV — credential env var name

Usage

Point an agent at the autorouter provider:

- id: agent-loop
  name: '@deepseek-ai/dsh-agent-loop'
  config:
    agents:
      - id: main
        provider: autorouter
        model: deepseek-v4-flash   # any model id your gateway routes

Thinking mode

Neutral by default: with no thinking / reasoningEffort configured, neither field is sent on the wire and each upstream channel keeps its own default. AutoRouter relays the request body per channel (including DeepSeek-V4 thinking inferred from model-name suffixes).

  • Set reasoningEffort: high (etc.) to send thinking + reasoning effort on every request.
  • Set thinking: disabled to force thinking off on every request.
  • reasoning_content from DeepSeek-family channels is streamed back as reasoning blocks.