proxitor 0.9.1 β 0.10.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 +30 -30
- package/dist/cli.mjs +10703 -12787
- package/dist/cli.mjs.map +1 -1
- package/package.json +3 -5
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# proxitor
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>
|
|
5
|
-
|
|
4
|
+
<strong>Transparent proxy for AI CLI tools.</strong><br/>
|
|
5
|
+
Pin providers. Keep prompt caching alive. Cut costs.<br/>
|
|
6
6
|
Your tools don't even notice.
|
|
7
7
|
</p>
|
|
8
8
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<a href="https://www.npmjs.com/package/proxitor"><img src="https://img.shields.io/npm/v/proxitor?color=6366f1&labelColor=1e2327&label=npm" alt="npm version"></a>
|
|
11
11
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?labelColor=1e2327" alt="MIT License"></a>
|
|
12
12
|
<img src="https://img.shields.io/badge/node-%3E%3D22-3b82f6?labelColor=1e2327" alt="Node.js β₯ 22">
|
|
13
|
+
<a href="https://github.com/neiromaster/proxitor/issues"><img src="https://img.shields.io/github/issues/neiromaster/proxitor?color=f59e0b&labelColor=1e2327&label=issues" alt="GitHub issues"></a>
|
|
13
14
|
</p>
|
|
14
15
|
|
|
15
16
|
π **English** Β· [Π ΡΡΡΠΊΠΈΠΉ](./docs/README.ru.md)
|
|
@@ -18,26 +19,28 @@
|
|
|
18
19
|
|
|
19
20
|
---
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
## How it works
|
|
22
23
|
|
|
23
24
|
```
|
|
24
25
|
your AI CLI β proxitor β OpenRouter β the provider you picked
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
Proxitor sits between Claude Code, Codex, or any Anthropic/OpenAI-compatible CLI and [OpenRouter](https://openrouter.ai). One API key, every model β but **you** decide which provider serves each request, and you make prompt caching actually work.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
## The caching problem
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
OpenRouter load-balances across providers, and **prompt caching is provider-scoped**: a cache built on Anthropic doesn't help when the next request lands on DeepInfra. Claude Code sends a big system prompt on every request, so without a pinned provider you pay full price every time.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
Pin `claude-*` to `anthropic`, and that system prompt gets cached after the first hit. Subsequent requests cost a fraction.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
- **Automatic fallbacks** β Anthropic down? Fall back to DeepInfra without touching your tools.
|
|
37
|
-
- **Mixed routing** β `claude-*` on Anthropic, `gpt-*` on Azure, different rules per model.
|
|
38
|
-
- **Privacy** β enforce `dataCollection: deny` or zero-data-retention across everything.
|
|
36
|
+
## Features
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
- π **Stable caching** β pin models to a single provider so prompt caches survive across requests
|
|
39
|
+
- π° **Cost control** β route specific models to cheaper providers when caching isn't the priority
|
|
40
|
+
- π **Automatic fallbacks** β Anthropic down? Fall back to DeepInfra without touching your tools
|
|
41
|
+
- π― **Mixed routing** β `claude-*` on Anthropic, `gpt-*` on Azure, different rules per model
|
|
42
|
+
- π‘οΈ **Privacy** β enforce `dataCollection: deny` or zero-data-retention across everything
|
|
43
|
+
- π **Transparent** β your tools see a normal API; nothing on their side changes
|
|
41
44
|
|
|
42
45
|
## Install
|
|
43
46
|
|
|
@@ -76,26 +79,23 @@ OPENAI_BASE_URL=http://localhost:8828/v1 codex
|
|
|
76
79
|
|
|
77
80
|
That's the whole setup. Requests flow through proxitor; streaming responses pass through untouched.
|
|
78
81
|
|
|
79
|
-
##
|
|
82
|
+
## Configuration
|
|
80
83
|
|
|
81
84
|
The friendly way: an interactive menu β no YAML required.
|
|
82
85
|
|
|
83
86
|
```sh
|
|
84
87
|
proxitor config # open the menu
|
|
85
88
|
proxitor config wizard # (re)run guided setup
|
|
89
|
+
proxitor config browse # explore models + pricing
|
|
86
90
|
```
|
|
87
91
|
|
|
88
92
|
From the menu you can set your API key and connection, pick routing per model (with live provider pricing), tune caching, and add or edit model overrides. It pulls live data from OpenRouter, so you browse real models and providers with up-to-date prices.
|
|
89
93
|
|
|
90
|
-
Prefer to edit a file? The full **[configuration reference](./docs/configuration.md)** covers provider routing, per-model overrides, headers, caching modes, and every option. [`proxitor.config.example.yaml`](./proxitor.config.example.yaml) is a commented template.
|
|
91
|
-
|
|
92
|
-
## Adding a model override
|
|
93
|
-
|
|
94
|
-
Pin a model β or a wildcard like `claude-*` β to specific providers, straight from the menu. It pulls live pricing and latency for every provider of that model.
|
|
95
|
-
|
|
96
94
|
<p align="center"><img src="./docs/assets/proxitor-add.gif" alt="proxitor: add a model override" width="640"></p>
|
|
97
95
|
|
|
98
|
-
|
|
96
|
+
Prefer to edit a file? The full **[configuration reference](./docs/configuration.md)** covers provider routing, per-model overrides, headers, caching modes, and every option. [`proxitor.config.example.yaml`](./proxitor.config.example.yaml) is a commented template.
|
|
97
|
+
|
|
98
|
+
## Diagnostics
|
|
99
99
|
|
|
100
100
|
```sh
|
|
101
101
|
proxitor doctor # checks environment, config, key, network, port, version
|
|
@@ -111,18 +111,18 @@ While proxitor runs, it logs cache usage from upstream so you can see whether ca
|
|
|
111
111
|
|
|
112
112
|
Quick health poke: `curl http://localhost:8828/health`.
|
|
113
113
|
|
|
114
|
-
## Commands
|
|
114
|
+
## Commands
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
proxitor
|
|
119
|
-
proxitor config
|
|
120
|
-
proxitor config
|
|
121
|
-
proxitor
|
|
122
|
-
proxitor
|
|
123
|
-
|
|
116
|
+
| Command | Description |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `proxitor` | Start the proxy (default command) |
|
|
119
|
+
| `proxitor config` | Interactive config menu |
|
|
120
|
+
| `proxitor config wizard` | Guided setup |
|
|
121
|
+
| `proxitor config browse` | Explore models + pricing |
|
|
122
|
+
| `proxitor doctor` | Diagnose everything |
|
|
123
|
+
| `proxitor --help` | Full list of flags |
|
|
124
124
|
|
|
125
|
-
Common flags: `--port`, `--host`, `--config <path>`, `--openrouter-key <key>`.
|
|
125
|
+
Common flags: `--port`, `--host`, `--config <path>`, `--openrouter-key <key>`.
|
|
126
126
|
|
|
127
127
|
## Contributing
|
|
128
128
|
|