@goodandready/dsh-key-rotation 0.5.0 → 0.5.1
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/README.md +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- **Cooldown** — an exhausted key is skipped for `cooldownMs`, then returns.
|
|
13
13
|
- **Dead/revoked key handling** — an auth/invalid key rotates to the next pool key instead of erroring out.
|
|
14
14
|
- **Settings GUI** — a **Settings → Key Rotation** section to manage everything without touching config files:
|
|
15
|
-
- **add a key in one place** — press *Add key*, paste the value, done. The credential name is generated for you (
|
|
15
|
+
- **add a key in one place** — press *Add key*, paste the value, done. The credential name is generated for you (`<PROVIDER>_API_KEY`, then `_2`, `_3`, …) and shown only on hover; the card lists keys as *Key 1*, *Key 2*.
|
|
16
16
|
- **live key status** — per key: in use / ready / cooling down with a countdown / **no such credential**, which is what catches a mistyped name that would otherwise fail silently.
|
|
17
17
|
- **rotation counter** — how many times a provider switched key, on which failure, and how long ago.
|
|
18
18
|
- **key order** — ↑/↓ buttons; the order of keys is the order they are tried.
|
|
@@ -46,10 +46,12 @@ dsh-key-rotation:
|
|
|
46
46
|
switchCodes: [QUOTA, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, EMPTY_RESPONSE, UNKNOWN_MODEL]
|
|
47
47
|
cooldownMs: 60000
|
|
48
48
|
providers:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- provider:
|
|
52
|
-
keys: [
|
|
49
|
+
# `provider` is the id of a provider registered with dsh, as it appears
|
|
50
|
+
# in Settings -> Models. `keys` are CREDENTIAL NAMES, never key values.
|
|
51
|
+
- provider: my-provider
|
|
52
|
+
keys: [MY_PROVIDER_API_KEY, MY_PROVIDER_API_KEY_2, MY_PROVIDER_API_KEY_3]
|
|
53
|
+
- provider: another-provider
|
|
54
|
+
keys: [ANOTHER_PROVIDER_API_KEY, ANOTHER_PROVIDER_API_KEY_2]
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
| Field | Default | Description |
|
|
@@ -60,7 +62,7 @@ dsh-key-rotation:
|
|
|
60
62
|
|
|
61
63
|
### How keys are stored
|
|
62
64
|
|
|
63
|
-
The plugin config only ever references keys by **name** (e.g. `
|
|
65
|
+
The plugin config only ever references keys by **name** (e.g. `MY_PROVIDER_API_KEY`). The values live in the dsh **Credentials** service or `$DSH_HOME/.credentials.yaml` — never in the plugin config.
|
|
64
66
|
|
|
65
67
|
A key typed into the Key Rotation card is written to that same credentials store: the value travels to the host once and is never sent back to the browser. Only its **last 5 characters** are, so two keys can be told apart in the UI. A key supplied by the launching environment is shown as read-only, because overwriting it here would be shadowed anyway.
|
|
66
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-key-rotation",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Per-provider API key rotation for DeepSeek Harness: a key pool per provider, auto-created clone routes, and switching to the next key on quota/rate-limit errors. Includes a Settings section (Key Rotation) to edit the key pools, cooldown and switch codes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|