@mars-sea/dsh-commandcode-provider 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.6.2] - 2026-08-21
8
+
9
+ ### Added
10
+
11
+ - **Stored API keys can now be cleared, not just replaced.** A "Clear stored key" action on the default key and on every account stages a removal (with a visible "will be cleared on save" badge and an undo); saving unsets the credential through the Host's `credentials.unset`, so the account reports unconfigured again and falls back to its other key sources. Previously a bad key could only be overwritten, never removed.
12
+
13
+ ### Changed
14
+
15
+ - **Free models now lead the model picker.** Models whose deals mark them free (currently Ox Alpha and Laguna S 2.1) sort ahead of every paid tier — they cost no credits and work on any account, so they make the best defaults. The rest of the order is unchanged: Go → GOAT → Pro → Provider/Max, alphabetical within each tier.
16
+
17
+ ### Fixed
18
+
19
+ - **An invalid or expired API key no longer hides behind "Some endpoint data unavailable".** When every account endpoint rejects with 401 (wrong/expired key), the usage card now shows a prominent "API key invalid or expired" banner with an actionable hint instead of the generic partial-data note; a total 5xx or network outage gets their own distinct banners too. The `/commandcode` command surfaces the same cause up front. Partial failures keep the existing degraded view.
20
+ - **Retry and credential failure messages are now bilingual (English + 中文).** The harness UI renders these messages verbatim inside its retry/turn-error chrome, so the "all accounts exhausted" rate-limit error, the all-401 credential error, and the single-account 401 error now carry both readings in one string — no more parsing an English-only wall of text to learn when your window resets.
21
+
22
+ ## [0.6.1] - 2026-08-22
23
+
24
+ ### Added
25
+
26
+ - **New model: Ox Alpha (`stealth/ox-alpha`, command-code@1.31.0).** A free 1M-context reasoning model with vision input, included on every plan: it appears in the picker under the Go tier with `FREE` · `Image` · `1M` markers, is whitelisted as vision-capable and auto-thinking (it reasons automatically with no selectable effort levels), and carries a `FREE` deal while the stealth preview lasts.
27
+ - **The settings page now shows the plugin version** as a muted footer line ("Command Code Provider v0.6.1"), read from package.json at build time so it always matches the published release.
28
+ - **Settings-page input polish:** a brief "Saved ✓" confirmation flashes after each accepted save (failures already showed an error); the two millisecond timeout fields now validate their range while typing with specific messages ("must be at least 1" / "above the allowed maximum") instead of a generic save-time failure; and the API-key fields (default + every account) gained a Show/Hide toggle so a pasted key can be spot-checked.
29
+
30
+ ### Changed
31
+
32
+ - **Retries are now persistent (opencode-style) instead of two attempts.** Transient failures — rate limits, server errors, timeouts, transport drops, empty responses — retry up to 1000 times at the agent-step boundary, with waits doubling from 500 ms and capping at 15 minutes (±10% jitter). Permanent failures (an invalid key, unsupported content, plan rejections) still fail fast on the first attempt. Waits are smart: a 429's `Retry-After` header and the rotation pool's earliest known window-reset time are honored verbatim up to the 15-minute cap, so when every account's usage window is exhausted the session sleeps through the window and recovers in place instead of dying after two quick tries.
33
+ - **Synced with the official command-code@1.31.0 CLI** (upstream moved 1.28.4 → 1.29.0 → 1.30.0 → 1.30.1 → 1.31.0; the intermediate releases shipped BYOK provider support, model-traffic routing, and CLI UI fixes — none touch the Provider API). `COMMAND_CODE_CLI_VERSION` is now `1.31.0`. The only snapshot change across those releases is the new Ox Alpha model above; wire protocol, endpoints, effort map, plan maps, deals, and peak pricing are all unchanged.
34
+ - **Verified compatibility with DeepSeek Harness 0.1.0-rc.7 / 0.1.0-rc.8 / 0.1.1-rc.1**, including rc.8's reworked client boot protocol: the client bundle now declares its module-graph dependency (`dsh.client.external`), so client-module load order no longer relies on the platform seed table. The supported peer range widened to `^0.1.0-rc.6 || ^0.1.1-rc.1`, so 0.1.1 hosts install without unmet-peer-dependency warnings.
35
+
7
36
  ## [0.6.0] - 2026-08-19
