Repository navigation
Releases
0.9.2: load on DSH 0.2.3-alpha.2
Compatibility fix for the latest published DSH release (dsh-v0.2.3-alpha.2).
Fixed
- The plugin loads on DSH 0.2.3-alpha.2.
@deepseek-ai/dsh-llmremoved theassertUsableApiKeyexport in
0.2.3-alpha.2, solib/accounts.jsfailed to import it and the plugin could not load. The same transport check
(trim surrounding whitespace, reject a blank key, reject characters an HTTP header cannot carry) is now
implemented locally, so the plugin loads on both 0.2.2-rc.5 and 0.2.3-alpha.2. - Compatibility is verified against the latest published release.
engines.dsh(>=0.2.1-rc.5) is the sole
compatibility check DSH applies, and it matches 0.2.3-alpha.2 under DSH's prerelease-inclusive matching. The full
suite passes against the 0.2.3-alpha.2dsh-llmanddsh-launch-environmentpackages, and the plugin installs
into a 0.2.3-alpha.2 profile, loads, and serves/plugins/dsh-mistral-pro/healthand/meta.
Tests
test/api-key.mjs covers the trim, blank, illegal-character and missing-credential paths. npm test passes 21/21
suites, npm run check is clean, and CI passes on Node 22 and 24.
0.9.1: harden the prefix diagnostics
Patch release: correctness and identity hardening for the prefix diagnostics introduced in 0.9.0.
Fixed
- The prefix observer can no longer overstate what it compared. The comparison is capped at 512 messages, so
when both requests exceeded the cap the first 512 could match while a later message differed, and the observer
still reportedrepeat(or a verifiedappend/rewrite). It now reportsunknownwhenever at least one list
extends beyond the cap and the unexamined suffixes could differ.repeatrequires both lists to have been fully
compared, anappendis only claimed when the entire previous list was retained and matched, and arewriteis
only claimed for a divergence inside the compared range or a fully compared truncation. - A prompt-cache key is no longer used as a conversation identity.
sharedmode and custom keys are designed
to be shared across independent conversations, so comparing them would inventappend/rewrite/repeat
relationships between unrelated sessions. The observer now uses DSH's session id only, and a request without one
carries no relation. - The observer is only updated for an actual outbound attempt. A call that fails before the transport (missing
credentials, an already-aborted request, a transport that cannot be prepared) no longer becomes the previous
request for the next comparison. A request that reaches the transport counts as attempted even if the transport
then fails, and one logical request is observed once across account failover attempts.
Changed
prefixRelation: unknownis a new value for a comparison that reached the 512-message cap without finding a
divergence.- Documentation corrections.
steadyStateis documented as excluding the first observed usage entry of each
prompt-cache-key digest in the retained window — a cache-key family, not necessarily one conversation, and not a
guaranteed cold start.prefixRelation: appendis documented as a comparison of the wiremessageslist only,
not proof that the complete effective prompt or every cache-relevant request input is unchanged.
Tests
test/prefix-fingerprint.mjs covers the cap conservatism (equal-length and different-length lists that diverge
after message 512), session-only identity with independent shared/custom-key sessions, credential and abort
failures that must not be observed, transport failures that must, and failover as one logical observation.
npm test passes 20/20 suites, npm run check is clean, and CI passes on Node 22 and 24 for the released commit.
Closes #43.
0.9.0: cache diagnostics by account, model and affinity
Cache diagnostics by account, model and effective affinity, with the follow-up corrections from #42.
Added
/cachebreaks the hit rate down by serving account, model and routing identity.byAccount,byModel
andbyAffinityreport requests, prompt tokens, cached tokens and the token-weighted rate per group, busiest
first;recententries carryaccount,affinityandconversation. Every pre-existing field keeps its
meaning.steadyStateByRouteremoves the first request of each(account, model, affinity, prompt-key)route, so a
cold request after an account failover, a model change or a key rotation is not counted as a warm miss.
steadyStatekeeps its original prompt-key-only semantics.windowreports the retained log window (maxLines,entries). Every rate on/cacheis a calculation
over that window, not a lifetime counter.
Changed
- The wire log records the affinity that was actually sent. The
requestline carries the servingaccount
and a 16-hex digest of the exactx-affinityvalue read back from the headers handed to the transport; the
usageline carries the same digest. No raw header value, cache key, session id or prompt text is logged. - The prefix diagnostic compares against the previous request.
prefixSha256/prefixMessagesare replaced
byprefixRelation(first/append/rewrite/repeat) andprefixReused, computed from a bounded
in-memory comparison with the previous request of the same conversation (first 512 messages, 32 most recently
used conversations, per-message digests only). A digest of a fixed message range could not be stable across
append-only turns, so the previous "unchanged digest means provider eviction" rule was invalid. - The steady-state views are documented and labelled as window-relative. The request they drop is the first
one still visible in the retained 400-line log, not a proven cold start.
Fixed
steadyStateByRouteincludes the model. A customprompt_cache_keydoes not carry the model, so two models
could share a route. The tuple is JSON-encoded, so a delimiter inside an account name or model id cannot merge
two different routes.- Missing usage is no longer a zero-cache response. A
usageline is written only for a completed response
whose supplier reported a prompt count; an interrupted stream or ausage: {}chunk leaves no record.
Tests
20 regression suites pass (new test/cache-diagnostics.mjs, rewritten test/prefix-fingerprint.mjs),
npm run check is clean, and CI passes on Node 22 and 24.
Closes #39 and #42. #40 concluded with no code change: the controlled A/B found no measurable difference between
the current affinity, a session-derived affinity and no header at all.
0.8.2: authenticated browser routes
Security release. The plugin's browser routes (/usage, /cache, /wire, /test, /meta, /health, /settings, /refresh, /models, /client) answered private account, usage and billing data without host authentication: a Web carrier resource route gets no admission from the carrier. Every route now asks the composition's connection service for a rejection first, and the guard fails closed. Covered by test/route-admission.mjs.
0.8.1: keep the settings section's hook order stable
Fixed
-
The Mistral Pro settings section no longer renders blank. 0.8.0 added
applyRoutingas a
useCallbackbelow the settings component's loading/error early returns. The loading render returned
before that hook, so the ready render called one more hook than the previous one and React threw
Rendered more hooks than during the previous render, leaving the whole section empty.applyRoutingis now a plain function, which is safe because it is only used from click handlers and
never appears in a dependency array.
Tests
- New
test/settings-hooks.mjsrenders the settings section through a hook-order-enforcing React
stand-in. It fails on the 0.8.0 shape (20 -> 21hooks) and passes on this release. npm test: 18/18 suites passed.npm run check: clean.
Full changelog: https://github.com/lordraiden/dsh-mistral-pro/blob/main/CHANGELOG.md
v0.8.0
Configurable consumption priority (Vibe first, Studio first or automatic) and a working automatic-fallback switch.
Routing
- Consumption priority.
advanced.priorityselectsvibe-first,studio-firstorauto. The fixed
modes pin the two key accounts and never promote a fallback;autokeeps the account that last worked
first. - Automatic fallback is now wired.
advanced.failoverwas stored but never read; turning it off now
returns only the first account, so a failure surfaces instead of switching keys. - Settings → Routing exposes both controls next to the two key rows; changing the priority reorders
the Vibe/Studio accounts so the account list never contradicts it, and their reorder arrows are
disabled. - Covered by
test/routing.mjs.
v0.7.0
Two-key setup in Settings (Vibe primary, Studio fallback) and a clearer cache statistics view.
Two keys in Settings
- Settings → Mistral Pro → Keys. Two rows — Vibe API key (
MISTRAL_VIBE_KEY, accountVibe,
primary) and Studio API key (MISTRAL_API_KEY, accountStudio, fallback) — each with Save and
Test. Saving upserts the account and keeps Vibe before Studio; when Vibe answers 402 or 429 the adapter
fails over to Studio. The key value is never shown again and never logged.
Cache statistics
- The six distribution rows are replaced. The cache card now shows a stacked mix bar of the
per-request hit-rate ranges with a compact counter legend, a sparkline of the last 20 requests (height is
the hit rate, colour is the range, the tooltip shows model and percentage) and a one-line summary such as
18 of 20 requests ≥ 76% · 2 cold starts. The remaining cache figures are unchanged.
v0.6.2
Mistral's 402 budget cap is now a quota condition, so the adapter can fail over to another account.
Fixed
- Mistral's 402
billing_api_budget_exhaustedis classified as QUOTA. It used to fall through to
INVALID_REQUEST, so the adapter neither failed over to the next account nor reported a quota condition.
Covered bytest/error-classification.mjs.
v0.6.1
Packaging fix: the package metadata now names the fork instead of the upstream repository.
Packaging
repository,homepageandbugsnow point at the fork. They still named the upstream
01NGVI-QINGYI/dsh-mistral-pro, so a Git-source install failed the dshopen.org identity check and an
npm publish would have been mapped to the upstream repository. No runtime change.
v0.6.0
The usage pill leaves the composer. A sidebar card now shows the combined consumption of the Vibe and API wallets, and clicking it opens a full statistics panel.
Sidebar usage card and statistics panel
- The composer usage pill is gone. It showed only the Vibe budget, so it read 0% while the API wallet
was being spent. The plugin now adds a card to the sidebar footer (sidebar.footer.action), in the same
slot as Command Code. - One combined figure. The card sums the used amounts and the budgets of both wallets and reports their
ratio, with a two-colour bar: Vibe in--dsw-alias-label-tertiary, API in--dsw-alias-label-primary. - Click opens a statistics panel in the layout's
mainslot: both wallets with reset countdowns,
prepaid credits, month-to-date spend, the combined total, prompt-cache statistics (steady state,
distribution, failovers, last request), configured accounts and the model count. - Settings.
usage.displaynow controls the sidebar card (auto/always/off);
usage.showCachecontrols the cache card in the panel. - Cleanup. Removed the
conversation.input.rightandshell.overlayregistrations, the old popover,
and the now-unused@deepseek-ai/dsh-client-ui-conversationclient inject.