proxitor 0.9.0-beta.2 → 0.9.0-beta.4
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 +22 -8
- package/dist/cli.mjs +735 -381
- package/dist/cli.mjs.map +1 -1
- package/dist/prompt.mjs +3 -3
- package/dist/prompt.mjs.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -266,9 +266,9 @@ Both `cacheControl` and `sessionId` support `auto` / `always` / `never` modes:
|
|
|
266
266
|
|
|
267
267
|
| Mode | `cacheControl` | `sessionId` |
|
|
268
268
|
| --- | --- | --- |
|
|
269
|
-
| `auto` (default) | Anthropic models on `/v1/chat/completions`; all models on `/v1/messages` and `/v1/responses` |
|
|
270
|
-
| `always` | All models, all endpoints |
|
|
271
|
-
| `never` | Disabled |
|
|
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
|
+
| `always` | All models, all endpoints | Always generate proxy session ID, ignoring client-provided |
|
|
271
|
+
| `never` | Disabled | Don't manage session headers — pass through as-is |
|
|
272
272
|
|
|
273
273
|
`cacheControlTtl` values:
|
|
274
274
|
|
|
@@ -314,16 +314,18 @@ curl http://localhost:8828/health
|
|
|
314
314
|
Proxitor automatically logs cache token usage from upstream responses — both non-streaming JSON and streaming SSE. No configuration needed.
|
|
315
315
|
|
|
316
316
|
```
|
|
317
|
-
[abc123] Cache read: 50000, write: 25000 tokens
|
|
318
|
-
[def456] Cache:
|
|
317
|
+
[abc123] Cache read: 50000, write: 25000 tokens (99.6% hit)
|
|
318
|
+
[def456] Cache read: 1088 tokens (90.0% hit)
|
|
319
|
+
[ghi789] Cache: no cached tokens
|
|
319
320
|
```
|
|
320
321
|
|
|
321
|
-
Supports
|
|
322
|
+
Supports all three provider formats:
|
|
322
323
|
|
|
323
324
|
| Provider format | Fields |
|
|
324
|
-
|
|
325
|
+
| --- | --- |
|
|
325
326
|
| Anthropic | `usage.cache_read_input_tokens` / `usage.cache_creation_input_tokens` |
|
|
326
327
|
| OpenAI / OpenRouter | `usage.prompt_tokens_details.cached_tokens` / `cache_write_tokens` |
|
|
328
|
+
| Responses API | `usage.input_tokens_details.cached_tokens` / `cache_write_tokens` |
|
|
327
329
|
|
|
328
330
|
When both formats are present (e.g., OpenRouter relaying an Anthropic response), Anthropic fields take priority.
|
|
329
331
|
|
|
@@ -331,7 +333,7 @@ When both formats are present (e.g., OpenRouter relaying an Anthropic response),
|
|
|
331
333
|
|
|
332
334
|
## Interactive Config Manager
|
|
333
335
|
|
|
334
|
-
Proxitor includes an interactive CLI for managing
|
|
336
|
+
Proxitor includes an interactive CLI for managing configuration — global settings, model overrides, and diagnostics — without editing YAML by hand.
|
|
335
337
|
|
|
336
338
|
### Setup wizard
|
|
337
339
|
|
|
@@ -354,6 +356,16 @@ After collecting the key, base URL, and auth type, the wizard performs a **best-
|
|
|
354
356
|
|
|
355
357
|
If a config already exists, the wizard shows its location and asks whether to reconfigure. All fields are **pre-filled** with current values — press Enter to keep, or type a new value. Existing `modelOverrides`, `provider`, and other fields are preserved — only the wizard fields are updated.
|
|
356
358
|
|
|
359
|
+
### Config menu
|
|
360
|
+
|
|
361
|
+
`proxitor config` (or `proxitor config menu`) opens an interactive menu that loops until you exit. From there you can manage all settings:
|
|
362
|
+
|
|
363
|
+
- **Show current config** — display the resolved configuration
|
|
364
|
+
- **API key & connection** — change API key, port, listen address, base URL, auth type
|
|
365
|
+
- **Session routing** — set global `sessionId` mode (`auto` / `always` / `never`)
|
|
366
|
+
- **Cache control** — set global `cacheControl` mode and TTL
|
|
367
|
+
- **Model overrides** — add, edit, remove, list, or browse models
|
|
368
|
+
|
|
357
369
|
```sh
|
|
358
370
|
proxitor config menu # interactive menu
|
|
359
371
|
proxitor config add # add a model override
|
|
@@ -372,6 +384,8 @@ proxitor doctor --json # machine-readable diagnostic report
|
|
|
372
384
|
proxitor doctor --offline # skip network checks
|
|
373
385
|
```
|
|
374
386
|
|
|
387
|
+
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
|
+
|
|
375
389
|
### Add override walkthrough
|
|
376
390
|
|
|
377
391
|
```sh
|