XHToken/dsh-intelligent-router ↗★ 3
dsh-llm-router
Intelligent LLM routing plugin for DeepSeek Harness — multi-model route groups, smart strategies, automatic failover, quota management, cache-affinity Stays, data anonymization, and a visual Settings UI 适合配置了多个API渠道、需要根据规则自动分发请求并进行故障转移的重度用户。
같은 패키지 이름의 다른 저장소
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XHToken/dsh-intelligent-routerUsage demo
The screenshot below shows a real DSH chat flow with AUTO - Intelligent Router: the request is classified, matched against routing rules, and served by the selected provider/model member.

Configuration Reference
Persisted by the Settings UI into the profile's cordis.patch.yml (id: llm-router). A minimal example:
- id: llm-router
name: 'dsh-llm-router'
config:
enabled: true
defaultGroup: 'default'
routeGroups:
- id: 'default'
name: 'Default'
strategy: 'order' # order | smart | rotate | usage
stays: 'session' # off | turn | auto | session
enabled: true
members:
- provider: 'ollama'
model: 'SparkLLM/Spark-X2.5-1.7B'
priority: 1
enabled: true
protocol: 'openai-responses'
- provider: 'qwen37plus'
model: 'qwen3.7-plus'
priority: 2
enabled: true
protocol: 'anthropic-messages'
- provider: 'deepseekv41flash'
model: 'deepseek-v4.1-flash'
priority: 3
enabled: true
protocol: 'openai-responses'
classifierModel: # used by intent rules
provider: 'ollama'
model: 'SparkLLM/Spark-X2.5-1.7B'
rules:
- minTokens: 10000
hasImage: true
intent: '复杂问题'
target: { provider: 'qwen37plus', model: 'qwen3.7-plus' }
- minTokens: 2000
intent: '复杂问题'
target: { provider: 'deepseekv41flash', model: 'deepseek-v4.1-flash' }
- intent: '简单问题'
target: { provider: 'ollama', model: 'SparkLLM/Spark-X2.5-1.7B' }
fallback:
enabled: true
maxRetries: 3 # total attempts per request
retryDelay: 1000
quotaTracking:
enabled: true
See cordis.patch.yml.example for the full annotated schema.