AI Agent Hub
Back to plugins
🤖

dsh-llm-extra-retry

Model Inference Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install lim12137/dsh-llm-extra-retry

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install lim12137/dsh-llm-extra-retry in your terminal to install this plugin (source: https://github.com/lim12137/dsh-llm-extra-retry).

About this plugin

In the DSH model-inference failure-recovery waterfall, upstream error responses are sometimes unrecognizable by dsh-llm-pi-ai and fall into the PI_AI_ERROR fallback code. The default policy in @deepseek-ai/dsh-llm-retry (5 bounded exponential backoff from 0.5s to 10s with 10% jitter) only acts on known error codes, so PI_AI_ERROR is passed straight through and the request fails with no additional retry opportunity.

dsh-llm-extra-retry injects a fully independent recovery policy into the waterfall: upon detecting PI_AI_ERROR it waits 20 seconds and retries the request once; every other error code is passed through via next() untouched, preserving the default strategy behavior exactly. The two policies carry separate policyKeys, so their bookkeeping never interferes with each other. Aborting the request or uninstalling the plugin immediately cancels any pending backoff, and DELAY_MS and MAX_RETRIES are exposed as constants for fine-tuning wait duration and retry count.

This plugin is well-suited for developers whose DSH workflow frequently hits transient upstream failures that land on an unrecognized error code and slip past the default retry strategy. It adds one extra chance exactly where the default policy cannot reach, with zero intrusion and zero conflict.

Use Cases

  • Upstream LLM returns unrecognized error text causing immediate request failure
  • The fallback PI_AI_ERROR code is not covered by default backoff and needs one extra auto-retry
  • Transient network blips or brief upstream outages where seamless recovery is desired

Best For

  • Developers whose DSH workflow frequently hits transient upstream failures
  • AI application engineers who need an extra retry for error codes the default policy skips
  • Platform ops staff focused on request success rate and fault tolerance