dsh-llm-pi-ai-headers
Run the following command in DeepSeek Harness:
dsh plugin install xsluck/dsh-llm-pi-ai-headers
Paste the following prompt into your AI chat to install this plugin:
Search for dsh-llm-pi-ai-headers in the DeepSeek Harness plugin marketplace and install it; the source repository is available at https://github.com/xsluck/dsh-llm-pi-ai-headers
About this plugin
When using dsh with certain LLM providers, the official llm-pi-ai adapter filters out user-agent as a reserved attribution header, causing requests to be rejected with 429 or 403 on services like the OpenCode Zen free tier. A single API key hitting rate limits is another common bottleneck for high-throughput workloads. dsh-llm-pi-ai-headers addresses both issues while keeping the official adapter fully intact: SSE parsing, reasoning pass-through, tool calls, and context-window detection all work exactly as they would without the plugin.\n\nThe design philosophy is augment, not replace. The plugin hooks into the official PiAiAdapter streamSimple via a transformHeaders callback that fires after all headers are merged, restoring the filtered user-agent and injecting round-robin API keys into a configurable header (default: Authorization). Every setting lands in the official llm-pi-ai.providers namespace, so hand-writing settings.yaml and editing through the UI are fully equivalent, and no re-patching is needed after a dsh upgrade. An editable retry-policy panel covers mode, max retries, retryable error codes with backoff tuning, and a one-click restore-to-defaults. A key-health dashboard tracks per-key call counts, failure counts, and the last error code, with unhealthy keys highlighted in red for quick identification.\n\nBuilt for dsh users who hit provider rejections due to a missing user-agent, who need to rotate multiple API keys to stay under rate limits, or who want to attach custom headers to specific providers. If you are currently on the legacy manual-patch workflow, the standard installation migrates cleanly and eliminates the recurring need to re-patch after every dsh upgrade.
Use Cases
- A provider rejects non-default User-Agent with 429/403 and a custom header is needed to pass through
- A single API key keeps hitting rate limits and multiple keys need round-robin rotation to stay under quota
- You need to attach custom auth, tracking, or retry headers to a specific provider while keeping the official adapter fully functional
Best For
- dsh users whose requests are blocked by provider-side header or rate-limit checks
- Developers holding multiple API keys for the same provider who need automatic rotation to spread quota
- Power users who want a lightweight augmentation over the official adapter without re-patching after every dsh upgrade
Related Plugins
Free web search plugin for DeepSeek Harness with web search, X search, and page fetch; no signup or API key required, with automatic multi-engine failover.
AnySearch-powered web and vertical search plugin for DeepSeek Harness, offering real-time search, cleaned URL content, concurrent batch search via native web_search/web_fetch, no API key required.
Pixel-perfect webpage clone tool that uses an agent harness to turn any webpage into a scored, full-page React replica.
A bilingual cost-tracking plugin for DeepSeek Harness with session/daily cost, budget, official & custom provider balance, coding plan quotas, peak/off-peak pricing alerts, and history stats.