dsh-keys-manager 0.3.3 → 0.3.5
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 +14 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -1
- package/package.json +13 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to dsh-keys-manager are documented here. Assembled from `.changes/unreleased/` fragments by the release-prep workflow.
|
|
4
4
|
|
|
5
|
+
## [0.3.5] - 2026-11-15
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Both packages move their DSH peer cohort from `^0.2.2-rc.1` to `^0.2.2-rc.3` (harness `dsh-v0.2.2-rc.1` → `dsh-v0.2.2-rc.3`), keeping `@deepseek-ai/cordis` at `~4.1.0` and `@deepseek-ai/schemastery` at `~3.19.0`.
|
|
10
|
+
- `@deepseek-ai/dsh-error` joins the declared peers of both packages, because `dsh-llm@0.2.2-rc.3` moved `HarnessError` into it and now declares it as a peer.
|
|
11
|
+
- Transport errors carrying provider-neutral codes are raised through the rc.3 `LlmError.fromFailure` path; the emitted error codes, messages, causes and provider facts are unchanged, and neither the session format nor the storage format moved.
|
|
12
|
+
|
|
13
|
+
## [0.3.4] - 2026-11-11
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Cool the managed key behind a fallback chain after a quota or rate failure, so the next turn switches to another key instead of reusing the one that just failed.
|
|
18
|
+
|
|
5
19
|
## [0.3.3] - 2026-11-11
|
|
6
20
|
|
|
7
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/dsh-keys-manager)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-keys-manager)
|
|
8
|
-
[](https://www.npmjs.com/package/@deepseek-ai/dsh-llm)
|
|
9
9
|
|
|
10
10
|
**English** | [简体中文](README.zh-CN.md)
|
|
11
11
|
|
package/README.zh-CN.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/dsh-keys-manager)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-keys-manager)
|
|
8
|
-
[](https://www.npmjs.com/package/@deepseek-ai/dsh-llm)
|
|
9
9
|
|
|
10
10
|
[English](README.md) | **简体中文**
|
|
11
11
|
|
package/lib/index.js
CHANGED
|
@@ -9012,6 +9012,7 @@ export class KeysManagerService {
|
|
|
9012
9012
|
if (sessionId === undefined)
|
|
9013
9013
|
return;
|
|
9014
9014
|
const entry = {
|
|
9015
|
+
providerId,
|
|
9015
9016
|
keyId,
|
|
9016
9017
|
usedManagedKey,
|
|
9017
9018
|
at: Date.now(),
|
|
@@ -9092,6 +9093,25 @@ export class KeysManagerService {
|
|
|
9092
9093
|
}
|
|
9093
9094
|
const record = this.store.provider(providerId);
|
|
9094
9095
|
if (record === undefined || this.bindingState(record) === 'mismatch') {
|
|
9096
|
+
// A virtual route (FallbacksChain) has no provider row of its own, so the
|
|
9097
|
+
// payload's provider cannot attribute the failure. The linked attempt
|
|
9098
|
+
// names the real provider that served the inner request: cool that key so
|
|
9099
|
+
// the next turn stops reusing it, and keep the binding as it is. The
|
|
9100
|
+
// delegated action may be a retry, so the branch settles any projection
|
|
9101
|
+
// demotion the cooling queued before it hands the request on.
|
|
9102
|
+
const realProvider = linked?.providerId;
|
|
9103
|
+
if (linked?.usedManagedKey === true &&
|
|
9104
|
+
realProvider !== undefined &&
|
|
9105
|
+
linked.keyId !== undefined &&
|
|
9106
|
+
this.store.settings.autoSwitch &&
|
|
9107
|
+
shouldFailover(payload.failure?.code) &&
|
|
9108
|
+
this.store.provider(realProvider) !== undefined) {
|
|
9109
|
+
this.markFailure(realProvider, linked.keyId, payload.failure);
|
|
9110
|
+
// markFailure may have queued an OAuth projection demotion. A delegated
|
|
9111
|
+
// retry re-derives the projection, so waiting keeps the retry from
|
|
9112
|
+
// serving the grant that just failed — the managed path waits too.
|
|
9113
|
+
await this.settleProjectionDemotion(realProvider);
|
|
9114
|
+
}
|
|
9095
9115
|
dropPin();
|
|
9096
9116
|
return next();
|
|
9097
9117
|
}
|