AI Agent Hub
Back to plugins
🧰

dsh-llm-pi-ai-headers

Web Tools Updated 2026.08.25

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