dsh-magpie-route
Manifest validShows the real upstream model behind a magpie routing-group alias in the composer dock, refreshed from the local gateway route record; read-only, no command or tool.
dsh-magpie-route

A DeepSeek Harness (dsh) plugin that shows the real upstream model behind a magpie routing-group alias, directly below the composer.
DSH's model picker only knows the routing-group alias you configured (for example magpie/group/daily). The local magpie gateway decides which upstream provider/model actually serves each request, and that can change from turn to turn. This plugin reads the gateway's own route record and shows the real result.
● magpie real route · 13:32 magpie/group/daily → workbuddy/glm-5.3
Features
- Composer dock line — sits below the composer, refreshes every 15 seconds, and refreshes immediately on click. Shows the time, the asked alias, the real
provider/model, and the matched routing rule. - Per DSH session — the Host half tags each magpie inference with
X-Magpie-Session, so the gateway can report this session's current/last route; an in-flight request shows its already-picked target with a "进行中 / in flight" marker. - Follows the DSH UI language — the line reads
magpie real routein English andmagpie 真实路由in Chinese (and switches live when the UI language changes). - Green dot = a route; red dot = the gateway is unreachable (click to retry); grey dot = no route yet.
- Read-only: it sends no model request, changes no routing, and only adds one transport header.
- No command and no agent tool — this plugin only displays the route.
Requirements
- DeepSeek Harness with the composer dock slot (0.2.x).
- A running magpie gateway. The plugin follows the endpoint DSH already uses for the
magpieprovider, so it tracks whatever host/port your DSH profile configures (defaulthttp://127.0.0.1:3425).
Install
Install the dsh-magpie-route package into your DSH profile (Plugin Manager → Add plugin, or install_bundle with the npm spec), then reload/restart so the client bundle is picked up.
For a local checkout instead, install the bundle directory with plugin_manager install_bundle and refresh the page.
Configuration
No configuration is required. The Host half discovers the gateway from DSH itself: every magpie inference reports its resolved endpoint through llm-pi-ai/request-headers, and before the first inference it reads llm-pi-ai's providers.magpie.baseURL (then magpie-anthropic, then http://127.0.0.1:3425). An explicit baseURL in the plugin row's config wins, so you only set it to point at an address DSH does not know about.
How it works
- The Host half derives the gateway root from the
baseURLthat DSH reports for each magpie inference through thellm-pi-ai/request-headerswaterfall (no config-file parsing), contributesX-Magpie-Session: <dsh session id>(a header only; no request-body, model, or tool change), then readsGET {baseURL}/v1/magpie/route?session=<dsh session id>for this session's current/last route. - Before the first inference it reads
llm-pi-ai's configuredproviders.magpie.baseURLfrom the live Loader config (falling back tohttp://127.0.0.1:3425), so the first paint already uses the right port. GET {baseURL}/v1/magpie/traceis the fallback for the first paint, before any inference has happened in this Host process.- The client half renders the composer-dock line by polling the package's same-origin route
/plugins/magpie-route/route, because the magpie gateway sends no CORS headers. The route checks DSH'sconnection.requestRejection(Host/Origin trust and browser authentication) before serving data, in addition to rejecting a mismatchedOriginheader.
Limitations
- Shows this session's current/last route. An in-flight request shows its already-picked target with a "进行中 / in flight" marker; the final served model is still only confirmed after magpie finishes. On the first paint (before any inference), it falls back to the global latest settled
dshtrace row. - The Host half remembers the most recent DSH session that sent a magpie request. If you open another session that has not requested anything yet, the dock may still show the previous session's route until that new session runs.
tracekeeps a recent window (about 60 rows), not full history. For full history usemagpie usage --csv.tracereportsprovider/model; the finalserved_model(for examplehy4-free) appears inmagpie usage --csv.- Routing groups use session affinity and rules, so the "current real model" can change per turn.
- The gateway address mirrors whatever DSH has configured for the
magpieprovider. If that DSH value is stale (for example after moving magpie without reconnecting it), the dock shows the same stale endpoint; setconfig.baseURLto correct it.
Uninstall
Remove the dsh-magpie-route bundle from Plugin Manager, or remove_bundle it from the profile.
License
MIT. This is an unofficial integration; magpie is a separate product, and this project is not affiliated with it.
Comments
Loading…
Similar plugins
DeepSeek Harness (DSH) plugin: Embeds upstream quota and usage progress rings from your local Magpie gateway (127.0.0.1:3425) right beside the composer context meter, with session-aware active model t
★ 0
dsh plugin --profile web add dsh-magpie-usageby Hongcheng-LI
DSH plugin: Magpie gateway quotas in your composer — subscription windows, prepaid balances, relay stations. 输入框里看 Magpie 全部账号额度与用量
★ 0
MIT
JavaScript
Nov 3, 2026
dsh plugin --profile web add dsh-magpie-quotaby msudustin
Live Magpie gateway in the DSH sidebar: routing, spend, quotas, model speed — plus a settings page with display styles and per-block switches
★ 0
MIT
JavaScript
Nov 16, 2026
dsh plugin --profile web add @local/dsh-magpie-monitorby SereneJi
Publishes the desktop shell's file-path bridge as the host-path seam the composer reads, so files and folders dropped into the composer become @path references instead of uploaded copies (images still
★ 0
MIT
JavaScript
Oct 14, 2026
dsh plugin --profile web add dsh-host-pathsby CARVIN94
An AI routing gateway that runs as a DSH plugin. Adds a Routing System sidebar panel for suppliers, account pool, fallback combos and API keys, and serves an OpenAI-compatible endpoint at http://local
★ 15
↓ 1k/wk
MIT
TypeScript
Nov 4, 2026
dsh plugin --profile web add dsh-router-coreby prgrmrwy
DeepSeek Harness plugin: connect a self-hosted Magpie gateway as one LLM provider with models grouped by upstream provider, read-only usage cards, model visibility, default effort and per-session fast mode
★ 5
MIT
TypeScript
Nov 10, 2026
dsh plugin --profile web add dsh-magpie-connector