Repository navigation
Releases
v0.5.6 — DSH core compatibility
One npm package for DSH 0.2.2 from rc.3 and DSH 0.2.3 from alpha.2. The credential validation API is supported on both lines. CI tests core rc.3, rc.5 (Desktop NEXT) and alpha.2 (Desktop Beta), including strict install of the unchanged packed plugin. This is core API compatibility, not a full Desktop GUI certification.
v0.5.5 — Model catalog layout
Models already enabled appear first when opening settings. Rows stay in place while changing checkboxes and saving; the next visit uses the saved selection. Token limit inputs stay visible, with one shared hint and collapsed CPA details.
v0.5.4 — Visible model token limits
Context window and maximum output overrides are now visible directly on each model card. Read-only CPA metadata stays collapsed. Saved values and save/reset behavior are unchanged.
v0.5.3 — Output budget metadata
Expose explicit per-model maximum output overrides through DSH model metadata so context middleware can recover prematurely clamped output budgets. Existing middleware processes may need a restart to clear cached model metadata.
v0.5.2 — Per-model token limits
Override the context window and maximum output tokens per model in CLIProxyAPI settings. Blank fields restore CPA metadata or plugin defaults. Compatible saved catalogs remain usable if CPA discovery is temporarily unavailable.
0.5.1 - Verified npm releases and installed version display
Settings now show the installed plugin version from its manifest. npm is the normal installation/update channel. The release pipeline packs once, install-tests that artifact, verifies npm bytes, attaches identical recovery tarball and SHA-256, and proposes a verified catalog update. Migration instructions clarified; no custom updater. Tests: 127/127, independent review PASS. npm availability is verified by the publish workflow; release creation alone does not confirm registry propagation.
0.5.0 - keep a usable output budget and accept any 0.x core
0.5.0
Fixed
-
A long session no longer collapses the output budget to one token. A replayed history carries no usage, so pi-ai estimates the whole transcript by symbols; past roughly a million estimated tokens that estimate dwarfs the context window and its clamp returns 1. The gateway then received
max_tokens: 1, the compressing middleware in front of it restored the budget to 128000-256000, and the model produced a huge answer until max-tokens — the "loop" seen in long sessions. The transport now raises any max-token field below 4096 inonPayload, capped by the model's own ceiling, and shows an Output budget restored entry in the diagnostics panel when it does. -
PI_AI_ERRORis retried. pi-ai maps anything that is neither a status, a network failure nor a stream cutoff to that code; a gateway answering 502/503 with a plain body now gets the same retries asSERVER.
Changed
- A core update keeps the plugin enabled.
engines.dshis now>=0.2.2-rc.3 <1.0.0. A caret range on a prerelease stops at the next minor, so a core bump from 0.2.x to 0.3.x disabled the plugin even though nothing it needs had changed. Only a 1.0 core, where a breaking change is actually allowed, can now require a new plugin build. - Core packages moved to 0.2.2-rc.3, the newest published core line.
Verification
100 tests pass. The clamp is reproduced through the real adapter and transport with a 1000-token context window, and the shipped manifest was run through the real evaluatePluginCompatibility from dsh-app-boot 0.2.2-rc.3: enabled on 0.2.2-rc.3 through 0.9.9, disabled only on 1.0.0.
v0.4.9 - Reasoning stays in the thinking channel
Reasoning stays in the reasoning channel
CLIProxyAPI returns thinking blocks with an empty signature. pi-ai's default
(allowEmptySignature: false) converts such a block into plain assistant text
when the history is replayed, so the model reads its own plan in the text
channel and keeps writing plans as ordinary messages instead of reasoning. The
gateway profile now sets allowEmptySignature: true, so reasoning is replayed
as thinking and the plan no longer lands in the transcript.
policy.compat and the per-model compat still win, so the old behaviour
stays available.
Verified on a real harness against a fixture that answers with an unsigned
thinking block: the replayed history carried thinking (38 characters) where
0.4.8 carried a text block.
A busy content-compression window no longer fails the turn
A content-compressing middleware in front of the gateway admits only a couple of
large decoded request bodies at a time and answers 503 request_body_busy until
one finishes. The core's default retry policy makes five attempts capped at ten
seconds (500, 1000, 2000, 4000, 8000 ms), which a busy window can outlast, and
the turn ends with SERVER — the "continue -" prompt after every failure.
The gateway path now retries eight times with a backoff that reaches 20 s, so a
busy window resolves inside one turn. policy.retryPolicy still replaces the
whole policy when you want your own numbers.
Verified live: a fixture that answers 503 six times in a row and then succeeds
finished the turn in 50 s with 0.4.9, while the same install with the old
default failed at attempt 5 of 5 with This turn failed / SERVER.
The request log moved below the settings form
The diagnostics disclosure used to sit above the connection fields, so the
request log had to be scrolled past before the settings appeared. It now sits at
the very bottom of the page, after Actions, in a panel capped at 180 px with its
own scrollbar. The summary still shows the entry count.
Verification
- 96 tests pass (
node --test), including two new adapter tests for the replay
compat flag and the default retry policy, and a client test that asserts the
diagnostics disclosure comes after the form. - Live run on DSH 0.2.2-rc.3 in an isolated profile: three turns, an unsigned
thinking replay, and a six-request 503 window survived in one turn. - Light and dark static previews of the settings page.
Update
npx @deepseek-ai/dsh plugin --profile web add '@thebtf/dsh-cliproxyapi-provider@0.4.9'
v0.4.8 - Keep the wire request alive past the terminal event
v0.4.8 - Stop hanging up on middlewares and stop flooding the page
The turn no longer looks aborted to an accounting middleware
When a stream reached its terminal event, the transport closed the wire request
straight away. Anything sitting between DSH and the gateway — billion-context,
a proxy that bills by completed stream, a logging shim — saw that close before it
had written its own trailer, recorded "client disconnected mid-stream" and
counted the turn as abandoned.
The transport now owns the abort signal it hands to fetch. The consumer's
signal is still honoured, but only until the terminal event: after it, the
request is read to its end (bounded by TERMINAL_DRAIN_MS, 5 s) while the
consumer already has its response. A consumer that gives up before the terminal
event still cancels the wire request, so a stopped turn stays stopped.
Measured with a middleware that logs the same way billion-context does:
| Build | Middleware verdict |
|---|---|
| 0.4.7 | client disconnected mid-stream (bytes=946) |
| 0.4.8 | no such line |
A live turn on a real 0.2.2-rc.3 harness was run against both builds in the same
profile: 0.4.7 produced the log line, 0.4.8 did not, and both rendered
"Pong from the fixture."
The request log is a disclosure, not a wall of text
Every turn appended three diagnostics entries (payload, HTTP response, stream
completed), and the settings page printed all 50 of them. The log now lives
behind Diagnostics · N, collapsed by default, with the readback revision in
its own disclosure next to it.
Verification
- 94 tests, 94 passing (
node --test), including two new transport tests that
fail on 0.4.7: "a consumer that stops after the terminal event does not hang up
on a middleware" and "a consumer that stops before the terminal event cancels
the wire request". - End-to-end through the real
PiAiAdapterwith an accounting middleware:
midStreamClose: false, all five events, 778 bytes, one trailer. - Static preview of the settings page with 18 diagnostics entries: only the
summary lines are visible.
Update
npx @deepseek-ai/dsh plugin --profile web add '@thebtf/dsh-cliproxyapi-provider@0.4.8'
Or pin the GitHub tag: github:thebtf/dsh-cliproxyapi-provider#v0.4.8.
v0.4.7 - Use the core idle budget and read completed streams to the end
The plugin was ten times stricter than the core about silence
A turn through this plugin regularly sat for 30 s and then failed with
pi-ai stream idle timeout after 30000ms, after which the retry policy replayed
the same request one to four times — 30 to 150 s of waiting for one step.
The cause is a default this plugin set itself. dsh-llm-pi-ai arms its idle
watchdog around each watchdog.next(iterator) call and never calls
watchdog.pulse(): the budget measures silence since the last streamed
event, not since the last byte on the wire. The core path
(dsh-llm-deepseek) does the opposite — it passes an activity callback into
its SSE parser and re-arms the timer on every chunk and every keep-alive
comment — and it runs with DEFAULT_STREAM_IDLE_TIMEOUT_MS = 300_000.
So whenever the gateway thought before its first token, or a proxy in front of
it only sent : keep-alive comments, the plugin counted that as a dead stream
and killed a live turn. The plugin now uses the core's 300 s default;
policy.streamIdleTimeoutMs still tightens it per connection when you want
that.
Measured through the real PiAiAdapter against a server that sends one delta,
goes silent for 35 s while emitting keep-alive comments, then finishes:
| Build | Idle budget | Result |
|---|---|---|
| 0.4.6 | 30 s | fails at 30 074 ms, pi-ai stream idle timeout after 30000ms, 2 of 5 events |
| 0.4.7 | 300 s | completes at 35 075 ms, all 5 events, finish clean |
A completed turn no longer looks aborted to a proxy in front of it
When the terminal event arrived, the transport cancelled the upstream socket
immediately. That is correct for the consumer, but a middleware in front of the
gateway (a compressing or accounting proxy such as billion-context) sees a
client that vanishes mid-response and records a cancelled turn — it aborts its
own upstream work and writes the usage figures after the abort.
The transport still ends the consumer stream on the terminal event, but now
reads the tail to its end in the background first, capped at 5 s so a proxy that
never closes cannot pin the socket. Measured against a middleware that records
close before writableEnded:
| Build | Middleware verdict |
|---|---|
| 0.4.6 | client closed mid-stream: true |
| 0.4.7 | client closed mid-stream: false, response completed normally |
Verification
npm run check: 91 tests, 91 passing (was 89). New coverage: the transport
keeps reading a completed response to its end so a middleware does not see an
aborted turn, and the adapter publishes the core's idle budget while still
honouring an explicitpolicy.streamIdleTimeoutMs.- A/B through the real
PiAiAdapter(not a stub): 35 s of upstream silence.
0.4.6 fails at 30 s, 0.4.7 completes. - A/B through the real transport with a recording middleware: 0.4.6 reports a
mid-stream client close, 0.4.7 reports a completed response. - Live evidence that this was the dominant failure: in one recorded session on
the 0.4.6 build, 17 of 27 plugin attempts ended in exactly
pi-ai stream idle timeout after 30000ms, each followed by retries.
Update
npx @deepseek-ai/dsh plugin --profile web add '@thebtf/dsh-cliproxyapi-provider@0.4.7'Restart DeepSeek Harness afterwards. No settings change is needed: the new idle
budget is the default, and an existing policy.streamIdleTimeoutMs still wins.