@certalis/agent-smith 0.1.18 → 0.1.19
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 +14 -8
- package/dist/bin.js +1060 -144
- package/dist/claude-companion/.claude-plugin/plugin.json +8 -0
- package/dist/claude-companion/hooks/hooks.json +4 -0
- package/dist/claude-companion/hooks/provider-choice.js +320 -0
- package/dist/claude-companion/hooks/register.js +74 -0
- package/dist/client-launcher.js +70 -11
- package/dist/edge.js +13 -2
- package/dist/https.js +13 -2
- package/dist/pool.js +985 -114
- package/dist/post-processor.worker.js +148 -1
- package/dist/server.js +985 -114
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
Claude Code and Codex keep talking their own protocol. agent-smith sits between
|
|
19
19
|
them and the provider: it chooses a provider from the pool you configure, then
|
|
20
20
|
an account inside that provider, watches the quota each provider reports, and
|
|
21
|
-
|
|
21
|
+
may try another account from that same provider. It never silently moves a
|
|
22
|
+
request to another provider.
|
|
22
23
|
|
|
23
24
|
## How it works
|
|
24
25
|
|
|
@@ -96,7 +97,9 @@ key; provider tokens and the single database stay on the server.
|
|
|
96
97
|
Device keys allow independent revocation and cannot read management data. A
|
|
97
98
|
server-side policy may give a registered device name a lower weekly seat ceiling
|
|
98
99
|
than the default; this filters account eligibility only and does not create a
|
|
99
|
-
per-client budget or usage meter.
|
|
100
|
+
per-client budget or usage meter. The owner can also grant a named unattended
|
|
101
|
+
device forward-only provider fallback; every other caller still stays on its
|
|
102
|
+
selected provider.
|
|
100
103
|
|
|
101
104
|
Seat owners join through the server's optional `/pool-enroll` page, not its
|
|
102
105
|
proxy homepage. Allow individual addresses or an exact domain (`*@example.test`)
|
|
@@ -209,10 +212,12 @@ Each example is a complete config file, also in [`examples/config/`](examples/co
|
|
|
209
212
|
}
|
|
210
213
|
```
|
|
211
214
|
|
|
212
|
-
**An Anthropic-compatible
|
|
215
|
+
**An Anthropic-compatible provider choice**
|
|
213
216
|
([`compatible-endpoint-fallback.json`](examples/config/compatible-endpoint-fallback.json)).
|
|
214
|
-
Requests go to Anthropic first.
|
|
215
|
-
|
|
217
|
+
Requests go to Anthropic first. A wrapped Claude Code session can choose `acme`
|
|
218
|
+
after Anthropic reports a capacity block; that choice sends Sonnet as
|
|
219
|
+
`acme-large`. Unattended callers receive Anthropic's capacity response and are
|
|
220
|
+
never moved to `acme` automatically. `acme` serves no other model.
|
|
216
221
|
|
|
217
222
|
```json
|
|
218
223
|
{
|
|
@@ -265,9 +270,10 @@ share that organisation's limits, so adding them adds no capacity.
|
|
|
265
270
|
|
|
266
271
|
- **Inside a provider**, an account at its quota threshold is skipped. A
|
|
267
272
|
server error before any output may take one hop to another eligible account.
|
|
268
|
-
- **Across providers**,
|
|
269
|
-
|
|
270
|
-
|
|
273
|
+
- **Across providers**, an ordinary request never moves automatically. A person
|
|
274
|
+
in a wrapped Claude Code session must choose a provider, or a named unattended
|
|
275
|
+
device must have the private ordered-fallback policy. A change loses the
|
|
276
|
+
prompt cache and can change model behaviour and cost.
|
|
271
277
|
- A per-minute rate limit never moves a request to another provider, and
|
|
272
278
|
nothing moves once output has started reaching the client.
|
|
273
279
|
- A conversation stays on its account while that account is eligible. Moving
|