cheaplane 0.2.0__tar.gz → 0.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: cheaplane
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Offload grunt work from your subscription LLM to cheap models via MCP — auto-routing, a savings ledger, and billing isolation.
5
5
  Project-URL: Homepage, https://github.com/millennialdreamer/cheaplane
6
6
  Project-URL: Repository, https://github.com/millennialdreamer/cheaplane
@@ -33,12 +33,15 @@ Description-Content-Type: text/markdown
33
33
 
34
34
  > **Keep your premium subscription on the main thread. Offload the grunt work to cheap models — Cheaplane even picks the right one for you. Stop burning premium tokens on boilerplate.**
35
35
 
36
+ [![PyPI](https://img.shields.io/pypi/v/cheaplane)](https://pypi.org/project/cheaplane/)
36
37
  ![License](https://img.shields.io/badge/license-MIT-green)
37
38
  ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
38
39
  ![MCP](https://img.shields.io/badge/MCP-compatible-purple)
39
40
  ![Deps](https://img.shields.io/badge/deps-just%20mcp-lightgrey)
40
41
  ![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen)
41
42
 
43
+ <!-- mcp-name: io.github.millennialdreamer/cheaplane -->
44
+
42
45
  Cheaplane is a tiny single-file MCP server (~250 lines, stdlib + `mcp` only) that gives your main agent — e.g. **Claude Code on a Max subscription** — one extra tool: **`delegate`**. Your agent keeps doing the thinking (planning, architecture, final review) and hands *replaceable grunt work* — boilerplate code, formatting, translation, summarizing long docs — to cheap models behind a local [LiteLLM](https://github.com/BerriAI/litellm) proxy (DeepSeek, Kimi, Qwen, …). Think of it as **a cheap intern for your premium agent** — it churns out the boring parts while you keep thinking.
43
46
 
44
47
  The trick that makes it *safe*: **the delegated calls and your subscription live in physically separate processes and never share credentials.** ([why that matters ⬇️](#billing-isolation-the-whole-point))
@@ -63,7 +66,7 @@ interface User {
63
66
  }
64
67
  ```
65
68
 
66
- <sub>↑ a real call's output — not a mockup, and no model picked by hand. That token cost **~90× less** than your premium model, and your subscription quota never moved.</sub>
69
+ <sub>↑ a real call's output — not a mockup, and no model picked by hand. That token cost **over 15× less** than your premium model, and your subscription quota never moved.</sub>
67
70
 
68
71
  ## The problem
69
72
 
@@ -91,18 +94,18 @@ The popular 2026 move is to swap your *whole* agent onto a cheap model (DeepClau
91
94
 
92
95
  ## How cheap is "cheap"?
93
96
 
94
- The grunt work is the *easy* part — paying premium rates for it is pure waste. Per **million tokens** (public list prices, mid-2026):
97
+ The grunt work is the *easy* part — paying premium rates for it is pure waste. Per **million tokens** (public list prices, November 2026):
95
98
 
96
99
  | Model | Input | Output | Best for |
97
100
  |---|--:|--:|---|
98
- | Claude Opus *(API, for reference)* | $5.00 | **$25.00** | the judgment work you keep |
99
- | DeepSeek V4 Flash | $0.14 | **$0.28** | code / formatting |
100
- | Kimi K2 | $0.60–0.95 | $2.50–4.00 | long docs (very large context) |
101
+ | Claude Opus 5.5 *(API, for reference)* | $4.00 | **$20.00** | the judgment work you keep |
102
+ | DeepSeek V4 Flash | $0.30 *(off-peak $0.15)* | **$1.20** *(off-peak $0.60)* | code / formatting |
103
+ | Kimi K2.x | $0.60–0.95 | $2.50–4.00 | long docs (very large context) — K2 line is being retired; point the `kimi` alias at a newer Kimi model when it goes |
101
104
  | Qwen | $0.05–0.40 | $0.20–1.20 | Chinese copy |
102
105
 
103
- That's an output token costing **~$25 on Opus vs ~$0.28 on DeepSeek — about 90× more for work that doesn't need the smarts.** You're on a *subscription*, so you don't pay that $25 directly — your main thread spends *quota*, not dollars. That's the whole point: every routine task you offload is premium quota you keep for the hard problems. *(Summarizing a 40-page doc on DeepSeek Flash runs ~$0.005 — your quota never even notices.)*
106
+ That's an output token costing **~$20 on Opus vs ~$1.20 on DeepSeek — roughly 17× more at peak (≈33× off-peak) for work that doesn't need the smarts.** You're on a *subscription*, so you don't pay that $20 directly — your main thread spends *quota*, not dollars. That's the whole point: every routine task you offload is premium quota you keep for the hard problems. *(Summarizing a 40-page doc on DeepSeek Flash runs about a cent — your quota never even notices.)*
104
107
 
105
- <sub>Prices are public list rates, mid-2026, and vary by tier/caching — check each provider. The stable takeaway is the order-of-magnitude gap, not an exact dollar saving.</sub>
108
+ <sub>Prices are public list rates as of November 2026 and vary by tier, time of day and caching — check each provider. The stable takeaway is the order-of-magnitude gap, not an exact dollar saving.</sub>
106
109
 
107
110
  ## Billing isolation (the whole point)
108
111
 
@@ -132,6 +135,15 @@ bash setup.sh # deps + register MCP + reminder h
132
135
 
133
136
  <p align="center"><img src="assets/setup.png" alt="bash setup.sh — installs deps, registers the MCP server with Claude Code, installs the reminder hook, and verifies the chain end-to-end" width="760"></p>
134
137
 
138
+ **Prefer a package?** Cheaplane is on PyPI — no clone, no path to hard-code:
139
+
140
+ ```bash
141
+ pip install cheaplane # or: uvx cheaplane / pipx install cheaplane
142
+ claude mcp add delegate cheaplane
143
+ ```
144
+
145
+ You still want the proxy from step 1 below, and the [reminder hook](#make-your-agent-actually-use-it) is worth it — that part needs the repo.
146
+
135
147
  <details>
136
148
  <summary><b>Manual setup / what <code>setup.sh</code> does under the hood</b></summary>
137
149
 
@@ -144,7 +156,7 @@ bash setup.sh # deps + register MCP + reminder h
144
156
  model_list:
145
157
  - model_name: deepseek
146
158
  litellm_params:
147
- model: deepseek/deepseek-chat # swap for any provider/model LiteLLM supports
159
+ model: deepseek/deepseek-v4-flash # swap for any provider/model LiteLLM supports
148
160
  api_key: os.environ/DEEPSEEK_API_KEY
149
161
  ```
150
162
 
@@ -155,14 +167,27 @@ litellm --config litellm.yaml # serves http://localhost:4000
155
167
 
156
168
  That `model_name: deepseek` lines up with Cheaplane's default alias, so it works out of the box. (`deepseek` is a built-in LiteLLM provider — no `api_base` needed; you'd add one only for a custom or self-hosted endpoint.) Already have an OpenAI-compatible endpoint (LiteLLM, OpenRouter, Ollama, vLLM…)? Skip this and just point `DELEGATE_BASE_URL` at it.
157
169
 
158
- **2. Install Cheaplane:**
170
+ **2. Install Cheaplane** — from PyPI, or from a clone if you also want the reminder hook and `probe.py`:
159
171
 
172
+ ```bash
173
+ pip install cheaplane # installs a `cheaplane` command; that's the whole install
174
+ ```
160
175
  ```bash
161
176
  git clone https://github.com/millennialdreamer/cheaplane && cd cheaplane
162
177
  uv sync # or: python -m venv .venv && .venv/bin/pip install mcp
163
178
  ```
164
179
 
165
- **3. Register it with your MCP client** — copy `.mcp.json.example` to `.mcp.json` in the repo root and fix the path (or use `claude mcp add`):
180
+ **3. Register it with your MCP client.** Installed from PyPI — the command is already on your `PATH`:
181
+
182
+ ```json
183
+ {
184
+ "mcpServers": {
185
+ "delegate": { "command": "cheaplane" }
186
+ }
187
+ }
188
+ ```
189
+
190
+ From a clone — copy `.mcp.json.example` to `.mcp.json` in the repo root and fix the path (or use `claude mcp add`):
166
191
 
167
192
  ```json
168
193
  {
@@ -235,9 +260,9 @@ Every delegated call appends one line of **metadata only — never the task cont
235
260
  Cheaplane savings — all time
236
261
  delegated calls : 184
237
262
  tokens offloaded: ~412,300 in / ~365,800 out
238
- premium cost avoided (Opus list): ~$11.21
239
- actually spent (DeepSeek-class) : ~$0.16 (≈70× cheaper, in+out blended)
240
- last 7 days : 31 calls, ~$2.04 avoided
263
+ premium cost avoided (Opus list): ~$8.97
264
+ actually spent (DeepSeek-class) : ~$0.56 (≈16× cheaper, in+out blended)
265
+ last 7 days : 31 calls, ~$1.63 avoided
241
266
  ```
242
267
 
243
268
  Numbers are estimates at public list prices — the real win is the premium **quota** that never left your subscription. The ledger records token counts and model names only; delete the file any time, or set `DELEGATE_NO_LOG=1` to turn logging off entirely.
@@ -6,12 +6,15 @@
6
6
 
7
7
  > **Keep your premium subscription on the main thread. Offload the grunt work to cheap models — Cheaplane even picks the right one for you. Stop burning premium tokens on boilerplate.**
8
8
 
9
+ [![PyPI](https://img.shields.io/pypi/v/cheaplane)](https://pypi.org/project/cheaplane/)
9
10
  ![License](https://img.shields.io/badge/license-MIT-green)
10
11
  ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
11
12
  ![MCP](https://img.shields.io/badge/MCP-compatible-purple)
12
13
  ![Deps](https://img.shields.io/badge/deps-just%20mcp-lightgrey)
13
14
  ![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen)
14
15
 
16
+ <!-- mcp-name: io.github.millennialdreamer/cheaplane -->
17
+
15
18
  Cheaplane is a tiny single-file MCP server (~250 lines, stdlib + `mcp` only) that gives your main agent — e.g. **Claude Code on a Max subscription** — one extra tool: **`delegate`**. Your agent keeps doing the thinking (planning, architecture, final review) and hands *replaceable grunt work* — boilerplate code, formatting, translation, summarizing long docs — to cheap models behind a local [LiteLLM](https://github.com/BerriAI/litellm) proxy (DeepSeek, Kimi, Qwen, …). Think of it as **a cheap intern for your premium agent** — it churns out the boring parts while you keep thinking.
16
19
 
17
20
  The trick that makes it *safe*: **the delegated calls and your subscription live in physically separate processes and never share credentials.** ([why that matters ⬇️](#billing-isolation-the-whole-point))
@@ -36,7 +39,7 @@ interface User {
36
39
  }
37
40
  ```
38
41
 
39
- <sub>↑ a real call's output — not a mockup, and no model picked by hand. That token cost **~90× less** than your premium model, and your subscription quota never moved.</sub>
42
+ <sub>↑ a real call's output — not a mockup, and no model picked by hand. That token cost **over 15× less** than your premium model, and your subscription quota never moved.</sub>
40
43
 
41
44
  ## The problem
42
45
 
@@ -64,18 +67,18 @@ The popular 2026 move is to swap your *whole* agent onto a cheap model (DeepClau
64
67
 
65
68
  ## How cheap is "cheap"?
66
69
 
67
- The grunt work is the *easy* part — paying premium rates for it is pure waste. Per **million tokens** (public list prices, mid-2026):
70
+ The grunt work is the *easy* part — paying premium rates for it is pure waste. Per **million tokens** (public list prices, November 2026):
68
71
 
69
72
  | Model | Input | Output | Best for |
70
73
  |---|--:|--:|---|
71
- | Claude Opus *(API, for reference)* | $5.00 | **$25.00** | the judgment work you keep |
72
- | DeepSeek V4 Flash | $0.14 | **$0.28** | code / formatting |
73
- | Kimi K2 | $0.60–0.95 | $2.50–4.00 | long docs (very large context) |
74
+ | Claude Opus 5.5 *(API, for reference)* | $4.00 | **$20.00** | the judgment work you keep |
75
+ | DeepSeek V4 Flash | $0.30 *(off-peak $0.15)* | **$1.20** *(off-peak $0.60)* | code / formatting |
76
+ | Kimi K2.x | $0.60–0.95 | $2.50–4.00 | long docs (very large context) — K2 line is being retired; point the `kimi` alias at a newer Kimi model when it goes |
74
77
  | Qwen | $0.05–0.40 | $0.20–1.20 | Chinese copy |
75
78
 
76
- That's an output token costing **~$25 on Opus vs ~$0.28 on DeepSeek — about 90× more for work that doesn't need the smarts.** You're on a *subscription*, so you don't pay that $25 directly — your main thread spends *quota*, not dollars. That's the whole point: every routine task you offload is premium quota you keep for the hard problems. *(Summarizing a 40-page doc on DeepSeek Flash runs ~$0.005 — your quota never even notices.)*
79
+ That's an output token costing **~$20 on Opus vs ~$1.20 on DeepSeek — roughly 17× more at peak (≈33× off-peak) for work that doesn't need the smarts.** You're on a *subscription*, so you don't pay that $20 directly — your main thread spends *quota*, not dollars. That's the whole point: every routine task you offload is premium quota you keep for the hard problems. *(Summarizing a 40-page doc on DeepSeek Flash runs about a cent — your quota never even notices.)*
77
80
 
78
- <sub>Prices are public list rates, mid-2026, and vary by tier/caching — check each provider. The stable takeaway is the order-of-magnitude gap, not an exact dollar saving.</sub>
81
+ <sub>Prices are public list rates as of November 2026 and vary by tier, time of day and caching — check each provider. The stable takeaway is the order-of-magnitude gap, not an exact dollar saving.</sub>
79
82
 
80
83
  ## Billing isolation (the whole point)
81
84
 
@@ -105,6 +108,15 @@ bash setup.sh # deps + register MCP + reminder h
105
108
 
106
109
  <p align="center"><img src="assets/setup.png" alt="bash setup.sh — installs deps, registers the MCP server with Claude Code, installs the reminder hook, and verifies the chain end-to-end" width="760"></p>
107
110
 
111
+ **Prefer a package?** Cheaplane is on PyPI — no clone, no path to hard-code:
112
+
113
+ ```bash
114
+ pip install cheaplane # or: uvx cheaplane / pipx install cheaplane
115
+ claude mcp add delegate cheaplane
116
+ ```
117
+
118
+ You still want the proxy from step 1 below, and the [reminder hook](#make-your-agent-actually-use-it) is worth it — that part needs the repo.
119
+
108
120
  <details>
109
121
  <summary><b>Manual setup / what <code>setup.sh</code> does under the hood</b></summary>
110
122
 
@@ -117,7 +129,7 @@ bash setup.sh # deps + register MCP + reminder h
117
129
  model_list:
118
130
  - model_name: deepseek
119
131
  litellm_params:
120
- model: deepseek/deepseek-chat # swap for any provider/model LiteLLM supports
132
+ model: deepseek/deepseek-v4-flash # swap for any provider/model LiteLLM supports
121
133
  api_key: os.environ/DEEPSEEK_API_KEY
122
134
  ```
123
135
 
@@ -128,14 +140,27 @@ litellm --config litellm.yaml # serves http://localhost:4000
128
140
 
129
141
  That `model_name: deepseek` lines up with Cheaplane's default alias, so it works out of the box. (`deepseek` is a built-in LiteLLM provider — no `api_base` needed; you'd add one only for a custom or self-hosted endpoint.) Already have an OpenAI-compatible endpoint (LiteLLM, OpenRouter, Ollama, vLLM…)? Skip this and just point `DELEGATE_BASE_URL` at it.
130
142
 
131
- **2. Install Cheaplane:**
143
+ **2. Install Cheaplane** — from PyPI, or from a clone if you also want the reminder hook and `probe.py`:
132
144
 
145
+ ```bash
146
+ pip install cheaplane # installs a `cheaplane` command; that's the whole install
147
+ ```
133
148
  ```bash
134
149
  git clone https://github.com/millennialdreamer/cheaplane && cd cheaplane
135
150
  uv sync # or: python -m venv .venv && .venv/bin/pip install mcp
136
151
  ```
137
152
 
138
- **3. Register it with your MCP client** — copy `.mcp.json.example` to `.mcp.json` in the repo root and fix the path (or use `claude mcp add`):
153
+ **3. Register it with your MCP client.** Installed from PyPI — the command is already on your `PATH`:
154
+
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "delegate": { "command": "cheaplane" }
159
+ }
160
+ }
161
+ ```
162
+
163
+ From a clone — copy `.mcp.json.example` to `.mcp.json` in the repo root and fix the path (or use `claude mcp add`):
139
164
 
140
165
  ```json
141
166
  {
@@ -208,9 +233,9 @@ Every delegated call appends one line of **metadata only — never the task cont
208
233
  Cheaplane savings — all time
209
234
  delegated calls : 184
210
235
  tokens offloaded: ~412,300 in / ~365,800 out
211
- premium cost avoided (Opus list): ~$11.21
212
- actually spent (DeepSeek-class) : ~$0.16 (≈70× cheaper, in+out blended)
213
- last 7 days : 31 calls, ~$2.04 avoided
236
+ premium cost avoided (Opus list): ~$8.97
237
+ actually spent (DeepSeek-class) : ~$0.56 (≈16× cheaper, in+out blended)
238
+ last 7 days : 31 calls, ~$1.63 avoided
214
239
  ```
215
240
 
216
241
  Numbers are estimates at public list prices — the real win is the premium **quota** that never left your subscription. The ledger records token counts and model names only; delete the file any time, or set `DELEGATE_NO_LOG=1` to turn logging off entirely.
@@ -5,7 +5,7 @@
5
5
  model_list:
6
6
  - model_name: deepseek
7
7
  litellm_params:
8
- model: deepseek/deepseek-chat # V4 Flash alias (deprecates 2026-07-24); or any provider/model LiteLLM supports
8
+ model: deepseek/deepseek-v4-flash # DeepSeek retired deepseek-chat on 2026-07-24; or any provider/model LiteLLM supports
9
9
  api_key: os.environ/DEEPSEEK_API_KEY
10
10
 
11
11
  # Add more cheap models the same way, then point Cheaplane's aliases at them via the
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cheaplane"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Offload grunt work from your subscription LLM to cheap models via MCP — auto-routing, a savings ledger, and billing isolation."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -44,9 +44,9 @@ TIMEOUT = int(os.environ.get("DELEGATE_TIMEOUT", "120")) # per-call timeout (
44
44
  NO_LOG = os.environ.get("DELEGATE_NO_LOG") == "1"
45
45
  LOG_PATH = os.path.expanduser(os.environ.get("DELEGATE_LOG", "~/.cheaplane/usage.jsonl"))
46
46
 
47
- # Public list prices per 1M tokens (mid-2026) — used ONLY for the savings estimate.
48
- PREMIUM_IN, PREMIUM_OUT = 5.00, 25.00 # Claude Opus API, for reference
49
- CHEAP_IN, CHEAP_OUT = 0.14, 0.28 # DeepSeek-class
47
+ # Public list prices per 1M tokens (November 2026) — used ONLY for the savings estimate.
48
+ PREMIUM_IN, PREMIUM_OUT = 4.00, 20.00 # Claude Opus 5.5 API, for reference
49
+ CHEAP_IN, CHEAP_OUT = 0.30, 1.20 # DeepSeek V4 Flash, peak rate (conservative)
50
50
 
51
51
  # Friendly aliases -> the model_name your proxy exposes for each cheap model.
52
52
  # Defaults are the alias names themselves; remap without touching code via the
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes