[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112735":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},112735,"DSH-GOD","crackerghost\u002FDSH-GOD","crackerghost","DSH GOD — model router and provider dashboard for DeepSeek Harness",null,"JavaScript",65,10,3,0,1,6,12,49.32,"MIT License",false,"main",true,[],"2026-10-30 12:25:17","2026-11-23 10:37:26","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"icon.svg\" alt=\"DSH GOD — model router and provider dashboard for DeepSeek Harness\" width=\"120\">\n\n# DSH GOD\n\n**English**\n\n  \u003Cimg alt=\"license\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-263146?style=flat-square\">\n  \u003Cimg alt=\"zero dependencies\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdependencies-zero-4b6fff?style=flat-square\">\n  \u003Cimg alt=\"build step\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbuild%20step-none-7da1de?style=flat-square\">\n  \u003Cimg alt=\"dsh kernels\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdsh-0.1.5--0.1.7--rc.2-2f6f4f?style=flat-square\">\n  \u003Cimg alt=\"status\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstatus-beta-f0a441?style=flat-square\">\n  \u003Cbr>\n  \u003Ca href=\"https:\u002F\u002Fwww.notmybugs.com\u002F\">\n    \u003Cimg src=\"assets\u002Fnotmybugs-logo.png\" alt=\"NotMyBugs logo\" width=\"88\">\n  \u003C\u002Fa>\n  \u003Cbr>\n  \u003Cstrong>In collaboration with \u003Ca href=\"https:\u002F\u002Fwww.notmybugs.com\u002F\">NotMyBugs\u003C\u002Fa>\u003C\u002Fstrong>\n\n\u003C\u002Fdiv>\n\n> **Fork note:** DSH GOD is a public fork of [Ebony-Vinyl\u002Fdsh-our-free-model](https:\u002F\u002Fgithub.com\u002FEbony-Vinyl\u002Fdsh-our-free-model). It retains the upstream MIT license and third-party notices. The signed updater, announcement feed and EAC star authorization are still configured for the upstream project; publishing this fork does not redirect those services.\n\n\u003Cdiv align=\"center\">\n\n> All you do is install this plugin in dsh — no login, no sign-up, no API key, no other\n> step of any kind. The frontier models are simply there, DeepSeek V4.1 Flash and\n> Kimi K3 among them. Completely free, with no usage cap.\n>\n> The roster follows upstream, availability is measured from **your own** network\n> egress, the thinking-effort control sends a real budget instead of a prompt hint, and\n> a local OpenAI-compatible forward port comes included.\n>\n> It mounts as a pure plugin: no core changes, no build step, zero dependencies.\n\n\u003C\u002Fdiv>\n\n---\n\n## Highlights\n\n- **Nothing to configure** — install, restart, pick a model. No account, no key, no quota dashboard to register on.\n- **The upstreams are named** — the free lane is OpenCode's Zen gateway at `https:\u002F\u002Fopencode.ai`, and the Kilo channel is Kilo AI's public gateway at `https:\u002F\u002Fkilo.ai`; both are dialled directly, with no third party relaying your traffic. Who serves your requests, and where your data goes, is spelled out in [Where the models come from](#where-the-models-come-from) and the [Disclaimer](#disclaimer).\n- **A roster that tracks upstream** — model set, context length and capabilities are re-fetched on every refresh rather than frozen into the plugin.\n- **The picker offers only what actually answers** — a model the upstream listing names but the gateway refuses to route outright (`Model is unavailable`, a 404 for that id) leaves the dropdown and stays visible in the settings page with its refusal recorded. Everything that is *not* a statement about the model keeps its model reachable: a 5xx from the gateway, a 429 quota window, a timeout or a dropped connection. Region-gated ones move to their own `region-limited` group. If a whole round refuses everything, nothing is hidden: the picker never goes empty.\n- **Announcement center with live push** — the repository owner edits one JSON file and pushes; every installation receives it within one poll cycle. Bodies are HTML rendered through a strict allowlist; `urgent` items open a full-screen modal; optional OS-level notifications.\n- **In-app upgrades** — one click in the settings page: download → SHA-256 verification → backup → atomic replace → read-back verification → hot reload, with automatic rollback if any step fails.\n- **Hot reload** — upgrades and code changes take effect immediately, no app restart; also available as a manual button and an optional file watcher.\n- **Region-aware, per egress** — models gated by geography are separated into their own `region-limited` group instead of failing mid-turn. Switch your network exit and the next probe reclassifies them automatically.\n- **The body decides what it is, not the header** — under load this gateway answers 200 with a JSON `Content-Type` over a perfectly ordinary SSE frame stream. The plugin sniffs the first bytes and replays them into the stream, so the turn keeps streaming instead of being thrown away — and a working model is never demoted to `unavailable` because one header lied.\n- **Thinking effort that actually binds** — two kinds of model, two kinds of control. A model that declares thinking levels (DeepSeek V4.1 Flash, GLM 5.3 Flash among them) gets its own level menu (Off \u002F Low \u002F High \u002F Max …), and the selected level is sent as-is in the upstream `reasoning_effort` field — which this gateway validates, so a value outside the set is a 400. A model with no level menu (MiMo V2.6 among them) gets the budget ladder: `Light \u002F Balanced \u002F Deep` map to output-token budgets of 2 048 \u002F 8 192 \u002F the model's full capacity, and a model that cannot switch thinking off gets the whole ladder doubled to 4 096 \u002F 16 384 \u002F capacity, because there thinking and the visible answer compete for the one ceiling. Both are recorded per call, and every model card in the settings page prints either the levels or the number it will actually send (see [Thinking effort](#thinking-effort-a-level-menu-or-a-budget-ladder)).\n- **Works without a browser UI** — only `llm` is a hard dependency, so the plugin activates on a headless composition such as dsh-tui and still serves its models. The dashboard half lives on its own fiber and mounts itself when `webServer` appears, so a composition that loads plugins before its HTTP server exists still gets its settings page. Availability probing and the background loops run on plain timers.\n- **Usage dashboard, local only** — token heatmap, cumulative curve by total or per model, output speed and time-to-first-token sampled per call. Nothing is uploaded.\n- **OpenAI-compatible forward port** — expose these models to any other local tool through a base URL plus a generated API key. Assistant string `reasoning_content` fields in Chat history are preserved for tool follow-ups, including explicit empty strings; absent fields are not fabricated.\n- **EAC lane** — a co-paid lane for DSHEAC AIO and kernel-declared `desktop`, `tauri`, `web`, or `web-desktop` profiles, with models prefixed `EAC`. Its credential is sealed; host admission and server-side GitHub authorization (sign in and star the repository) remain separate requirements. Command-line profile arguments alone do not grant access.\n- **The Kilo channel (keyless free pool)** — the free model pool of Kilo AI's public gateway (the listing's `isFree` slice, fetched live, including the `kilo-auto\u002Ffree` auto-router) is built in; no account, no key. Model cards carry a Kilo badge. Thinking effort works like the EAC lane: the model's own level menu (Off \u002F Low \u002F Medium \u002F High, default High), sent for real through the gateway's unified `reasoning` parameter — Off was verified family by family to zero out thinking (nemotron, ling, dots, poolside, apodex, cohere); the stepfun and liquid endpoints refuse to disable thinking (HTTP 400) and the two auto-routers ignore it, so those models' menus omit the Off rung. The pool is the upstream's free offer, and its model cards state that prompts may be logged to improve their services — never send sensitive content; see the [Disclaimer](#disclaimer).\n- **The aggregate lane — your own key, 76 providers** — a new settings tab brings third-party endpoints into the same roster: the registry ships 76 providers (NVIDIA NIM, OpenRouter, Groq, Cerebras, SambaNova, Gemini, DeepSeek, Mistral, Together, Fireworks, SiliconFlow, Nebius, Chutes, Hugging Face, Cloudflare, Z.ai, Kimi, MiniMax, QwenCloud\u002FAlibaba, Bedrock, Vertex, Vercel AI Gateway, Azure OpenAI, FleetRelay Gateway, plus the no-account Ollama, LM Studio and llama.cpp). Configuring a provider (a key for the ones that need one; the local no-account ones need none) turns each of its models into a `provider\u002Fmodel` row in the picker and on the local gateway. Keys stay in the local `0600` settings.json; the API echoes only `hasKey` and a `…abcd` fingerprint. Per provider: enable\u002Fdisable, Test (a *listing* probe — it verifies a key without spending a generation), Discover, a base-URL override, a model-list override and Remove. OAuth\u002FADC providers are listed but marked not drivable here. OpenCode's keyless free pool is deliberately **not** a registry row: it requires a per-request minted session id, the v2 client User-Agent and a set of official tool declarations, which this lane's generic transport has nowhere to carry — listing it would only add a picker row that can never answer, and those ten models are served natively by the plugin's own free lane.\n- **Token savers** — three things: tool-output compaction (RTK) rewrites `tool_result` content in place before the request is sent (git diff \u002F status \u002F log, grep, find, ls, tree, build logs, numbered file dumps, search listings, duplicate log lines) — measured live, a 40 KB `git diff` lost 90% of its bytes and the model still answered about it; prompt shaping offers the caveman and ponytail families, every level off by default; and five local answers that never call a provider. The settings page reports bytes before\u002Fafter, percent saved, blocks compacted and calls measured, from the same stats rows the usage charts read.\n- **Routing (fallback chains)** — chain models from any lane into one named chain that appears in the picker and on the gateway as the virtual model `combo:\u003Cname>`. `fallback` always starts at the head; `round-robin` rotates the starting point and stays there for N turns. A link that fails *before any answer delta* is discarded whole, so the switch is invisible to the caller — and reasoning deltas deliberately do not count as content, so \"thought for a minute, then hit a quota wall\" is the case failover exists for.\n- **The local gateway speaks Anthropic natively** — new `POST \u002Fv1\u002Fmessages` (streaming and non-streaming, with `thinking`\u002F`tool_use` blocks, a real `stop_reason` and an in-stream `error` event when a turn fails after the headers went out) and `POST \u002Fv1\u002Fmessages\u002Fcount_tokens` (a local estimate — the plugin ships no tokenizer); `\u002Fv1\u002Fmodels` now advertises every lane, the aggregate rows and the chains included. The gateway page's new *Connect a client* section generates copy-ready recipes — Claude Code, Codex `config.toml`, the OpenAI and Anthropic SDKs, curl, and a LAN variant when the relay is up — from the port that actually bound and the key that is actually required.\n- **Optional visual effects** — The settings header has a Visual effects switch, off by default. The aquarium and model features stay available; enabling it restores background glows, glass blur and decorative motion. The preference stays in the current browser.\n- **Eleven tabs beside the old six** — Aggregate, Token savers, Routing, Plugin upgrade and Recommended projects join Free models, EAC models, Free channels, Dashboard, Request log and Gateway; the motion pass (card rise on mount, page fade on tab switch, an animated savings meter, hover lifts) respects `prefers-reduced-motion` and collapses to one column at panel width. The Recommended-projects page carries the three companion repositories — EAC-Desktop, EAC-Pack and EAC-design-world — with a description, a direct link and a star button each, and their live star, fork and last-push numbers read from GitHub (absent, never invented, when GitHub cannot be reached).\n- **Clean names in the UI** — no mojibake, no upstream vendor strings leaking into your model picker.\n\n## What you get\n\n**Composer model picker**\n\n| Group | Contents |\n| --- | --- |\n| `Our Free Model` | Models usable from your current network exit |\n| `Our Free Model · region-limited` | Models the upstream refuses for this region, kept visible but separated |\n\nA model the gateway names but refuses to route appears in neither group. It stays listed under\n**Not in the picker** in the settings page, with the refusal and the probe time, and returns to\nthe picker by itself as soon as a probe gets through.\n\n**Settings page — `Settings → Our Free Model`**, seven sections:\n\n1. **Model roster** — per-model availability, vision vs text-only, context window, max output, the output ceiling each effort rung really sends, measured time-to-first-token, and an on-demand single-call benchmark.\n2. **EAC lane authorization** — one-click GitHub sign-in (the browser does the work; nothing to paste), the signed-in name and star verdict, a re-check button and sign-out; model cards carry a lock until authorized. The free lane is unaffected.\n2. **Announcement center** — the owner-pushed feed: unread counter, urgency badges, mark-read (single\u002Fall), check-now button, OS-notification toggle. Bodies render HTML through the allowlist.\n3. **Usage board** — headline counters, a 17-week token heatmap, a cumulative curve switchable between tokens and request counts and between total and any single model, speed sparklines, and a per-model table.\n4. **Local forward** — enable\u002Fdisable, bind host and port, copy base URL, show \u002F copy \u002F rotate the API key, and a ready-to-run `curl` example.\n5. **Plugin settings** — master switch, whether region-limited models are exposed, probe interval, default output ceiling, plus the detected egress IP and country.\n6. **Plugin upgrade** — installed\u002Flatest version, check for updates, one-click upgrade with progress and failure reasons, last-upgrade history, hot-reload button and file-watcher switch.\n\n**First-run announcement** — a five-page walkthrough (preamble, model roster, how to use, what it does, news & upgrades) that acknowledges once and never reappears until the copy version is bumped.\n\n## Install\n\n> **⚠️ Do not install this plugin from npm.**\n>\n> The `dsh-our-free-model` package on npm **is not published by this repository.**\n> It is a third-party repackaging whose contents do not match this tree:\n> `index.js` and `client.js` were modified, and it ships a\n> `src\u002Fchannel-visibility.js` that has never existed here. Installing it gets you\n> a build this project did not review, and you lose the signed-manifest\n> verification and in-app upgrades that this repository provides.\n>\n> Install only the ways documented below: a release package from this repository,\n> or a local source directory. For any same-named package from another channel,\n> this repository is the source of truth.\n\n### Command line (plain `dsh web`)\n\n```bash\ndsh plugin --profile web add \u002Fabsolute\u002Fpath\u002Fto\u002Fdsh-our-free-model\n```\n\nRestart the app once. `--profile` should name the profile you actually use.\n\n### DSHEAC AIO \u002F desktop builds — read this first\n\nSome DSHEAC AIO and older desktop packs run a profile gate before starting the\nweb app and restrict symlinks or directory junctions. A host with that check may report:\n\n```text\nPROFILE_UPGRADE_REQUIRED: offline dependency migration is not yet available\n```\n\nWhen this gate applies, avoid `link:` dependencies and junctions. Use the in-app\nplugin manager or the local tarball workflow below. Follow the actual host's logs\nand installation contract rather than assuming every desktop shell shares this gate.\n\nTo install manually as a real directory, use a trusted local tarball:\n\n1. Create `\u003CDSH_HOME>\u002Fprofiles\u002F\u003Cprofile>\u002Fvendor\u002F`. From the reviewed repository, run `npm pack --ignore-scripts --pack-destination \"\u003CDSH_HOME>\u002Fprofiles\u002F\u003Cprofile>\u002Fvendor\"`, or place an official same-version release tarball from this repository there. Local packing does not publish to npm.\n2. Add `\"dsh-our-free-model\": \"file:.\u002Fvendor\u002Fdsh-our-free-model-2.7.3.tgz\"` to the profile's `package.json` dependencies, then use the host's installation flow to resolve it. Keep the filename version aligned with this repository's `package.json`; do not substitute a same-named npm registry version.\n3. Append `\"dsh-our-free-model\"` to `dsh.profile.bundles`.\n\nWhen the package manager owns the installed bytes, set `distribution: 'managed'` in the bundle config or plugin `settings.json`. The package manager then handles updates; in-app upgrades, announcement polling and hot reload stand down while model access remains available. For later updates, replace the trusted tarball and update its dependency path so the old lockfile cannot restore an older copy.\n\nIf copying release files manually, copy the entire package, including `adapter\u002F`, `src\u002F`, `locale\u002F`, `vendor\u002Fmagpie\u002F` metadata and licenses, and `vendor\u002Fchannel-pack\u002F`'s `pack.js`, WASM, LICENSE and NOTICE. Copying only entry scripts leaves channel loading incomplete.\n\n> Do **not** also add an entry to `cordis.patch.yml`. A bundle referenced from\n> `dsh.profile.bundles` already applies its own patch layer, and registering it\n> twice fails with `duplicate loader entry id: our-free-model`.\n\n#### Integration packs (managed installation)\n\nWhen the plugin arrives through an integration pack (an EAC pack, Mojobox, …),\nthe *pack* owns update timing and bytes: install with the bundle config\n`distribution: 'managed'` (or write the same field into settings.json), and the\nin-app updater, the announcement feed and the hot reload all stand down — two\nwriters to one installed directory corrupt it; the model lane is unaffected.\nAcceptance lives in `scripts\u002Foffline-test.mjs`; the catalog-ready records\n(manifest 0.15 \u002F provenance \u002F license \u002F integrity) are under `catalog\u002F`.\n\n### Verify before launching the desktop app\n\nRun the desktop host's own gate against your profile instead of blind-retrying:\n\n```bash\nnode -e \"\nconst g = require('\u003CAPP_ROOT>\u002Fsidecar\u002Fdist\u002Flib\u002Fprofile-upgrade.js');\nconst app = '\u003CAPP_ROOT>', profile = '\u003CDSH_HOME>\u002Fprofiles\u002F\u003Cprofile>';\nconsole.log(g.planProfileUpgrade(app, profile));\ng.assertProfileStartup(app, profile);\nconsole.log('startup gate: PASS');\n\"\n```\n\nExpect `status: 'compatible'`, an empty `mismatches` array, then `PASS`.\nTo check bundle composition only, without booting:\n\n```bash\nDSH_HOME=\u003CDSH_HOME> dsh --profile \u003Cprofile> --dump-config | grep our-free-model\n```\n\nYou should see exactly **one** `id: our-free-model` entry.\n\n### Install failure: `ERR_PNPM_VIRTUAL_STORE_DIR_MAX_LENGTH_DIFF`\n\nThis is a **pnpm state problem in the target profile, not the plugin repo** (it fires\nbefore the plugin is even downloaded): the profile's existing `node_modules` was\ncreated by an older pnpm, and after a dsh update the bundled pnpm refuses to keep\nusing it. Close dsh, delete the profile's `node_modules` and `pnpm-lock.yaml` to\nlet pnpm rebuild them, then install again:\n\n```bash\nrd \u002Fs \u002Fq \"%DSH_HOME%\\profiles\\web\\node_modules\"\ndel \"%DSH_HOME%\\profiles\\web\\pnpm-lock.yaml\"\n```\n\nThe accompanying `Ignoring broken lockfile` warnings disappear with the rebuild.\n\n## Run the standalone service\n\nThe repository also includes a standalone local service that runs without DSH.\nUse Node.js `^22.19.0` or `>=24.0.0`. From the repository root, install the\ndependencies and start the service:\n\n```bash\nnpm ci\nnpm run start:standalone\n```\n\nOn first startup, the service prints a one-time link to its local management\npage. Open that link in a browser to configure the service. The default port is\n`18900`, and data is stored in `~\u002F.our-free-model`. To choose another port and\ndata directory:\n\n```bash\nnpm run start:standalone -- --port 18900 --data-dir .\u002Fofm-data\n```\n\nThe standalone service has its own API key and account data; it does not import\nthe plugin's credentials or settings. See\n[`packages\u002Fstandalone\u002FREADME.md`](packages\u002Fstandalone\u002FREADME.md) for LAN access,\ndata migration and API details.\n\n## Desktop installers (macOS, community build)\n\nThe dsh plugin itself needs no build. The **desktop installer** (the Our Free Model desktop shell) is officially published for Windows only; the macOS installer is a community build. The source changes are listed in [PR #421](https:\u002F\u002Fgithub.com\u002FEbony-Vinyl\u002Fdsh-our-free-model\u002Fpull\u002F421) and are fully auditable, line by line. A ready-made Apple Silicon (arm64) build is available from that PR and its community release, or you can build it yourself on a Mac (`npm --prefix packages\u002Fdesktop run build`; the full pipeline lives in `.github\u002Fworkflows\u002Fbuild-macos.yml`).\n\nVerify the checksum after downloading (SHA256 is listed in the PR \u002F release):\n\n```bash\nshasum -a 256 ~\u002FDownloads\u002FOur.Free.Model_\u003Cversion>_aarch64.dmg\n```\n\n**\"This app is damaged\" or won't open?**\n\nThe community build is not signed or notarized with an Apple Developer account, so Gatekeeper blocks first launch. The file is not actually damaged — pick any one of these:\n\n1. **Right-click open**: in Finder, Control-click the app icon, choose **Open**, then confirm **Open** again in the dialog.\n2. **Remove the quarantine attribute** (Terminal):\n\n   ```bash\n   xattr -cr \u002FApplications\u002FOur\\ Free\\ Model.app\n   ```\n\n3. **If it still says damaged, remove quarantine with sudo** (newer macOS versions are stricter about unsigned apps):\n\n   ```bash\n   sudo xattr -rd com.apple.quarantine \"\u002FApplications\u002FOur Free Model.app\"\n   ```\n\n4. **Allow it in System Settings**: open **System Settings → Privacy & Security** and click **Open Anyway** if the button is offered.\n\nNotes:\n\n- The current community build is **Apple Silicon (arm64)**; Intel Macs should build from source.\n- The bundle ships its own Node runtime and standalone service — no login, no API key.\n- The package is not signed or notarized by Apple. Trust it based on the auditable source change and the reproducible CI build record above, nothing else.\n\n## Usage\n\n**Pick a model.** Open the model selector in the composer and choose anything\nunder `Our Free Model`. The selection is durable per session.\n\n**Change thinking depth.** The same menu exposes `Effort` with `Light`,\n`Balanced` and `Deep`. Higher levels spend more of the output budget on\ndeliberation; the ceiling is enforced on the request, so the difference is\nmeasurable rather than cosmetic. It is **one** ceiling shared by deliberation and\nthe visible answer, which is why a model that cannot switch thinking off gets\nthe whole ladder doubled (the model cards in `Settings → Our Free Model` print the\nnumber each rung will really send). If answers keep getting cut off, move to\n`Deep`, or raise the per-call output ceiling in the settings.\n\n**Serve other local tools.** `Settings → Our Free Model → Local forward`, enable\nit, then copy the base URL and generate a key. Supported routes:\n\n```text\nGET  \u002Fv1\u002Fmodels\nPOST \u002Fv1\u002Fchat\u002Fcompletions        streaming and non-streaming\nPOST \u002Fv1\u002Fresponses\nPOST \u002Fv1\u002Fmessages                streaming and non-streaming (Anthropic Messages)\nPOST \u002Fv1\u002Fmessages\u002Fcount_tokens   local estimate; the plugin ships no tokenizer\n```\n\nIf another program holds the port, the listener does not die: it retries the same\nport for a few rounds (a listener that just closed, or a portproxy rule that was\njust removed, frees its port within a few hundred milliseconds), then walks to the\nnext free port and says so on the settings page — *requested 18899 is not available,\nlistening on 18900* — and the port written back into the settings is the real one.\nOn Windows the most common owner is a `netsh interface portproxy` rule (served by IP\nHelper): its listener on `0.0.0.0` makes the loopback bind fail with `EACCES` rather\nthan `EADDRINUSE`. `netsh interface portproxy show all` lists the rules and\n`netsh interface portproxy reset` clears them.\n\nThe forward endpoint streams in full: besides the `data:` frames, a lane that is\nthinking gets periodic SSE comment frames (a `:` line), so a client's idle\ntimeout cannot read \"the upstream is still thinking\" as \"the socket is dead\".\nThinking is recognised under `reasoning`, `reasoning_content` and\n`reasoning_text` — a gateway that repeats one thought under two of them is\ncounted once — and the `reasoning_details` array as well. A model whose thinking\nnever streams upstream still sends no reasoning frames here; see\n[Known limitations](#known-limitations).\n\n**Serve other devices on your network.** The same panel carries a *Network\naccess* section. It is off by default; switched on, the relay binds a routable\naddress (`0.0.0.0` by default) and demands **a key of its own** — separate from\nthe local key, so a leak on either side costs a rotation on that side only and\nthe tools already wired to the local port never notice. The relay re-issues to\nthe local listener, so the model roster, streaming and error semantics are the\nsame ones the local port serves. A port of `0` means \"pick one\" (18899 is often\nalready taken on a machine that runs something else); the panel then shows the\nport and the network address it settled on. While it is on, anyone who can reach\nthis machine can spend its free quota with that key — enable it only on a\nnetwork you trust, and narrow the sources with a firewall if you can.\n\n**Send requests through a proxy outlet.** `Settings → Our Free Model → Egress\nproxy`. Optional and off by default — with it off, requests go direct. Two modes:\n\n- **Subscription mode**: paste a Clash\u002FV2Ray subscription URL; the plugin spawns\n  mihomo locally (auto-detected — e.g. Clash Verge's `verge-mihomo.exe` — or set\n  the path yourself) with a built-in url-test group that re-measures every five\n  minutes and sends traffic to the fastest node, health-checking dead nodes out.\n  **The subscription URL is treated as a credential** — the path of a\n  subscription link *is* its token — so it lives at the same standard as the two\n  forward keys: kept in the local settings file, never sent with a request, and\n  never echoed in a settings payload. The panel shows the masked host only\n  (`https:\u002F\u002Fhost\u002F…`); \"Show\" and \"Copy\" fetch the value from the settings page\n  itself (`GET \u002Fegress\u002Furl`), an empty input means \"keep the stored address\", and\n  \"Clear\" removes it and takes the outlet down with it.\n- **Single-proxy mode**: type an `http:\u002F\u002F` \u002F `https:\u002F\u002F` \u002F `socks5:\u002F\u002F` \u002F\n  `socks5h:\u002F\u002F` proxy address and every handled request dials through it.\n\n**At rest.** mihomo has to read that address out of a config file (the plugin\nwrites a throwaway `mihomo.yaml` into its data directory and spawns mihomo from\nthere), so the on-disk copy stays plain text. What this treatment removes is the\npayload echo, the log line and the shoulder — not another process on the same\nmachine.\n\nOnly three kinds of traffic are taken over: model inference, the model listing\nfetch, and the egress IP probe; announcements, upgrades, and the EAC lane stay\ndirect so the subscription identity never mixes into the release channel.\n\n**Scope.** The outlet serves this plugin's opencode traffic and nothing else on\nthis machine. The mihomo it spawns runs from a throwaway config of the plugin's\nown: `bind-address: 127.0.0.1` with `allow-lan: false`, no `tun:` section, no\nsystem proxy, no system-level proxy registration and no virtual adapter — the\nlistener is a temporary free loopback port. Your browser, shell tools and other\nIDE extensions never go through it; only requests this plugin sends to the\nopencode gateway are rerouted. Single-proxy mode works the same way: the rewrite\nhappens inside the plugin.\n\n**Live status.** While the outlet is on, the settings page adds three lines below\nit: the current outlet (masked host · mode), the **best node** (the node url-test\npicked, with the delay that won it the rank), and **opencode access** (the last\nmodel-listing round trip, in seconds). Node and latency are readings, refreshed\nevery 15 seconds by asking mihomo's own controller; when a reading is missing the\nline says \"measuring…\" and outbound traffic is unaffected.\n\n**What it can and cannot buy you**: per-IP rate limits and region gates move\nwith the outlet; per-session rate limits and fingerprint gates do not care\nwhich outlet you use. Toggling the outlet re-probes on its own — a cold outlet\nneeds a few seconds before it carries traffic, and the plugin waits for the new\nexit to answer before regrouping, so region-gated models follow the new exit.\nReprobe (below) does the same on demand.\n\n**Re-check geography.** `Reprobe availability` (Reprobe) re-runs availability against\nyour current exit. Toggling a VPN and re-probing moves region-gated models\nbetween the two groups on its own.\n\n**Receive announcements.** Everything is automatic: after the owner pushes, a\nrunning installation picks the item up within one poll cycle (30 minutes by\ndefault, or immediately via *Check for new announcements*). Regular items raise\na toast, `urgent` items open a full-screen modal, and both land in the\nannouncement center with an unread marker. Enable *OS notifications* there to\nalso get system-level toasts.\n\n**Upgrade the plugin.** `Settings → Our Free Model → Plugin upgrade` →\n*Check for updates* → *Upgrade now*. The whole flow runs inside the app\n(download → verify → backup → replace → hot reload); no reinstall, no restart.\nA failed upgrade restores the previous version and reports why.\n\n## The aggregate lane, token savers, routing and the local gateway\n\n### The aggregate lane: bring your own key for 76 providers\n\nThe **Aggregate** tab brings third-party endpoints into the same roster. The provider registry ships 76 entries (`src\u002Fproviders\u002Fregistry.json`, categorised `free | free-tier | apikey | oauth | local`): NVIDIA NIM, OpenRouter, Groq, Cerebras, SambaNova, Gemini, DeepSeek, Mistral, Together, Fireworks, SiliconFlow, Nebius, Chutes, Hugging Face, Cloudflare, Z.ai, Kimi, MiniMax, QwenCloud\u002FAlibaba, Bedrock, Vertex, Vercel AI Gateway, Azure OpenAI, FleetRelay Gateway, and the local no-account ones — Ollama, LM Studio and llama.cpp. The data comes from free-claude-code's provider catalogue, 9router's provider registry, and the custom gateway added by this project. FleetRelay Gateway currently advertises `deepseek-v4.1-flash-free` and `gpt-6-astra`; its third-party T1 candidate is disabled pending distribution authorization.\n\nOnce a provider is configured (a key for the ones that need one; the local no-account ones need none), each of its models becomes a catalog row named `provider\u002Fmodel`: selectable in the model picker and dialable through the local gateway. A provider's own wire format decides how it is served — OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages (the last two for the providers that only speak those).\n\nKeys live only in the plugin's own `0600` `settings.json`, and the API never echoes them: the page shows `hasKey` plus a `…abcd` fingerprint. An absent field keeps the stored key; an empty string clears it. Per provider the page offers enable\u002Fdisable, a Test button, a Discover button, a base-URL override (needed for Azure, Cloudflare and Vertex, which have no usable default), a model-list override and Remove. Test is a *listing* probe — it verifies a key through the provider's model listing without spending a generation, and says so when the provider declares no listing. Providers whose auth is OAuth or ADC (Google ADC) are listed but marked *not drivable* here, because this lane cannot complete those flows.\n\n### Token savers: tool-output compaction, prompt shaping and local answers\n\n**Tool-output compaction (RTK)** rewrites `tool_result` \u002F `role:\"tool\"` content in place before the request is sent: git diff, git status, git log, grep, find, ls, tree, build and package-manager logs, numbered file dumps, Cursor search listings, and runs of duplicate log lines. Measured live: a 40 KB `git diff` lost 90% of its bytes and the model still answered about the diff. The safety rules: error tool results are never touched, bodies below a size floor are left alone, the replacement is never larger than the input, a filter that throws passes the original through, and the pass is idempotent. It applies to every lane, the local gateway included, and is on by default.\n\n**Prompt shaping** offers two families with levels — `caveman` (terse replies: `off\u002Flite\u002Ffull\u002Fultra\u002Fwenyan-lite\u002Fwenyan\u002Fwenyan-ultra`) and `ponytail` (YAGNI-minimal replies: `off\u002Flite\u002Ffull\u002Fultra`). They change how the assistant talks, so every level starts `off`. Injection is idempotent and format-aware (a system message on chat, Anthropic's `system` including the block-array form and inserted before the last `cache_control`, `instructions`\u002Finput item on Responses), and it is reversible.\n\n**The savings dashboard** shows bytes before → after, bytes saved, percent, blocks compacted and the number of calls measured — read from the same stats rows the usage charts use.\n\n**Five local answers** (ported from free-claude-code, each individually switchable, all on by default) never call a provider: a quota probe (`max_tokens:1` plus \"quota\" → `Quota check passed.`), shell command-prefix detection (`\u003Cpolicy_spec>` plus `Command:` → the prefix, refusing command injection), session-title generation (→ `Conversation`), suggestion mode (→ the empty string) and filepath extraction (→ a `\u003Cfilepaths>` block). The local gateway answers them in-process.\n\n### Routing: named fallback chains (combos)\n\nA named, ordered list of model ids across every lane, which appears in the picker and on the gateway as `combo:\u003Cname>` — a virtual model. Two strategies: `fallback` (always start at the head) and `round-robin` (rotate the starting point, sticky for N turns). The chain walks its links until one produces output; a link that fails *before any content delta* is discarded whole, so the switch is invisible to the caller. Reasoning deltas deliberately do not count as content — \"thought for a minute, then hit a quota wall\" is the highest-value case to fail over. Once an answer delta has been delivered, a later failure ends the turn normally (the single-model checkpoint recovery still gets its continuation attempt first). Capacities are the intersection of the links (a chain advertises vision only if every link has it, and the smallest context window), and a chain whose links are all currently unavailable is stored and marked not usable rather than silently dropped.\n\n**Agent Auto** is a built-in virtual model with id `auto:agent`. Select it in the model picker or set it as the model in a compatible client. For each request, it filters out models that cannot handle attached images, the requested reasoning level or the estimated context size, then ranks the remaining models using quota and usage routing. When tools are available, it favors models that have successfully returned tool calls before; these observations are saved locally and expire after 180 days. If the client requires a tool call and a model answers with prose, Agent Auto holds that answer, records the miss and tries another model, so the agent receives either a valid tool call or a clear exhausted-route error. Tool capability observations are shared across requests and kept in the local stats file.\n\n### The local gateway: a native Anthropic surface and connect recipes\n\nTwo new endpoints: `POST \u002Fv1\u002Fmessages` (streaming and non-streaming, with correct `message_start` \u002F `content_block_*` \u002F `message_delta` \u002F `message_stop` framing, `thinking` blocks, `tool_use` blocks, a real `stop_reason`, and an in-stream `error` event when a turn fails after the headers went out) and `POST \u002Fv1\u002Fmessages\u002Fcount_tokens` (a documented local estimate — the plugin ships no tokenizer). Claude Code and the Anthropic SDKs can therefore point straight at the plugin. The existing `\u002Fv1\u002Fchat\u002Fcompletions` and `\u002Fv1\u002Fresponses` are unchanged, and `\u002Fv1\u002Fmodels` now advertises every lane, the aggregate rows and the chains included. A new *Connect a client* section on the gateway page renders ready-to-copy recipes generated from the port that actually bound and the key that is actually required: Claude Code environment variables, Codex `config.toml`, the OpenAI SDK, the Anthropic SDK, curl, and a LAN variant when the relay is up.\n\nOne false success was fixed along the way: a turn whose only output was a tool call the caller never declared used to answer as a clean empty success; it now reports what happened, because the token saver's own `[full diff: rtk git diff --no-compact]` hint can make a model ask for a tool the caller does not have.\n\n## How it works\n\n```text\nindex.js      host half: adapter registration, catalog + availability probes,\n              settings\u002Fstats stores, webServer API routes, forward lifecycle,\n              announcement \u002F upgrade \u002F hot-reload wiring\nadapter\u002F      kernel seam: the only module in the package allowed to import\n              @deepseek-ai\u002F* (kernel.js: attribution User-Agent with a literal fallback)\nsrc\u002Fadapter.js  structural LlmAdapter: providerInfo, listModels, resolveModel,\n                prepareCall, stream, providerRetryPolicy\nsrc\u002Fupstream.js gateway identity: credentials, session\u002Frequest id minting,\n                tool fingerprint, endpoint selection per wire\nsrc\u002Fstream.js   three wire decoders (chat \u002F messages \u002F responses) normalised to\n                harness StreamChunks, with disjoint token accounting\nsrc\u002Fmessages.js harness messages -> wire shapes, plus tool-pairing repair\nsrc\u002Feffort.js   effort level -> output budget\nsrc\u002Fforward.js  standalone OpenAI-compatible listener (plus the Anthropic Messages endpoints)\nsrc\u002Fproviders\u002Fregistry.json aggregate-lane registry: 76 providers, category, auth, wire\n                format and endpoints\nsrc\u002Fproviders\u002Findex.js registry access and provider\u002Fmodel composite id parsing\nsrc\u002Faggregate.js aggregate lane: catalog rows, credential resolution, key redaction,\n                listing probes, per-wire posting\nsrc\u002Fanthropic.js Anthropic Messages codec for \u002Fv1\u002Fmessages, plus the local token estimate\nsrc\u002Ftoken-saver\u002Findex.js compaction pipeline: prompt injection -> tool-output compaction,\n                byte accounting, fail-open\nsrc\u002Ftoken-saver\u002Finject.js idempotent injection and stripping on the chat \u002F messages \u002F\n                responses wires\nsrc\u002Ftoken-saver\u002Fprompts.js the caveman and ponytail prompt families and their levels\nsrc\u002Ftoken-saver\u002Frtk\u002F tool-output filters: git diff\u002Fstatus\u002Flog, grep, find, ls, tree,\n                build logs, numbered dumps, search listings, duplicate log lines\nsrc\u002Flocal-optimize.js the five local answers: quota, prefix, title, suggestion, filepath\nsrc\u002Fcombos.js fallback chains and Agent Auto: virtual catalog rows, quota-aware ordering, request capability filters and learned tool-call support\nsrc\u002Froute\u002Fclassify.js one failure vocabulary and cooldown policy for every lane\nsrc\u002Ftrust.js    request trust fence for the plugin's routes (connection bridge\n                + structural fallback)\nsrc\u002Fpush.js     SSE push hub: arrivals, update availability, upgrade done\nsrc\u002Ffeed.js     remote announcement feed: multi-source fetch, validation, cache,\n                arrival detection\nsrc\u002Fupdater.js  in-app upgrade: manifest validation, SHA-256 checks, backup,\n                atomic replace, rollback\nsrc\u002Freload.js   self hot reload: mirrors the kernel HMR sequence (cache purge,\n                re-import, re-register, rollback)\nclient.js       browser half: hand-written ModuleLoader bundle, no build step\n```\n\nDesign decisions worth knowing:\n\n- **One adapter, two provider routes.** The harness groups the model picker strictly by provider route, and the catalog wire has no group\u002Ftag\u002Fbadge field. Publishing a second route is therefore the only way to render a separate `region-limited` heading — and because the client drops empty groups, the two collapse into one automatically once geography stops blocking.\n- **Structural adapter, no `@deepseek-ai\u002Fdsh-llm` import.** The kernel never checks `instanceof`, so the adapter is duck-typed. This keeps the plugin from pinning itself to one kernel version and is what lets the same code run on both 0.1.5 and 0.1.7.\n- **Own JSON store instead of the settings seam.** The settings registration API differs between kernels; a private JSON store under `DSH_HOME` behaves identically on both and keeps the forward key in a `0600` file that never enters any shared settings document.\n- **The token savers run on the single choke point, and they fail open.** Prompt injection and tool-output compaction run after every other mutation has been applied — the fingerprint rename, the effort patch, the sealed lane's pacing hint — at `payloadFor()`, the one place both the adapter's own dispatch and the local gateway (which dials through the adapter) pass through, so every lane and every recovery segment is compacted. Every step fails open: a saver that throws is skipped, a filter that throws passes the original text through, an unrecognised body shape is left alone — a request must never fail over the thing that was supposed to make it cheaper.\n- **A combo is a virtual catalog row, so failover is resolved in the adapter.** A chain joins the merged catalog as `channel:'combo'` plus a list of real model ids, which is why the picker advertises it and the gateway dials it by name like any other row; the chain is expanded and advanced inside the adapter's `runStream()`, so neither caller has to know about failover.\n\n### Thinking effort: a level menu, or a budget ladder\n\nTwo kinds of model, two kinds of control.\n\nA model that declares thinking levels (its listing carries `reasoning_options`\nwith `effort.values`) gets a **level menu**: the selected level is sent as-is\nin the upstream `reasoning_effort` field, the same shape the EAC and Kilo lanes\nuse. That is the 2026-10-17 re-probe result — the lane did ignore the field\nback on 2026-09-24, but it now **validates** it: a value outside the set\nanswers `400 invalid_value` naming the accepted set\n(`none|minimal|low|medium|high|xhigh|max`), and reasoning volume really does\nmove with the level (`deepseek-v4.1-flash-free`, medians over three samples:\nnone 0, low 793, high 700, xhigh 1405, max 1906). So the menu offers only the\nlevels that model declares; a model whose set has no off rung (GLM 5.3 Flash,\nwhose `none` does not actually stop it thinking) is not given one.\n\nA model with no level menu (its listing offers only `toggle` or\n`budget_tokens`, or no `reasoning_options` at all) keeps the **budget ladder**:\neffort is a hard output-token ceiling, which does bind — recorded reasoning\ntokens rise monotonically with the level. Inventing a rung the upstream cannot\nexpress would claim a capability the model never had.\n\nWindow and output ceilings follow the 9router \u002F models.dev convention\n(`limit.context` \u002F `limit.output`, `modalities.input`); the upstream listing\npublishes an id and nothing else.\n\n### Three kernel behaviours that cost real debugging time\n\nThese are recorded here because they will bite any provider plugin:\n\n1. **`providerRetryPolicy()` is stored verbatim.** Neither kernel resolves it, and\n   the backoff scheduler reads `initialDelayMs \u002F maxDelayMs \u002F jitterRatio` off the\n   **top level**. Returning them nested under `backoff` yields `undefined * 2ⁿ =\n   NaN`, and the durable session log rejects non-finite numbers — so a recoverable\n   transient failure becomes an aborted turn. Return an already-resolved, flat policy.\n2. **One interrupted tool call poisons the whole session.** A tool call with no\n   matching result replays as `400 invalid_request_error`, after which *every*\n   request in that session fails. The plugin repairs pairing before sending, on all\n   three wires.\n3. **A service you did not name in `inject` throws when read as a property, and\n   `ctx.get()` answers `undefined` for one that is merely not provided yet.** Both\n   bit this round: after `inject` was reduced to `['llm']`, `typeof ctx.interval ===\n   'function'` threw `cannot get property \"timer\" without inject` (`ctx.interval` is\n   a mixin over the `timer` service) and the plugin stopped activating on *every*\n   composition. Switching that one to `ctx.get('webServer')` then answered\n   `undefined` — not because the composition had no web server, but because plugins\n   load before the browser half publishes it — so the settings routes were never\n   registered and the dashboard had no data source behind a server that was busy\n   serving the app. The shape that works is `ctx.inject(deps, callback)`: give the\n   services you need their own fiber and let *it* wait, instead of guessing once at\n   load time.\n\n### Why the response is read by body shape, not by `Content-Type`\n\nUnder load this lane answers 200 with `application\u002Fjson` over a normal SSE frame\nstream. Trusting the header meant `await response.text()` swallowed the live stream,\n`JSON.parse` failed, and the turn was lost — and because that error carried\n`status: 200`, the availability probe read the perfectly working model as\nunroutable and dropped it from the picker for a round. The first bytes (≤4 KB) are\nnow sniffed and classified, then replayed into the stream, so nothing is buffered and\nno token arrives late; `sniffBody` in `src\u002Fhttp.js` is the only discriminator.\n\n### Why the speed panel can say `—`\n\nAn early build published 2 941 tok\u002Fs for a lane really doing ~40. The gateway was\nnot at fault — a raw-read probe shows 64 frames spread over 5.6 s — but the\nnumerator and the denominator described different intervals: one call billed 422\noutput tokens of which 291 were reasoning that **never streamed a single frame**,\nand the window began at the first visible token anyway. Dividing the whole\ncompletion by the seconds the answer text took is not a decode rate.\n\nSo a rate is published only over a window that can carry it: `windowTokens()`\nremoves unstreamed reasoning tokens from the numerator, `decodeWindow()` rejects\nwindows too short to time and rates too fast to be real, and both the panel and\nthe per-model table sum tokens over sum seconds instead of averaging per-call\nratios — one 1 ms window was enough to move a 26-call average by three orders of\nmagnitude. A model whose answer lands in two frames therefore has no measurable\noutput speed, and says so.\n\n### Automatic recovery after a long reasoning stream is cut (issue #12)\n\nEvery model enables one bounded recovery attempt by default, across the Chat\nCompletions, Messages and Responses upstream protocols. It requires a first\nstream that delivered nonempty reasoning, no answer text or tool call, and then\neither reached EOF without a normal terminal frame, or received a normal `stop`\nterminal carrying reasoning only with no answer text — a turn the host would\nclassify as an empty response. Cancellation, a normal ending that already\ndelivered answer text or a tool call, an output ceiling and an explicit upstream\nerror do not trigger recovery.\n\nThe plugin sends **one new request** containing the original input and the\nreceived reasoning as a text checkpoint, asking for the answer directly. This is\nnot a native upstream resume, and already displayed reasoning is not replayed.\nTools are disabled for the recovery request. A cut after answer text or a tool\ncall has started is not recovered, to avoid duplicate content or execution.\n\nTo avoid another long reasoning pass, the continuation prompt asks for the\nconclusion first and at most 800 words. This is a prompt instruction, not a hard\ntoken limit, and the model may ignore it. Recovery is a degraded answer: an\noriginal request for a long or step-by-step analysis may be shortened.\n\nOne logical turn makes at most two physical requests: the original and one\nrecovery. The default total deadline is 900 seconds (15 minutes); recovery gets\nat most 300 seconds, bounded by the remaining total time. Recovery output is\ncapped at 8192 tokens and still respects the user's and model's ceilings. Known\noutput tokens from the first segment are subtracted from the original budget;\nrecovery does not start if fewer than 512 tokens remain. The checkpoint is\nlimited to 131072 characters and must pass a conservative text-byte estimate of\ncontext capacity.\nThat estimate does not count image tokens and is not an exact tokenizer check.\nExceeding a limit stops recovery. Success requires a normal ending with answer\ntext that is not only whitespace. Recovery failure returns `STREAM_CUT`, which\nthe harness does not resend as a whole turn; user cancellation keeps\n`aborted` \u002F `ABORTED`.\n\nSet `streamRecovery: false` in the local settings.json to disable it. An object\ncan also supply an `enabled` switch and lower numeric limits; limits cannot\nexceed the defaults. There is no model allowlist.\n\nThe local dashboard keeps **physical requests** and **logical turns** separate.\nUpstream requests and request failures count each HTTP request actually sent;\nconversation turns, turn failures and recovered turns count one adapter\ninvocation by its final outcome. A first segment cut short and a successful\ncontinuation therefore show 2 upstream requests and 1 request failure, while\nremaining at 1 conversation turn with 0 turn failures and 1 recovered turn.\nEach segment still has its own sample with recovery identity, attempt index and\n`noUsage` markers. A shared `recoveryId` associates those markers to identify\nmissing usage. Final usage sent to the harness sums only counts the upstream\nactually reported; if one segment has no usage report, this is not the full\nturn's token total. Reasoning checkpoints are not written to the statistics\nfile.\n\nPre-upgrade history has only physical request records, so migrated turn and\nfailure counts are estimates and the dashboard labels them. Turns recorded\nafter the upgrade use the final outcome and are exact.\nRequests, turns and token totals are lifetime values; speed, first-frame and\nheatmap details use the locally retained history window.\n\nOne live MiMo V2.6 Flash · Deep request recovered successfully; an earlier\nattempt failed at the 480-second deadline. This does not establish live coverage\nof every model or guarantee completion of every long reasoning turn. The\nv1.3.1 records below describe behaviour before recovery was added.\n\n## Verification\n\nTested on Windows against the live upstream. The table is kept per release round,\nand each row says which way it was checked — only the rows marked *live upstream*\nor *hands-on* are behaviour a user sees in the interface.\n\n### Issue #12: verification status\n\nImplementation, offline regression and live results are tracked separately in\n[`docs\u002Fissue-12-recovery.md`](docs\u002Fissue-12-recovery.md). Recovery 99\u002F99,\ntruncation 35\u002F35, 11 new fingerprint checks and typecheck have passed. Twelve\nchecks use the real plugin over local HTTP to verify forward success, failures,\nclient disconnection and stored statistics. The technical record carries the\nfinal full-suite result. In a live MiMo Deep run, the first\nstream reached natural EOF at 304.161 seconds; recovery took 32.777 seconds and\nproduced 4264 characters of answer text, ending with `stop`, usage and `[DONE]`.\nThere were two requests over 336.942 seconds. The first segment had no usage\nreport, so the summary contains only known counts. The earlier failed\n480-second attempt remains in the technical record. Real dsh UI and other\nmodels have not been individually accepted.\n\n### Historical: v1.3.2 (issues #11, #13, #19, #20, #21)\n\n| Item | Fix | Verification |\n| --- | --- | --- |\n| #19 self-update trust chain | Ed25519-signed manifests (public key pinned in the plugin, private key out of the repo), the update channel fully decoupled from `feedUrl`, manifest `base` restricted to relative paths | updater-test: four new cases (signature, tamper, foreign key, feedUrl not followed); release-e2e's negative control now refuses at the signature |\n| #19 forward surface | `localhost` binds resolve first and require all-loopback answers; a 1 MB cap (413) on plugin API bodies; the forward endpoint answers 400 for a non-JSON body and 404 for an unknown model | forward-test `resolveLoopbackBind` cases; offline-test 404 case |\n| #20\u002F#21 tools unusable through the forward port (#21's `Unknown tool 'bash'\u002F'read'\u002F'grep'` is exactly the fingerprint decoy quartet: the lane forces those names to be declared, the model dials them, the forwarded client never registered them) | streaming `tool_calls[].index` renumbered from 0 (no longer shares the block counter with reasoning); fingerprint-decoy calls suppressed per block on the forward wire (unnamed blocks have their arguments held); a ceiling-cut turn finishes as `length` on the stream too | forward-test: four streaming\u002Fnon-streaming cases against the real listener with a scripted lane |\n| #20 dsh-side decoy hazard | `stream.js` keys parallel tool calls without an `index` by call id; bare argument continuations join the preceding call | existing truncation\u002Ffingerprint suites stay green |\n| #13 quota experience | 429 removed from the retryable codes (no more three automatic retries of the same wall); a probe round answered by nothing but 429s backs the next periodic round off 30→120 minutes (manual reprobe, egress change and the boot round are exempt); the probe recognizes in-stream error frames inside a 200; the bench button uses the default effort and a realistic client timeout | retry-safety-test assertion updated; probe logic covered by the offline suites |\n| #13 concentrated forward quota | 429 no longer auto-retried (above); the forward session key stays derived from `user`\u002F`conversation` (deliberate: the lane accounts per session) | behavior unchanged, no new spend |\n| #11 heatmap | cell gap removed and corners tightened for a GitHub contribution-graph ribbon; the layout was already column-major week-aligned | client-lint green |\n| Other | per-route client timeouts (bench 240 s, upgrade 600 s — the 8 s guard now covers only fast routes); EventSource reconnects with backoff (30 s → 5 min) instead of closing forever; a completed upgrade clears the stale error banner; the speed-scope copy now says what the panel really averages (last 40 calls); a failed store flush is logged once | client-lint; speed-stat green |\n\nAll 20 offline suites (including the new `forward-test`) and `tsc --noEmit` pass; `host-selftest` costs real network and real free-lane quota, so it did not run with this round.\n\n### Historical: v1.3.1 (issues #8, #9, #10)\n\n| Item | How | Result |\n| --- | --- | --- |\n| Both tool-result vocabularies really reach the model | live upstream, `host-selftest.mjs` step 2 | Same model, same `get_weather` answer, sent once in the pre-V4 shape (`user` carrying a `tool-result` block) and once in the V4 shape (`role:'tool'`): both `finish=stop`, and both times the model repeated the `22°C \u002F sunny` from the result. Before the fix the plugin did not recognise the first shape at all (`src\u002Fmessages.js` never mentioned `tool-result`), so that request carried neither the call nor its answer |\n| The shapes are taken from records, not imagined | every session root on this machine — 40 `session*.jsonl.zstd` across four homes (zstd, which needs splitting frame by frame) | `tool\u002Fresult` events appear in exactly two shapes: **362** with `role:'user'` carrying a `tool-result` block (V1\u002FV3 format — 336 written by AIO 6.9.3's v3 home, 26 by `~\u002F.dsh`'s v1) and **27** V4 `role:'tool'` from the v4 session copies. Both generations are in live use and the plugin read only the latter — issue #9 was right, about a kernel older than the reporter's |\n| Projection and pairing repair | offline `projection-test.mjs` (new, 40 assertions) | Three wires × two vocabularies: each call and its answer reach the wire, keyed by call id; three parallel calls each get their own answer, merged into one user turn on the Messages wire with `tool_result` first (the same rule the kernel's own adapter uses); images nested in a result survive instead of vanishing (Chat follows with a user turn, Messages nests them inside `tool_result`); **each answer appears exactly once on each wire** — counted in the bytes that go out, not by block type, because a block-type assertion cannot see a duplicate; answers with no call id, dangling calls and orphan results are still removed; already-valid history is returned byte for byte |\n| `pwsh` filling the `bash` slot is accepted upstream | live upstream, `probes\u002Fshell-slot-promotion.mjs` (new) | Declares `bash, glob, grep, read`, where `bash` carries pwsh's real schema and no decoy is added: the gateway does not answer `FreeTierError`, the turn finishes `tool-calls`, and the call comes back renamed to **`pwsh`** (`{\"command\":\"Get-Date\"}`) — a tool the kernel can actually run. Offline, `fingerprint-test.mjs` (new, 20 assertions) pins no-duplicate declarations, a real `bash` winning over the donor, and the decoy surviving only when there is nothing to promote |\n| A cut stream is no longer a completed turn | offline `truncation-test.mjs` (new, 22 assertions) | A local HTTP server really does `res.end()` a stream that never carries a finish token → `kind=error`, recorded `ok=false` and flagged `truncated`; checked on each of the three wires; genuine endings such as `message_stop` and `response.completed` are not caught; a turn that finishes without a usage frame is flagged `noUsage`, so `0\u002F0` stops being indistinguishable from \"produced nothing\". **Re-sending now depends on what had already arrived**: a cut that delivered no token at all stays `TRANSPORT` (retryable), while one that had streamed content becomes `STREAM_CUT` (outside the retryable set, so the turn fails on the spot) — the reason is the next row |\n| What retries cost, measured in a real kernel session | real `dsh` web kernel, one turn sent from the browser on MiMo V2.6 Flash · Deep | Taken event by event out of the durable session log: `llm\u002Fretry retry=1 delay=702ms code=TRANSPORT` at 304 s, `retry=2 delay=1124ms` at 608 s, `turn\u002Fend {kind:\"error\",code:\"TRANSPORT\"}` at 912 s; `stats.json` holds three `ok:false truncated:true` rows of 0\u002F0, 304 s apart; the interface showed *turn failed* with the message and the code. The cut on this lane is a function of how long the turn thinks, so a retryable code only billed the same five minutes three times over — which is why content that already streamed is not re-sent |\n| Re-reviewing this release found two defects in the above | offline `projection-test.mjs` section 7 and `truncation-test.mjs` section 12, plus one forwarded round trip in `tui-test.mjs` | (1) Once the Messages wire recognised V4's `role:'tool'`, it put the same answer inside `tool_result` *and* left it in the ordinary blocks after it — the text twice, and a returned image with its whole base64 payload twice. The message is now skipped once its result is emitted, and reverting that turns the assertion red. (2) `response.incomplete`, `response.failed` and `response.done` end that wire on purpose too; reading only `response.completed` as terminal turned a turn that hit its output ceiling into a cut stream and burned two retries on it. The status still decides the finish token, and a terminal frame naming no reason no longer erases one a previous frame gave. (3) The forwarded `\u002Fv1\u002Fresponses` route had never been exercised with tool history; the outbound `messages` are now compared byte for byte against a stub gateway, call and result both present |\n| What a normal ending looks like on this lane | live upstream, `probes\u002Fstream-terminal-frames.mjs` (new) | Raw SSE captured frame by frame: `finish_reason:\"stop\"` → the usage frame → `data: [DONE]` → `{\"choices\":[],\"cost\":\"0\"}`, identically on two models. So \"no finish token ever arrived\" is genuinely an anomaly rather than a second normal ending — which is the basis for #10's check |\n| No false positives against the real lane | live upstream, `host-selftest.mjs`, full run | 11 models probed plus plain chat, two tool rounds, three effort rungs and vision input: every call landed on its own normal ending (`stop` \u002F `tool-calls` \u002F `max-tokens`), none read as truncated; the region-gated model still returns `REGION_BLOCKED` |\n| The upstream is documented (#8) | every outbound destination in the code, checked one by one | New section [Where the models come from](#where-the-models-come-from): `opencode.ai\u002Finference\u002Fv1\u002F*` (inference and `\u002Fmodels`; `\u002Fzen\u002Fv1` before 2026-10-14), this repository's `feed\u002F*.json` (raw first, jsDelivr as fallback), and `api.ipify.org` \u002F `ipinfo.io` \u002F `ipapi.co` (only to read back this machine's egress IP and country code). No account pool, no relay |\n| Offline suite | `npm test` (18 suites) | Green; `projection` and `fingerprint` added, still no network and no free-lane quota spent |\n\n### v1.2.2 (issues #1–#4, #6)\n\nEach row names how it was checked: *offline fake kernel* never leaves the machine,\n*live upstream* means the plugin really calls the gateway but runs on a\nhand-built cordis context, and *real kernel* means the plugin was installed and\nstarted inside dsh. The distinction cost this round a ship-blocker — see the last\nrow.\n\n| Check | How | Result |\n| --- | --- | --- |\n| Manifest describes the shipped files | offline, `build-manifest.mjs --check` + `release-e2e.mjs` | All 26 published files match. Before the fix, `main`'s published 1.2.1 manifest had drifted on **6** files (`index.js`, both READMEs, `src\u002Fcatalog.js`, `src\u002Fstore.js`, `src\u002Fupstream.js`) — one more recurrence than the 2 issue #1 reported, after the issue was filed. Regenerated with the version; `--check` and the new `release-e2e.mjs` (it installs the real release end to end, with a negative control proving a manifest that lies about one byte is refused) now run in `npm test` and in CI. This round closed two holes of the same family: digests are now computed over **LF-normalised** bytes (`.gitattributes` says `* text=auto eol=lf`, and an editor on Windows can leave the working tree CRLF while `git status` stays clean — which is exactly how issue #1 came back), and listed directories are walked **recursively** (the old one-level scan skipped `src\u002Flib\u002Fx.js`: npm ships it, the manifest does not name it, and `installStaged` deletes whatever the manifest does not name from every installed copy). Both carry standing assertions, the first of which rewrites all 26 files to CRLF and runs `--check` |\n| Offline suites | `npm test` (14 suites) | 14\u002F14 pass; no network, no free-lane quota spent. Suite ports come from the ephemeral range (a hard-coded port loses a race with any other process: occupying the one `tui` used to write down made its own fetch hit somebody else's listener and hang to the runner's timeout, printing six `ok` lines as the \"failure detail\"), and the runner puts a 60 s deadline on every suite and says so when one hangs |\n| The new tests actually bite | old behaviour patched back in, suite re-run | Reverting the `computeMembership` guard → picker fails with `Cannot read properties of undefined (reading 'state')` (2 checks); reverting the response sniff → sniff fails 7 checks. Restoring each fix turns both green again. Every assertion added this round went through the same treatment as a **mutation check**: 9 fixes reverted one at a time in throwaway copies, 9\u002F9 turned their suite red |\n| Probe verdicts → what the picker advertises | live upstream, `host-selftest.mjs` | 10 listed models → 7 on the main route plus 2 under `region-limited`, and the forward port's `\u002Fv1\u002Fmodels` follows at 9; `deepseek-v4-flash-free` (`Model is unavailable`) left the dropdown with its refusal recorded in the settings page. 5xx \u002F 429 \u002F dropped connections all keep their model |\n| A model with no verdict is survivable | offline fake kernel, `picker-test.mjs` | With a newly listed model whose probe the test holds open, `listModels` and `\u002Fsummary` both answer, the model is advertised and reads `availability=unknown` |\n| Rungs still enforced | live upstream, MiMo V2.6 Flash | `light` now sends 4096 and the same prompt finished `stop` at 2 980 tokens; before the change `light` (2048) ended that same prompt with `length` |\n| Long answers stop being cut | live upstream, `probes\u002Flong-answer.mjs` | `balanced` sent `max_tokens=16384`; the request produced **10 164** output tokens (19 914 characters, 194 s) and finished `stop`. The old 8192 ceiling cut the same turn with `length` — the symptom in issue #2. The model cards print each rung's real number (`default output limit 16K`), read in the browser |\n| The body decides, not the header (issue #6) | offline fake gateway, `sniff-test.mjs` | A 200 with `application\u002Fjson` over SSE frames streams normally with no error; a Chinese character split across chunks, a 400-frame stream past the 4 K sniff window, a single JSON body, an empty body and an HTML junk body all route by shape. On the old code that same response also made the probe report a working model as `unavailable` |\n| Composition with no web server | offline fake kernel, `scripts\u002Ftui-test.mjs` | With only `llm` mounted, `apply()` does not throw, both routes register, a full streamed turn completes, the forward port comes up and rejects keyless requests, and the background loops run on plain unref'd timers. The dashboard half waits, and mounts both routes the moment `webServer` appears. **Not yet verified on a real dsh-tui**: neither kernel on this machine (source build 0.1.7-rc.1, AIO 6.9.3) ships a tui profile |\n| The plugin really installs and runs | **real kernel**, dsh 0.1.7-rc.1 web on port 3099 | No `did not activate` in the startup log; `\u002Fapi\u002Four-free-model\u002Fsummary` 200 (10 models: 6 available, 2 region-blocked, 1 unknown, 1 unavailable), `\u002Fevents` streams its hello; in the browser `Settings → Our Free Model` renders the 10 cards, the *Not in the picker* group, the `thinking cannot be disabled` and `default output limit 16K` tags, with an empty console. The first cut of this round **failed here**: with `inject` reduced to `['llm']`, reading `ctx.interval` threw `cannot get property \"timer\" without inject` and the plugin stopped activating on every composition |\n| Two new problems the review itself caught | targeted repro + standing assertions | (1) Aborting during the head sniff threw the raw `AbortError` (","DSH GOD 是一个为 DeepSeek Harness（DSH）设计的轻量级模型路由与服务提供商仪表盘插件。它无需配置即可集成，自动发现并展示上游免费 AI 模型服务（如 OpenCode Zen、Kilo AI K3），支持按可用性动态刷新模型列表、区域分组、本地 OpenAI 兼容转发端口等功能；采用零依赖纯前端实现，不修改 DSH 核心，无构建步骤。适用于希望快速接入多个公开大模型 API、注重数据流向透明性与免认证部署的本地 AI 开发与推理场景。",2,"2026-11-24 04:43:59","CREATED_QUERY"]