AI Agent Hub
Back to plugins
🤖

dsh-model-proxy

Model Inference Updated 2026.08.23

Run the following command in DeepSeek Harness:

dsh plugin install biyuhao/dsh-model-proxy

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

Run dsh plugin install biyuhao/dsh-model-proxy in the DeepSeek Harness terminal to install this plugin; full source is available at https://github.com/biyuhao/dsh-model-proxy

About this plugin

Some model endpoints are gated behind regional or network restrictions and return a 403 RegionError on direct connections, while other models from the same provider work perfectly fine. Dropping a proxy into global environment variables drags every request through the tunnel; swapping a provider base URL hides the real upstream. dsh-model-proxy routes specific provider/model pairs through a proxy at the transport layer, leaving everything else direct and never rewriting the configured endpoint.

Rules are expressed as {provider, model, proxyUrl, enabled} with matching specificity from exact model to prefix wildcard to full match, and an optional purpose filter lets chat traffic go through the proxy while background calls (e.g. compaction) stay direct. Supported protocols include http, https (via undici ProxyAgent) and socks5 / socks5h (DNS resolved at the proxy). Proxy credentials can live in the DSH credentials service, referenced by name from rules. Newly added proxies are connectivity-probed once before use, with results logged to the host. Rule changes take effect on the next llm/stream without disturbing in-flight streams. Everything is managed through the Settings UI under Plugins → Model Proxy, where provider and model fields are fed by the live host catalog, and hand-written YAML or gateway wildcards are also accepted.

The plugin is entirely non-invasive: it reversibly wraps globalThis.fetch, requires no fork of dsh-llm, modifies no packages, and a simple dispose restores the original fetch on uninstall. It is ideal for DSH users who need a proxy for one or two model endpoints without paying the cost of a global proxy side-effect.

Use Cases

  • A specific model endpoint returns 403 RegionError on direct connections while its siblings work fine
  • Routing different proxy protocols (http, socks5) per model without a global proxy side-effect
  • Letting chat traffic use a proxy while background compaction calls stay direct

Best For

  • DSH users who need a proxy for one or two model endpoints without a global proxy overhead
  • Integrators who want transport-level routing without rewriting provider base URLs
  • Individuals and teams accessing region-restricted model endpoints via SOCKS5 or HTTP proxies