8
37
 
9
38
  ### Changed
package/README.md CHANGED
@@ -10,145 +10,67 @@
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
11
  [![npm](https://img.shields.io/badge/npm-@mars--sea%2Fdsh--commandcode--provider-blue.svg)](https://www.npmjs.com/package/@mars-sea/dsh-commandcode-provider)
12
12
 
13
- Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/) LLM provider plugin for **Command Code**, ported from [pi-commandcode-provider](https://github.com/patlux/pi-commandcode-provider) (MIT). It registers a `commandcode` provider whose requests are translated to Command Code's Provider API (`POST /alpha/generate`, reverse-engineered by the pi plugin, `command-code@1.28.4`).
13
+ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/) LLM provider plugin for **Command Code**, ported from [pi-commandcode-provider](https://github.com/patlux/pi-commandcode-provider) (MIT).
14
14
 
15
15
  > This is a community integration. You need your own Command Code account and API key or subscription, and Command Code's terms apply. This project is not affiliated with Command Code, Inc.
16
16
 
17
17
  ## What you get
18
18
 
19
- - **Plugin bundle** installable into any dsh profile with `dsh plugin add`, plus a **`commandcode` provider route** with a live catalog (`GET {apiBase}/provider/v1/models`, cached at `~/.commandcode/models-cache.json`).
20
- - **Dedicated "Command Code" settings page** (Settings **Command Code**) with an **API-key field**, connection knobs (API base, working directory, request/stream timeouts), a **live "Account usage" card** (stats, credits, window-limit bars, subscription plan badge) and a **Hide out-of-plan models** toggle. The key is stored through the dsh credentials service; connection fields land in the `llm-commandcode` section and apply to the very next request, no restart.
21
- - **Multi-account rotation**: when one account's usage window (e.g. the Go plan's 5-hour limit) is exhausted, requests **seamlessly switch to the next account** — passive switching on 429/401, invisible to the model (the request body is account-independent and `threadId` is random per request); when every account is exhausted the error names **the earliest window reset**. The settings page's **Account rotation** card adds/labels/removes accounts, and `/commandcode` plus the usage card report per-account state. See [Account rotation](#account-rotation).
22
- - **API key resolution order**: `config.apiKey` credential ref `apiKeyEnv` (default `COMMANDCODE_API_KEY`) launch environment → the official CLI auth file (`~/.commandcode/auth.json`, from `command-code login`).
23
- - **Model-picker annotations**: every model shows the **minimum plan** that includes it (`KNOWN_PLANS`), an **active deal** or `FREE` badge (`KNOWN_DEALS`, expiry-aware so lapsed discounts hide themselves), the **current peak/off-peak state** (`Peak`/`Half`) for time-of-day-priced models, an **`Image`** marker for Vision models, and the **context window** (`1M` / `256K` / `262K`) — e.g. *"Go · 50% off · Image · 1M"*, *"Go · Half · 1M"*. The list is **sorted by plan tier** (Go → GOAT → Pro → Provider/Max), so the models your plan can use lead the picker.
24
- - **Plan-aware picker filtering**: the picker **hides models above your subscription tier** outright (resolved live from your account's billing state). It fails open — an unreachable billing endpoint, an unknown plan, or a positive on-demand credit balance (which the official CLI treats as unlocking every model) all keep the full catalog visible — and the server stays the final gate. Set **Hide out-of-plan models** off on the settings page (or `filterModelsByPlan: false` in the `llm-commandcode` settings section) to always list every model.
25
- - **Reasoning-effort support** for models the official catalog marks as such (`KNOWN_EFFORTS`, matching `command-code@1.28.4`); reasoning models without effort levels still think automatically, exactly like the official CLI.
26
- - **Image input for Vision-capable models** (sent in the official wire format via the dsh attachment service); text-only models refuse images loudly (`UNSUPPORTED_CONTENT`) rather than dropping them.
19
+ - **Plugin bundle** install into any dsh profile with `dsh plugin add`; registers a `commandcode` provider route with a live model catalog.
20
+ - **Dedicated settings page** API key, connection options, a live account-usage card, and a "Hide out-of-plan models" toggle.
21
+ - **Multi-account rotation** when one account hits its usage limit, requests switch to the next account automatically. See [Account rotation](#account-rotation).
22
+ - **Flexible API key setup** via the settings page, an environment variable, or the official CLI login file.
23
+ - **Model-picker annotations** minimum plan, active deal or `FREE` badge, peak/off-peak state, image support, and context window; free models listed first.
24
+ - **Plan-aware picker** models above your subscription tier are hidden by default (toggleable).
25
+ - **Reasoning-effort support** models with selectable reasoning effort levels expose them in the picker.
26
+ - **Image input** Vision-capable models accept images.
27
27
 
28
- <img src="assets/screenshots/model-picker.png" alt="Model picker with plan, deal, image and context annotations" width="250">
29
-
30
- ## Getting an API key
31
-
32
- Command Code API keys never expire. The easiest path is the official CLI (Node.js 22+):
33
-
34
- ```sh
35
- npm i -g command-code@latest
36
- cmd login # macOS/Linux; native Windows: cmdc login
37
- ```
38
-
39
- `cmd login` opens a browser to authenticate; the key is written to `~/.commandcode/auth.json` — picked up automatically as a last-resort fallback. Alternatively create a key in the browser ([Command Code Studio](https://commandcode.ai/studio/auth/cli)) and paste it into **Settings → Command Code**, or `export COMMANDCODE_API_KEY="user_..."`.
28
+ See [Screenshots](#screenshots) below for what the UI looks like.
40
29
 
41
30
  ## Install
42
31
 
43
- ### From npm (recommended)
44
-
45
- The bare name `dsh-commandcode-provider` is taken by an unrelated package, so this plugin is published as **`@mars-sea/dsh-commandcode-provider`**:
46
-
47
32
  ```sh
48
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider
33
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
49
34
  ```
50
35
 
51
- ### From GitHub
52
-
53
- ```sh
54
- # Pin a release tag (recommended — readable and immutable)
55
- dsh plugin --profile web add github:Mars-Sea/dsh-commandcode-provider#v0.2.2
56
- # Or pin any exact commit by its SHA
57
- dsh plugin --profile web add github:Mars-Sea/dsh-commandcode-provider#<full-commit-sha>
58
- ```
59
-
60
- The `#<ref>` suffix pins one exact revision (pnpm git-dependency syntax). Without it the install tracks the default branch, so a later push can silently change what you get.
61
-
62
- A git install fetches **sources**, so the package's `prepare` script builds `lib/` after install. pnpm ≥10 blocks that script by default — run the `add`, then copy the **exact package key pnpm prints** into `~/.dsh/profiles/web/pnpm-workspace.yaml`:
63
-
64
- ```yaml
65
- allowBuilds:
66
- '@mars-sea/dsh-commandcode-provider@github:Mars-Sea/dsh-commandcode-provider#<full-commit-sha>': true
67
- ```
68
-
69
- and re-run the `add`.
70
-
71
- ### From a local checkout
36
+ ## Updating
72
37
 
73
38
  ```sh
74
- npm install
75
- npm run build # git/tarball installs do this via `prepare` automatically
76
- dsh plugin --profile web add /path/to/dsh-commandcode-provider
39
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
77
40
  ```
78
41
 
79
- After changing `src/`, re-run `npm run build` and restart the app.
80
-
81
- ### What the install does
82
-
83
- `dsh plugin add` links the package into the profile (pnpm records it under the **true package name** `@mars-sea/dsh-commandcode-provider`), appends that name to `dsh.profile.bundles`, and activates the `cordis.patch.yml` layer:
84
-
85
- ```yaml
86
- - insert:
87
- - id: llm-commandcode
88
- name: "@mars-sea/dsh-commandcode-provider"
89
- config:
90
- apiKeyEnv: COMMANDCODE_API_KEY
91
- ```
92
-
93
- The patch `name` must be the **full package specifier, quoted** — the loader imports it as a module from the profile's `node_modules`, where pnpm only links the scoped name. A bare name fails with `ERR_MODULE_NOT_FOUND` and crashes the app on boot; an unquoted `@mars-sea/...` fails YAML parsing (see [Troubleshooting](#troubleshooting)).
94
-
95
- Verify the composed layer, then (re)start the web app:
96
-
97
- ```sh
98
- dsh --profile web --dump-config # shows a "# == @mars-sea/dsh-commandcode-provider" layer
99
- dsh web # or restart your running instance
100
- ```
42
+ Then restart the web app.
101
43
 
102
- ## Updating
44
+ ## Getting an API key
103
45
 
104
- The patch layer is read from the **installed package** at every boot, so updating the package brings the fixed row automatically — no need to hand-edit `cordis.patch.yml` unless you copied it into your own profile layer.
46
+ The easiest path is the official CLI (Node.js 22+):
105
47
 
106
48
  ```sh
107
- # npm: always the latest published release
108
- dsh plugin --profile web update @mars-sea/dsh-commandcode-provider
109
-
110
- # GitHub (pinned): point at the new tag — no uninstall needed, pnpm swaps it in place
111
- dsh plugin --profile web add github:Mars-Sea/dsh-commandcode-provider#v0.2.2
112
-
113
- # local checkout: pull, rebuild, restart
114
- git -C /path/to/dsh-commandcode-provider pull
115
- npm run build --prefix /path/to/dsh-commandcode-provider
116
- dsh web
49
+ npm i -g command-code@latest
50
+ cmd login # macOS/Linux; native Windows: cmdc login
117
51
  ```
118
52
 
119
- Then restart the web app. Verify with `dsh --profile web --dump-config` the layer should show `name: '@mars-sea/dsh-commandcode-provider'`.
120
-
121
- > **`update` says "Already up to date" but the version did not move (pnpm ≥ 11)?** pnpm 11's `minimumReleaseAge` supply-chain policy can refuse a freshly published version. Pin the exact version instead: `dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.2.2` (or `pnpm config set minimumReleaseAge 0 --location project` inside the profile directory).
122
-
123
- > **Upgrading from ≤0.1.6** (or a broken hand-edited profile): if you *copied* the old patch row into your profile's own `cordis.patch.yml`, that copy still wins over the bundle layer — fix it to `name: "@mars-sea/dsh-commandcode-provider"` or remove it (see [Troubleshooting](#troubleshooting)).
124
-
125
- > **To uninstall instead**: `dsh plugin --profile web remove @mars-sea/dsh-commandcode-provider` (the **scoped** name — pnpm records the dependency under its real name). Your API key in the dsh credential store and `~/.commandcode/auth.json` are left untouched.
53
+ Alternatively, create a key in the browser ([Command Code Studio](https://commandcode.ai/studio/auth/cli)) and paste it into **Settings Command Code**, or `export COMMANDCODE_API_KEY="user_..."`.
126
54
 
127
55
  ## Verify it works
128
56
 
129
- After restart: **Settings → Command Code** shows the dedicated page — enter your API key and click **Save** (the badge flips to 已配置/Configured once the Host holds it). **Settings → Models** shows a **Command Code** card; the model picker lists the live catalog under **commandcode**. Send a message with a model your plan includes — `deepseek/deepseek-v4-flash` works on entry-level plans, and open-weight models (DeepSeek/Qwen/Kimi/MiniMax) generally do, while frontier models (Claude/GPT/Gemini/Grok) may require Pro/Max plans or on-demand usage.
57
+ After restart, enter your API key in **Settings Command Code** and save; **Settings → Models** shows a **Command Code** card, and the model picker lists the live catalog under **commandcode**. Send a message with a model your plan includes.
130
58
 
131
59
  ## Usage dashboard
132
60
 
133
- The plugin registers a `/commandcode` slash command (requires the dsh `commands` service, present in the standard web profile) showing your account state from the official account endpoints:
61
+ The plugin registers a `/commandcode` slash command showing per-account usage:
134
62
 
135
63
  ```text
136
64
  /commandcode (or /commandcode status)
137
65
  ```
138
66
 
139
- ![Usage dashboard](assets/screenshots/usage-dashboard.png)
140
-
141
- Each endpoint degrades independently — a temporary failure of one leaves the rest visible and notes the failure inline.
142
-
143
67
  ## Account rotation
144
68
 
145
69
  With several Command Code subscriptions, the plugin **switches to the next account automatically** when one hits its usage limit:
146
70
 
147
- - **Passive switching, zero extra cost**: rotation happens only when a request is actually rejected pre-stream a 429 (window exhausted) marks the account exhausted, a 401 marks its key disabled, and the adapter immediately re-sends the same request with the next account's key (the request body is account-independent and `threadId` is random per request, so the switch is invisible to the model).
148
- - **Precise revival**: once every account is marked, the plugin probes each key's real five-hour window via `/alpha/billing/credits` — accounts whose window already reset come back immediately; if all are still exhausted the request fails with a `RATE_LIMIT` error naming **the earliest reset time** (all-401 throws `INVALID_CREDENTIAL`).
149
- - **Configuration surface**: the **Account rotation** card at Settings → **Command Code** — **Add account**, then give each a label and API key (every key is stored through the credentials service under its own reference `COMMANDCODE_API_KEY_2`, …, write-only like the default key). The top-level key always serves first as the `default` account.
150
- - **Manual switching**: the **Active account** dropdown on the same card pins the preferred account (persisted as the `activeAccount` setting) — effective on the next request after saving. If the pinned account is exhausted, requests still rotate to another usable account, and once its window resets the pinned account serves again.
151
- - **Per-account reporting**: the settings page's **Account usage** card renders one section per account with **Active / Cooling down / Invalid key** badges; `/commandcode` prints one dashboard section per account.
71
+ - **Setup** use the **Account rotation** card at Settings **Command Code** to add accounts with a label and API key; the top-level key always serves first as the `default` account.
72
+ - **Manual switching** the **Active account** dropdown pins a preferred account; if it is exhausted, requests fall back to other accounts and return once its window resets.
73
+ - **Status** the **Account usage** card and `/commandcode` report per-account state.
152
74
 
153
75
  The equivalent YAML (`$DSH_HOME/settings.yaml` or composition config):
154
76
 
@@ -163,53 +85,33 @@ llm-commandcode:
163
85
  apiKeyEnv: COMMANDCODE_API_KEY_3
164
86
  ```
165
87
 
166
- Each account may also carry a literal `apiKey` in composition config (winning over its `apiKeyEnv`); key literals are never stored in the settings document.
167
-
168
88
  ## Configure
169
89
 
170
- **Settings → Command Code** is the primary surface: an **API-key** field (stored in `$DSH_HOME/.credentials.yaml` via the credentials service; write-only, reports whether a key is set), plus **API base URL**, **working directory**, and **request/stream timeout** fields, all written to the `llm-commandcode` section. The catalog is browsable without a key. The **working directory** is optional leave it blank and the placeholder shows the process cwd it resolves to.
90
+ **Settings → Command Code** covers the API key, API base URL, working directory, and request/stream timeouts; once a key is saved, a live **Account usage** card appears at the top of the page.
171
91
 
172
- Once a key is configured, the page header shows a live **Account usage** card the same account, spend, credit, and window-limit facts as `/commandcode`, plus your subscription plan badge and billing period end — fetched Host-side (the key never leaves it) and rendered natively:
173
-
174
- <img src="assets/screenshots/settings-page.png" alt="Command Code settings page with the account usage card" width="640">
175
-
176
- The same knobs live in `$DSH_HOME/settings.yaml` (per-request overrides, no restart):
92
+ The same options live in `$DSH_HOME/settings.yaml` (changes apply immediately, no restart):
177
93
 
178
94
  ```yaml
179
95
  llm-commandcode:
180
- apiKeyEnv: COMMANDCODE_API_KEY # credential reference resolved per request
96
+ apiKeyEnv: COMMANDCODE_API_KEY # credential reference
181
97
  apiBase: https://api.commandcode.ai
182
- workingDir: /path/to/project # reported to the API (project slug, config block)
98
+ workingDir: /path/to/project # optional
183
99
  modelsCachePath: ~/.commandcode/models-cache.json
184
- requestTimeoutMs: 60000 # max wait for the first response byte (default 60s)
185
- streamIdleTimeoutMs: 300000 # stream stall before treated as dead (default 300s — generous, so long-thinking models are not cut off)
100
+ requestTimeoutMs: 60000 # default 60s
101
+ streamIdleTimeoutMs: 300000 # default 300s
186
102
  ```
187
103
 
188
- The composition-entry config (`cordis.patch.yml`) accepts the same keys; a literal `apiKey` there takes precedence over the credential reference.
189
-
190
- ## Troubleshooting
191
-
192
- - **`Command Code API request to .../alpha/generate failed` with retries** — a **transport-layer failure**: `fetch()` never got an HTTP response (a 401/403/429 would say "API error"). Since 0.1.8 the message names the real root cause (`ECONNREFUSED`, `ENOTFOUND`, `CERT_HAS_EXPIRED`, `socket hang up`, …). Common causes: **a required proxy** (Node's `fetch`/undici ignores `HTTP_PROXY`/`HTTPS_PROXY` — configure a dispatcher or whitelist `api.commandcode.ai`), **connection reset/throttled** (firewall, GFW-style interference, unstable Wi-Fi), **TLS interception** (corporate MITM), or a transient blip retry recovers from.
193
- - **A long generation stops mid-stream** — since 0.1.8 the adapter aborts after `requestTimeoutMs` (60s) with no first byte, and treats a stream stalling past `streamIdleTimeoutMs` (300s by default) as dead. Both surface as `TIMEOUT` with the stall duration; tune the knobs for slow-but-stable networks.
194
- - **"Reconnects" when a reasoning model thinks for a long time** — the stream idle watchdog used to default to 120s, which is shorter than a frontier reasoning model's silent thinking phase (xhigh/max effort can stay quiet for minutes, and the official CLI sets no idle cap at all). Since 0.2.3 the default is **300s**; if you still hit spurious timeouts on very long thinking, raise `streamIdleTimeoutMs` in the `llm-commandcode` section or on the settings page.
195
- - **Boot crash: `ERR_MODULE_NOT_FOUND: Cannot find package 'dsh-commandcode-provider'`** — the patch row's `name` is the bare name, but pnpm only links the scoped name. Fix the row to `name: "@mars-sea/dsh-commandcode-provider"` — note the **quotes** (an unquoted `@`-prefixed scalar fails YAML parsing) — then restart.
196
- - **`MODEL_NOT_IN_PLAN` (403)** — the model isn't in your plan. Pick an open-weight model or upgrade; the error names the model and links the docs.
197
- - **`MISSING_CREDENTIAL`** — no key anywhere. Store one via the settings page, `export COMMANDCODE_API_KEY`, set `config.apiKey`, or run `command-code login`. The route and catalog stay browsable without a key.
198
- - **Models card shows "not configured" but requests work** — the key came from `~/.commandcode/auth.json` (the `cmd login` fallback), not the credential store. Paste it into the card once; both coexist fine.
199
- - **A reasoning model returns no visible text on short requests** — it consumes output tokens on reasoning first; a small `maxTokens` can be exhausted before visible text. Normal.
200
- - **`allowBuilds` errors on `dsh plugin add` from git** — copy the exact package key pnpm printed into `pnpm-workspace.yaml` and re-run (see [Install](#from-github)).
201
-
202
104
  ## Notes & limitations
203
105
 
204
- - **Image input is model-gated**: only models the official registry lists with Vision accept images (see `KNOWN_IMAGE_MODELS` in `src/adapter.ts`). Text-only models throw `UNSUPPORTED_CONTENT`; Command Code's own CLI's client-side *VISION* fallback is **not** reproduced here — switch to a Vision model instead. Image input also requires the dsh **attachment service**.
205
- - **Switching to a text-only model in an image-bearing session is rejected by dsh itself** a harness-level guard (`dsh-host-apiproxy`'s `selectModel`) refuses `model-unavailable` and cannot be relaxed from the plugin side. This bundle makes the message friendlier via its client half: it rewrites the rejection to *"当前会话已包含图片,而模型 \<model\> 不支持图片输入;请选择支持图片的模型,或先移除会话中的图片。"* (the error code and details pass through unchanged). Select a model the picker marks *`Image`*, remove the images first, or use an image-routing bundle (e.g. `@deepseek-ai/dsh-llm-image-routing`).
206
- - **No `stop` sequences** (the wire format has none): requests carrying one throw `UNSUPPORTED_OPTION`.
207
- - Reasoning blocks are **not replayed** into later turns (matches the official CLI); only tool calls with a paired tool result are replayed.
208
- - The catalog endpoint is public; `/alpha/generate` requires your key.
106
+ - **Image input is model-gated** only Vision models accept images; text-only models refuse them.
107
+ - Switching to a text-only model in an image-bearing session is rejected by dsh — pick a model marked *`Image`* or remove the images first.
108
+ - **No `stop` sequences** requests carrying one fail.
109
+ - Reasoning blocks are not replayed into later turns; only tool calls with a paired tool result are replayed.
110
+ - The model catalog is browsable without a key; chat requests need one.
209
111
 
210
112
  ## Permissions & privacy
211
113
 
212
- This plugin operates entirely within your dsh profile and your Command Code account. **Local files**: reads `~/.commandcode/auth.json` only as a last-resort key fallback; reads/writes `~/.commandcode/models-cache.json`; reads your key from `$DSH_HOME/.credentials.yaml` via the standard credential seam (never logged). **Network**: `GET {apiBase}/provider/v1/models` (public catalog) and `POST {apiBase}/alpha/generate` (your requests, authenticated), the body including your configured `workingDir`. **No telemetry** — the only outbound host is the Command Code API (`api.commandcode.ai` by default, configurable via `apiBase`).
114
+ The plugin only communicates between your local dsh profile and your Command Code account: locally it touches only the credential store and the models cache (plus `~/.commandcode/auth.json` as a last-resort fallback); on the network it calls only the Command Code API. No telemetry.
213
115
 
214
116
  ## Disabling / uninstalling
215
117
 
@@ -220,7 +122,7 @@ This plugin operates entirely within your dsh profile and your Command Code acco
220
122
  dsh plugin --profile web remove @mars-sea/dsh-commandcode-provider
221
123
  ```
222
124
 
223
- This removes the bundle dependency and its layer; your API key in the dsh credential store and `~/.commandcode/auth.json` are left untouched.
125
+ Your API key in the dsh credential store and `~/.commandcode/auth.json` are left untouched.
224
126
 
225
127
  ## Development
226
128
 
@@ -230,6 +132,14 @@ npm run typecheck # tsc --noEmit
230
132
  npm run build # tsdown -> lib/
231
133
  ```
232
134
 
135
+ To try a local build in a profile:
136
+
137
+ ```sh
138
+ dsh plugin --profile web add /path/to/dsh-commandcode-provider
139
+ ```
140
+
141
+ After changing `src/`, re-run `npm run build` and restart the app.
142
+
233
143
  ## Community & feedback
234
144
 
235
145
  - <img src="https://cdn.simpleicons.org/github/111827" width="16" alt="GitHub" /> [GitHub Repository](https://github.com/Mars-Sea/dsh-commandcode-provider)
@@ -240,3 +150,17 @@ npm run build # tsdown -> lib/
240
150
  ## License
241
151
 
242
152
  MIT — see [LICENSE](./LICENSE). Portions ported from [pi-commandcode-provider](https://github.com/patlux/pi-commandcode-provider) (MIT).
153
+
154
+ ## Screenshots
155
+
156
+ **Model picker** — plan tier, deal/FREE, peak/off-peak, Image and context annotations:
157
+
158
+ <img src="assets/screenshots/model-picker.png" alt="Model picker with plan, deal, image and context annotations" width="420">
159
+
160
+ **Usage dashboard** — `/commandcode` per-account report:
161
+
162
+ ![Usage dashboard](assets/screenshots/usage-dashboard.png)
163
+
164
+ **Settings page** — API key, connection knobs, account rotation and the live account-usage card:
165
+
166
+ <img src="assets/screenshots/settings-page.png" alt="Command Code settings page with the account usage card" width="640">