deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
English | 中文
Process-wide per-provider concurrency gate for DeepSeek Harness LLM streams.
One provider account can serve model calls from every session, subagent, workflow worker, title generator, and direct LLM consumer in a DSH Host process. Without a process-wide gate, their aggregate can exceed the provider account's concurrent-request quota and surface as Concurrency limit exceeded for user, please retry later.
llm/stream waterfall listener.Copy llm-concurrency.mjs into your DSH profile directory, then add a patch row to cordis.patch.yml:
- insert:
- id: llm-concurrency
name: ./llm-concurrency.mjs
config:
maxConcurrentRequests:
luna-relay: 3
Restart dsh web, then confirm the effective composition:
dsh --profile web --dump-config | tail
The luna-relay provider is now capped at 3 simultaneously active streams in this Host process; excess calls wait FIFO instead of failing.
luna-relay come fromluna-relay is not a provider this plugin ships. It is a configurable provider route activated by the pi-ai adapter (@deepseek-ai/dsh-llm-pi-ai) through DSH settings — in ~/.dsh/settings.yaml under llm-pi-ai.providers. In the example below it points at an OpenAI-compatible relay endpoint; the API key is read from the environment variable named by apiKeyEnv:
# ~/.dsh/settings.yaml
llm-pi-ai:
providers:
luna-relay:
displayName: OpenaiRelay
apiKeyEnv: DSH_RELAY_API_KEY
api: openai-completions
baseURL: https://your-relay.example.com/v1
reasoning: xhigh
models:
- id: gpt-5.6-luna
name: GPT-5.6 Luna
contextWindow: 272000
maxTokens: 128000
The plugin only needs the provider name to match. Two files work together:
settings.yaml declares the route (luna-relay → endpoint, models, key env).cordis.patch.yml applies the concurrency limit to that same name.# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
- id: llm-concurrency
name: ./llm-concurrency.mjs
config:
maxConcurrentRequests:
luna-relay: 3
Replace luna-relay with any provider name from your own settings (e.g. deepseek-official) to cap it the same way.
llm/stream waterfall signature (options, next) => AsyncIterable (current versions).AbortSignal (Node 18+).MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。