d3vmeh/dsh-model-pin

Keeps every model request inside a per-provider allow-list, redirecting strays to a fallback instead of reloading local models.

Stops model roulette on machines that can only hold one local model: background helpers and stray requests were evicting the loaded model, costing minutes of reloading and the prompt cache. The harder problem it names is subagent inheritance — a subagent inherits the model its parent session was created with rather than the one it currently uses, so it quietly lands on a stale route; resolving at the request layer catches that case, which per-session configuration cannot. It also warns whenever a request would make a llama.cpp router reload models, so the cost is visible even when you allow it.

Models & Providers ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add dsh-model-pin

The npm line, then configure the allow-list in ~/.dsh/profiles/web/cordis.patch.yml: an allowed list per provider, plus fallback (defaulting to the first allowed entry) and action, which is redirect by default or reject. With reject, a disallowed request fails the turn with a message naming the model and the allowed set, and dsh's retry does not loop on it. The pin has the last word over the picker because it registers at profile load, before any agent exists, and first-registered waterfall listeners are outermost in cordis.

Compatibility

DSH with any profile you can patch, and a per-provider allow-list that reflects what the machine can actually keep loaded. It enforces at agent/request — the resolution layer whose documentation calls returning a replacement "the sanctioned switch path" — so subagents, retries and pinned routes are all resolved against the list at step boundaries. Two honest caveats: the web model picker does not know about the pin and may keep showing the model you clicked while requests run on the fallback, and the llama.cpp router reload warning is observation only — it cannot block a reload, so pair it with a one-entry allow-list if you want reloads gone entirely.

Details

Alternatives

yusufameri/dsh-t3-model-picker · Mhmd7-7/dsh-ai-model-hub · jiay98528-dev/dsh-model-sync

More plugins in Models & Providers

Browse more in Models & Providers

Guides for Models & Providers plugins