proxitor 0.9.0-beta.5 → 0.9.0-beta.7
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 +17 -11
- package/dist/cli.mjs +7918 -7957
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ openrouterBaseUrl: 'https://custom-service.example.com/api'
|
|
|
140
140
|
# openrouterDataUrl: 'https://openrouter.ai/api'
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
When a fallback occurs, proxitor logs a warning: `Custom API did not return providers, using OpenRouter
|
|
143
|
+
When a fallback occurs, proxitor logs a warning: `Custom API did not return providers, using OpenRouter as fallback`.
|
|
144
144
|
|
|
145
145
|
### Provider routing
|
|
146
146
|
|
|
@@ -258,7 +258,7 @@ By default, OpenRouter doesn't enable prompt caching — every request pays full
|
|
|
258
258
|
|
|
259
259
|
**`cacheControl`** — injects `cache_control: { "type": "ephemeral" }` into the request body. OpenRouter uses this to set cache breakpoints and advance them as conversations grow.
|
|
260
260
|
|
|
261
|
-
**`cacheControlTtl`**
|
|
261
|
+
**`cacheControlTtl`** (`5m` / `1h` / `omit` / `never`, default absent = passthrough) — controls the `ttl` field on injected `cache_control` (Anthropic endpoints only). TTL only has effect when caching is active (`cacheControl` is `auto`/`always`); it is now set independently of the cache mode in the editor.
|
|
262
262
|
|
|
263
263
|
**`sessionId`** — injects `session_id` for provider sticky routing. Without it, OpenRouter only pins to a provider after detecting a cache hit. With it, routing sticks from the **first request** — critical for OpenAI models where delayed caching means 0 cached tokens on the first 1-2 requests.
|
|
264
264
|
|
|
@@ -268,15 +268,19 @@ Both `cacheControl` and `sessionId` support `auto` / `always` / `never` modes:
|
|
|
268
268
|
| --- | --- | --- |
|
|
269
269
|
| `auto` (default) | Anthropic models on `/v1/chat/completions`; all models on `/v1/messages` and `/v1/responses` | Passthrough client session ID if present; otherwise generate proxy UUID |
|
|
270
270
|
| `always` | All models, all endpoints | Always generate proxy session ID, ignoring client-provided |
|
|
271
|
-
| `never` |
|
|
271
|
+
| `never` | Passthrough: leave the client's `cache_control` untouched and inject nothing | Passthrough: leave client session headers untouched |
|
|
272
272
|
|
|
273
273
|
`cacheControlTtl` values:
|
|
274
274
|
|
|
275
275
|
| Value | TTL | Write cost | Use when |
|
|
276
276
|
| --- | --- | --- | --- |
|
|
277
|
-
| _(
|
|
278
|
-
| `5m` | 5 minutes | 1.25× | Explicit short cache |
|
|
277
|
+
| _(absent)_ | Passthrough: preserve client `ttl`, add nothing; per-model absent inherits the global TTL | — | Default |
|
|
278
|
+
| `5m` | 5 minutes (Anthropic default) | 1.25× | Explicit short cache; high-frequency requests (>1 per 5 min) |
|
|
279
279
|
| `1h` | 1 hour | 2.0× | Low-frequency or long-running sessions |
|
|
280
|
+
| `omit` | Strip the `ttl` field, guaranteeing no TTL (even one sent by the client) | — | Force-disable TTL |
|
|
281
|
+
| `never` | Passthrough: preserve the client's `ttl`, add nothing, ignore an inherited value | — | Ignore global TTL without stripping |
|
|
282
|
+
|
|
283
|
+
> **Note:** `null` (previously accepted in model overrides to cancel an inherited TTL) is **removed** — migrate to `never`. `null` was undocumented and unsettable from the UI.
|
|
280
284
|
|
|
281
285
|
```yaml
|
|
282
286
|
cacheControl: auto # safe default — Anthropic and safe endpoints only
|
|
@@ -288,13 +292,13 @@ cacheControlTtl: 1h
|
|
|
288
292
|
# Force caching for all models (may cause 400 on non-Anthropic /v1/chat/completions)
|
|
289
293
|
# cacheControl: always
|
|
290
294
|
|
|
291
|
-
# Per-model overrides — TTL supports '5m', '1h', or '
|
|
295
|
+
# Per-model overrides — TTL supports '5m', '1h', 'omit', or 'never' (passthrough)
|
|
292
296
|
modelOverrides:
|
|
293
297
|
"gpt-*":
|
|
294
298
|
cacheControl: never # OpenAI caches automatically, no injection needed
|
|
295
299
|
sessionId: always # but sticky routing still helps
|
|
296
300
|
"claude-opus-*":
|
|
297
|
-
cacheControlTtl:
|
|
301
|
+
cacheControlTtl: never # passthrough for Opus — ignore the global 1h TTL, use the client ttl
|
|
298
302
|
```
|
|
299
303
|
|
|
300
304
|
**Why all three matter:**
|
|
@@ -386,6 +390,8 @@ proxitor doctor --offline # skip network checks
|
|
|
386
390
|
|
|
387
391
|
When adding or editing a model override, you can also configure per-model `sessionId` and `cacheControl` — useful for models that need different caching or routing behavior than the global default.
|
|
388
392
|
|
|
393
|
+
In `config edit`, any field (provider, session ID, cache control, cache TTL) can be reset to inherit the global/default value via the **Reset / inherit** prompt option. The global `config cache-control` and `config session-routing` commands support the same reset — it reverts the field to the schema default.
|
|
394
|
+
|
|
389
395
|
### Add override walkthrough
|
|
390
396
|
|
|
391
397
|
```sh
|
|
@@ -485,7 +491,7 @@ $ proxitor doctor
|
|
|
485
491
|
│ ✓ port-8828 — 127.0.0.1:8828
|
|
486
492
|
│
|
|
487
493
|
◇ Version
|
|
488
|
-
│ ✓ version — 0.9.0-beta.
|
|
494
|
+
│ ✓ version — 0.9.0-beta.5
|
|
489
495
|
|
|
490
496
|
└ Done. All checks passed.
|
|
491
497
|
```
|
|
@@ -508,7 +514,7 @@ proxitor start # same as above
|
|
|
508
514
|
proxitor up # alias for start
|
|
509
515
|
proxitor run # alias for start
|
|
510
516
|
proxitor --port 9000 # override port
|
|
511
|
-
proxitor ./team.yaml
|
|
517
|
+
proxitor --config ./team.yaml # use an explicit config
|
|
512
518
|
proxitor config show # print the resolved config
|
|
513
519
|
proxitor config show --json # machine-readable config
|
|
514
520
|
proxitor config list --json # overrides as JSON
|
|
@@ -524,8 +530,8 @@ proxitor --version # print version
|
|
|
524
530
|
| Flag | Default | Description |
|
|
525
531
|
|---|---|---|
|
|
526
532
|
| `-p, --port <port>` | `8828` | Server port (validated: 1-65535) |
|
|
527
|
-
|
|
|
528
|
-
| `-c, --config <path>` | auto-discovered | Path to config file
|
|
533
|
+
| `--host <host>` | `0.0.0.0` | Server host |
|
|
534
|
+
| `-c, --config <path>` | auto-discovered | Path to config file |
|
|
529
535
|
| `--openrouter-key <key>` / `-k <key>` | `$OPENROUTER_API_KEY` | OpenRouter API key |
|
|
530
536
|
| `--verbose` | `false` | Enable verbose logging |
|
|
531
537
|
| `--no-config` | | Skip config file discovery |
|