pi-free 2.0.0 → 2.0.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 CHANGED
@@ -1,416 +1,393 @@
1
- # pi-free-providers
2
-
3
- Free AI model providers for [Pi](https://pi.dev). Access **free models** from multiple providers in one install.
4
-
5
- ---
6
-
7
- ## What does pi-free do
8
-
9
- **pi-free is a Pi extension that unlocks free AI models from 9 providers — and adds 2 paid providers for convenience.**
10
-
11
- When you install pi-free, it:
12
-
13
- 1. **Registers 10+ AI providers** with Pi's model picker — 9 unique free-tier providers plus dynamic providers for Pi's built-in services when API keys are configured
14
-
15
- 2. **Filters to show only free models by default** You see only the models that cost $0 to use, no API key required for some providers. Paid-only providers are hidden until you explicitly enable them.
16
-
17
- 3. **Provides a toggle command** — Run `/{provider}-toggle` (e.g., `/zen-toggle`, `/kilo-toggle`) to switch between free-only mode and showing all models including paid ones
18
-
19
- 4. **Handles authentication for you** — OAuth flows (Kilo, Cline) open your browser automatically; API keys are read from `~/.pi/free.json` or environment variables
20
-
21
- 5. **Adds Coding Index scores** — Model names include a coding benchmark score (CI: 45.2) to help you pick capable coding models at a glance
22
-
23
- 6. **Persists your preferences** — Your toggle choices (free vs all models) are saved to `~/.pi/free.json` and remembered across Pi restarts
24
-
25
- ---
26
-
27
- ## How to use
28
-
29
- ### 1. Install the extension
30
-
31
- ```bash
32
- pi install git:github.com/apmantza/pi-free
33
- ```
34
-
35
- ### 2. Open the model picker
36
-
37
- Start Pi and press `Ctrl+L` to open the model picker.
38
-
39
- Free models are shown by default look for the provider prefixes:
40
-
41
- **✅ Offers Free Models (no usage limits, no payment required):**
42
- - `zen/` — OpenCode Zen models (no setup required)
43
- - `kilo/` Kilo models (free models available immediately, more after `/login kilo`)
44
- - `openrouter/` — OpenRouter models (free account required)
45
- - `cline/` — Cline models (run `/login cline` to use)
46
-
47
- **🔄 Freemium (free tier with limits, then paid):**
48
- - `nvidia/` — NVIDIA NIM models (1,000 free requests/month, then credits)
49
- - `cloudflare/` — Cloudflare Workers AI (10K Neurons/day free tier, then $0.011/1K Neurons)
50
- - `modal/` — GLM-5.1 FP8 via Modal (free promotional period until April 30, 2026)
51
- - `ollama/` — Ollama Cloud models (usage-based free tier, resets every 5 hours + 7 days)
52
-
53
- **🔧 Dynamic API Providers (free models when API key configured):**
54
- - `mistral/` — Mistral models (free models via API when `MISTRAL_API_KEY` set)
55
- - `groq/` Groq models (free models via API when `GROQ_API_KEY` set)
56
- - `cerebras/` — Cerebras models (free models via API when `CEREBRAS_API_KEY` set)
57
-
58
- **💳 Paid Only (no free tier):**
59
- - `go/` — OpenCode Go models (requires subscription — $5 first month, then $10/month)
60
-
61
- **Note:** Fireworks is now a [built-in Pi provider](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#0681---2026-04-22) — no extension needed. Set `FIREWORKS_API_KEY` to use it directly.
62
-
63
- ### 3. Toggle between free and paid models
64
-
65
- Want to see paid models too? Run the toggle command for your provider:
66
-
67
- ```
68
- /zen-toggle # Toggle Zen (✅ offers free models)
69
- /kilo-toggle # Toggle Kilo (✅ offers free models)
70
- /openrouter-toggle # Toggle OpenRouter (✅ offers free models)
71
- /cline-toggle # Toggle Cline (✅ offers free models)
72
- /mistral-toggle # Toggle Mistral (🔧 dynamic - needs API key)
73
- /groq-toggle # Toggle Groq (🔧 dynamic - needs API key)
74
- /cerebras-toggle # Toggle Cerebras (🔧 dynamic - needs API key)
75
- ```
76
-
77
- **Notes:**
78
- - **Toggle commands are mainly for Offers Free Models providers** — to switch between "free models only" vs "show paid models too"
79
- - **🔄 Freemium providers** (NVIDIA, Cloudflare, Ollama, Modal) show all models by default — you manage your usage limits via their dashboards
80
- - **💳 Paid-only providers** (Go) have no toggle since all models require payment
81
-
82
- You'll see a notification like: `zen: showing free models` or `zen: showing all models (including paid)`
83
-
84
- ### 4. Add API keys for more providers (optional)
85
-
86
- Some providers require a free account or API key.
87
-
88
- **The first time you run Pi after installing this extension, a config file is automatically created:**
89
- - **Linux/Mac:** `~/.pi/free.json`
90
- - **Windows:** `%USERPROFILE%\.pi\free.json`
91
-
92
- Add your API keys to this file:
93
-
94
- ```json
95
- {
96
- "openrouter_api_key": "sk-or-v1-...",
97
- "nvidia_api_key": "nvapi-...",
98
- "cloudflare_api_token": "...",
99
- "ollama_api_key": "...",
100
- "mistral_api_key": "...",
101
- "modal_api_key": "sk-modal-..."
102
- }
103
- ```
104
-
105
- **Note:** Fireworks is now a [built-in Pi provider](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#0681---2026-04-22) — no extension needed. Set `FIREWORKS_API_KEY` to use it directly.
106
-
107
- Or set environment variables instead (same names, uppercase: `OPENROUTER_API_KEY`, `NVIDIA_API_KEY`, etc.)
108
-
109
- See the [Providers That Need Authentication](#providers-that-need-authentication) section below for detailed setup instructions per provider.
110
-
111
- ### 5. Quick commands reference
112
-
113
- | Command | What it does |
114
- |---------|-------------|
115
- | `/{provider}-toggle` | Switch between free-only and all models for that provider |
116
- | `/login kilo` | Start OAuth flow for Kilo |
117
- | `/login cline` | Start OAuth flow for Cline |
118
- | `/logout kilo` | Clear Kilo OAuth credentials |
119
- | `/logout cline` | Clear Cline OAuth credentials |
120
-
121
- ---
122
-
123
- ## Using Free Models (No Setup Required)
124
-
125
- ### OpenCode Zen — Easiest Start
126
-
127
- Works immediately with zero setup:
128
-
129
- 1. Press `Ctrl+L`
130
- 2. Search for `zen/`
131
- 3. Pick any model (e.g., `zen/mimo-v2-omni-free`)
132
- 4. Start chatting
133
-
134
- No account, no API key, no OAuth.
135
-
136
- ### Ollama Cloud
137
-
138
- Get an API key from [ollama.com/settings/keys](https://ollama.com/settings/keys), then:
139
-
140
- **Option A: Environment variable**
141
- ```bash
142
- export OLLAMA_API_KEY="..."
143
- export OLLAMA_SHOW_PAID=true
144
- ```
145
-
146
- **Option B: Config file** (`~/.pi/free.json`)
147
- ```json
148
- {
149
- "ollama_api_key": "YOUR_KEY",
150
- "ollama_show_paid": true
151
- }
152
- ```
153
-
154
- **Note:** Ollama requires `OLLAMA_SHOW_PAID=true` because they have usage limits on their cloud API.
155
-
156
- Free tier resets every 5 hours + 7 days.
157
-
158
- ---
159
-
160
- ## Providers That Need Authentication
161
-
162
- Some providers require free accounts or OAuth to access their free tiers. **Go is a paid-only provider — it has no free tier.**
163
-
164
- ---
165
-
166
- ### 🆓 Free Providers
167
-
168
- ### Kilo (free models, more after login)
169
-
170
- Kilo shows free models immediately. To unlock all models, authenticate with Kilo's free OAuth:
171
-
172
- ```
173
- /login kilo
174
- ```
175
-
176
- This command will:
177
- 1. Open your browser to Kilo's authorization page
178
- 2. Show a device code in Pi's UI
179
- 3. Wait for you to authorize in the browser
180
- 4. Automatically complete login once approved
181
-
182
- - No credit card required
183
- - Free tier: 200 requests/hour
184
- - After login, run `/kilo-toggle` to switch between free-only and all models
185
-
186
- ### OpenRouter (free models available)
187
-
188
- Get a free API key at [openrouter.ai/keys](https://openrouter.ai/keys), then either:
189
-
190
- **Option A: Environment variable**
191
- ```bash
192
- export OPENROUTER_API_KEY="sk-or-v1-..."
193
- ```
194
-
195
- **Option B: Config file** (`~/.pi/free.json`)
196
- ```json
197
- {
198
- "openrouter_api_key": "sk-or-v1-..."
199
- }
200
- ```
201
-
202
- Then in Pi:
203
- ```
204
- /openrouter-all # Show all models (free + paid)
205
- ```
206
-
207
- ### NVIDIA NIM (Free Credits System)
208
-
209
- NVIDIA provides **free monthly credits** (1000 requests/month) at [build.nvidia.com](https://build.nvidia.com).
210
-
211
- **Important:** Models have different "costs" per token:
212
- - **Zero-cost models**: Don't consume your credit balance (shown by default)
213
- - **Credit-costing models**: Consume credits faster (hidden by default)
214
-
215
- Get your API key and optionally enable all models:
216
-
217
- **Option A: Show only free models (default)**
218
- ```bash
219
- export NVIDIA_API_KEY="nvapi-..."
220
- ```
221
- Uses only zero-cost models → your 1000 credits last the full month
222
-
223
- **Option B: Show all models (uses credits faster)**
224
- ```bash
225
- export NVIDIA_API_KEY="nvapi-..."
226
- export NVIDIA_SHOW_PAID=true
227
- ```
228
-
229
- Or in `~/.pi/free.json`:
230
- ```json
231
- {
232
- "nvidia_api_key": "nvapi-...",
233
- "nvidia_show_paid": true
234
- }
235
- ```
236
-
237
- Toggle anytime with `/nvidia-toggle`
238
-
239
- ### Cloudflare Workers AI (10K Neurons/day Free Tier)
240
-
241
- Cloudflare provides **50+ open-source AI models** with a generous free tier:
242
- - **10,000 Neurons per day FREE** (resets daily at 00:00 UTC)
243
- - **$0.011 per 1,000 Neurons** beyond the free allocation
244
-
245
- Get your API token at [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens):
246
- 1. Create a token with "Cloudflare AI" → "Read" permission
247
- 2. Or use "My Account" → "Read" for broader access
248
-
249
- **Setup:**
250
- ```bash
251
- export CLOUDFLARE_API_TOKEN="your_token_here"
252
- ```
253
-
254
- The account ID is automatically derived from your token. Optionally, you can also set:
255
- ```bash
256
- export CLOUDFLARE_ACCOUNT_ID="your_account_id" # Optional
257
- ```
258
-
259
- **Models available:** Llama 4, Mistral Small 3.1, DeepSeek R1, Gemma 4, Kimi K2.5/2.6, and more.
260
-
261
- Toggle with `/cloudflare-toggle`
262
-
263
- ### Cline (free account)
264
-
265
- Cline models appear immediately in the model picker. To use them, authenticate with Cline's free account:
266
-
267
- ```
268
- /login cline
269
- ```
270
-
271
- This command will:
272
- 1. Open your browser to Cline's sign-in page
273
- 2. Wait for you to complete sign-in
274
- 3. Automatically complete login once approved
275
-
276
- - Free account required (no credit card)
277
- - Uses local ports 48801-48811 for OAuth callback
278
-
279
- ### Modal (GLM-5.1 FP8 — free promotional period until April 30, 2026)
280
-
281
- Modal hosts GLM-5.1 FP8 with a free promotional period. Get an API key at [modal.com](https://modal.com), then:
282
-
283
- **Option A: Environment variable**
284
- ```bash
285
- export MODAL_API_KEY="sk-modal-..."
286
- ```
287
-
288
- **Option B: Config file** (`~/.pi/free.json`)
289
- ```json
290
- {
291
- "modal_api_key": "sk-modal-..."
292
- }
293
- ```
294
-
295
- Then select a `modal/` model in the model picker.
296
-
297
- **Details:**
298
- - Free promotional period until April 30, 2026
299
- - Model: GLM-5.1 FP8 (128k context, 16k max output)
300
- - No credit card required during the promotional period
301
-
302
- ### Mistral (free API key)
303
-
304
- Add API key to `~/.pi/free.json` or environment variables:
305
-
306
- ```bash
307
- export MISTRAL_API_KEY="..."
308
- ```
309
-
310
- ---
311
-
312
- ### 💳 Paid-Only Providers
313
-
314
- > **⚠️ These providers have no free tier. All usage incurs costs.**
315
-
316
- ### OpenCode Go (subscription — $5 first month, then $10/month)
317
-
318
- Go provides access to curated open coding models via a monthly subscription. There is no free tier.
319
-
320
- Set `OPENCODE_GO_API_KEY` (or `opencode_go_api_key` in `~/.pi/free.json`) and `GO_SHOW_PAID=true` to enable.
321
-
322
- **Models available:**
323
- - GLM-5
324
- - Kimi K2.5
325
- - MiMo-V2-Pro
326
- - MiMo-V2-Omni
327
- - MiniMax M2.7
328
- - MiniMax M2.5
329
-
330
- **Pricing:** $5 first month, then $10/month. See [opencode.ai/docs/go](https://opencode.ai/docs/go).
331
-
332
- Toggle with `/go-toggle`.
333
-
334
- ---
335
-
336
- ## Slash Commands
337
-
338
- Each provider has toggle commands to switch between free and all models:
339
-
340
- | Command | Action |
341
- |---------|--------|
342
- | `/zen-toggle` | Toggle between free/all Zen models |
343
- | `/kilo-toggle` | Toggle between free/all Kilo models |
344
- | `/openrouter-toggle` | Toggle between free/all OpenRouter models |
345
- | `/cline-toggle` | Toggle between free/all Cline models (✅ offers free models) |
346
- | `/mistral-toggle` | Toggle between free/all Mistral models (🔧 dynamic) |
347
- | `/groq-toggle` | Toggle between free/all Groq models (🔧 dynamic) |
348
- | `/cerebras-toggle` | Toggle between free/all Cerebras models (🔧 dynamic) |
349
-
350
- **The toggle command:**
351
- - **For ✅ Offers Free Models providers**: Switches between showing only free models vs. all available models (including paid)
352
- - **For 🔧 Dynamic API providers**: Filters the model list when you have an API key configured
353
- - **Persists your preference** to `~/.pi/free.json` for next startup
354
- - Shows a notification: "zen: showing free models" or "zen: showing all models (including paid)"
355
-
356
- **Note:** 🔄 Freemium providers (NVIDIA, Cloudflare, Ollama Cloud, Modal) don't have toggle commands — they show all models and you manage usage via their dashboards. 💳 Paid-only providers (Go) also have no toggle since all models require payment.
357
-
358
- ---
359
-
360
- ## Configuration
361
-
362
- Create `~/.pi/free.json` in your home directory:
363
-
364
- ```json
365
- {
366
- "openrouter_api_key": "YOUR_OPENROUTER_KEY",
367
- "nvidia_api_key": "YOUR_NVIDIA_KEY",
368
- "mistral_api_key": "YOUR_MISTRAL_KEY",
369
- "opencode_api_key": "YOUR_ZEN_KEY",
370
- "opencode_go_api_key": "YOUR_GO_KEY",
371
- "ollama_api_key": "YOUR_OLLAMA_KEY",
372
- "ollama_show_paid": true,
373
- "modal_api_key": "YOUR_MODAL_KEY",
374
- "hidden_models": ["model-id-to-hide"]
375
- }
376
- ```
377
-
378
- Or use environment variables (same names, uppercase):
379
-
380
- ```bash
381
- export OPENROUTER_API_KEY="..."
382
- export NVIDIA_API_KEY="..."
383
- ```
384
-
385
- ---
386
-
387
- ## Logging & Debugging
388
-
389
- pi-free now writes extension logs to:
390
-
391
- - **Windows:** `%USERPROFILE%\.pi\free.log`
392
- - **Linux/macOS:** `~/.pi/free.log`
393
-
394
- Useful env vars:
395
-
396
- ```bash
397
- # Console log verbosity (default: error)
398
- LOG_LEVEL=debug
399
-
400
- # File log verbosity (default: debug)
401
- PI_FREE_LOG_LEVEL=debug
402
-
403
- # Custom log path (optional)
404
- PI_FREE_LOG_PATH=/tmp/pi-free.log
405
-
406
- # Disable file logging
407
- PI_FREE_FILE_LOG=false
408
- ```
409
-
410
- ---
411
-
412
- ## License
413
-
414
- MIT — See [LICENSE](LICENSE)
415
-
416
- **Questions?** [Open an issue](https://github.com/apmantza/pi-free/issues)
1
+ # pi-free-providers
2
+
3
+ Free AI model providers for [Pi](https://pi.dev). Access **free models** from multiple providers in one install.
4
+
5
+ ---
6
+
7
+ ## What does pi-free do
8
+
9
+ **pi-free is a Pi extension that unlocks free AI models from multiple providers.**
10
+
11
+ When you install pi-free, it:
12
+
13
+ 1. **Registers free-tier providers** with Pi's model picker — Kilo, Cline, NVIDIA, Cloudflare, Modal, Ollama Cloud, and more
14
+
15
+ 2. **Fetches models dynamically** for Pi's built-in providers when API keys are configured Mistral, Groq, Cerebras, xAI, Hugging Face, OpenRouter
16
+
17
+ 3. **Filters to show only free models by default** for providers that expose pricing You see only the models that cost $0 to use. Paid models are hidden until you explicitly toggle them on.
18
+
19
+ 4. **Provides per-provider toggle commands** — Run `/toggle-{provider}` (e.g., `/toggle-kilo`, `/toggle-opencode`) to switch between free-only mode and showing all models including paid ones
20
+
21
+ 5. **Handles authentication for you** — OAuth flows (Kilo, Cline) open your browser automatically; API keys are read from `~/.pi/free.json` or environment variables
22
+
23
+ 6. **Adds Coding Index scores** — Model names include a coding benchmark score (CI: 45.2) to help you pick capable coding models at a glance
24
+
25
+ 7. **Persists your preferences** — Your toggle choices (free vs all models) are saved to `~/.pi/free.json` and remembered across Pi restarts
26
+
27
+ ---
28
+
29
+ ## How to use
30
+
31
+ ### 1. Install the extension
32
+
33
+ ```bash
34
+ pi install git:github.com/apmantza/pi-free
35
+ ```
36
+
37
+ ### 2. Open the model picker
38
+
39
+ Start Pi and press `Ctrl+L` to open the model picker.
40
+
41
+ Free models are shown by default look for the provider prefixes:
42
+
43
+ **✅ Offers Free Models (no usage limits, no payment required):**
44
+ - `opencode/` — OpenCode models (no setup required; toggle with `/toggle-opencode`)
45
+ - `kilo/` — Kilo models (free models available immediately, more after `/login kilo`)
46
+ - `openrouter/` — OpenRouter models (free account required)
47
+ - `cline/` — Cline models (run `/login cline` to use)
48
+
49
+ **🔄 Freemium (free tier with limits, then paid):**
50
+ - `nvidia/` — NVIDIA NIM models (1,000 free requests/month, then credits)
51
+ - `cloudflare/` — Cloudflare Workers AI (10K Neurons/day free tier, then $0.011/1K Neurons)
52
+ - `modal/` — GLM-5.1 FP8 via Modal (free promotional period until April 30, 2026)
53
+ - `ollama-cloud/` Ollama Cloud models (usage-based free tier, resets every 5 hours + 7 days)
54
+
55
+ **🔧 Dynamic API Providers (fetched when API key configured):**
56
+ - `mistral/` — Mistral models (when `MISTRAL_API_KEY` set)
57
+ - `groq/` — Groq models (when `GROQ_API_KEY` set)
58
+ - `cerebras/` Cerebras models (when `CEREBRAS_API_KEY` set)
59
+ - `xai/` — xAI models (when `XAI_API_KEY` set)
60
+ - `huggingface/` — Hugging Face models (when `HF_TOKEN` set)
61
+
62
+ **Note:** Fireworks is now a [built-in Pi provider](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#0681---2026-04-22) — no extension needed. Set `FIREWORKS_API_KEY` to use it directly.
63
+
64
+ ### 3. Toggle between free and paid models
65
+
66
+ Want to see paid models too? Run the toggle command for your provider:
67
+
68
+ ```
69
+ /toggle-opencode # Toggle OpenCode (✅ offers free models)
70
+ /toggle-kilo # Toggle Kilo (✅ offers free models)
71
+ /toggle-openrouter # Toggle OpenRouter (✅ offers free models)
72
+ /toggle-cline # Toggle Cline ( offers free models)
73
+ /toggle-nvidia # Toggle NVIDIA (🔄 freemium)
74
+ /toggle-cloudflare # Toggle Cloudflare (🔄 freemium)
75
+ /toggle-ollama # Toggle Ollama Cloud (🔄 freemium)
76
+ /toggle-mistral # Toggle Mistral (🔧 dynamic - needs API key)
77
+ /toggle-groq # Toggle Groq (🔧 dynamic - needs API key)
78
+ /toggle-cerebras # Toggle Cerebras (🔧 dynamic - needs API key)
79
+ ```
80
+
81
+ **Notes:**
82
+ - **Toggle commands are mainly for and 🔄 providers** — to switch between "free models only" vs "show paid models too"
83
+ - **🔧 Dynamic providers** show all fetched models by default — the toggle filters the list when you have an API key configured
84
+ - **Freemium providers** show all models by default; you manage your usage limits via their dashboards
85
+
86
+ You'll see a notification like: `opencode: showing free models` or `opencode: showing all models`
87
+
88
+ ### 4. Add API keys for more providers (optional)
89
+
90
+ Some providers require a free account or API key.
91
+
92
+ **The first time you run Pi after installing this extension, a config file is automatically created:**
93
+ - **Linux/Mac:** `~/.pi/free.json`
94
+ - **Windows:** `%USERPROFILE%\.pi\free.json`
95
+
96
+ Add your API keys to this file:
97
+
98
+ ```json
99
+ {
100
+ "openrouter_api_key": "sk-or-v1-...",
101
+ "nvidia_api_key": "nvapi-...",
102
+ "cloudflare_api_token": "...",
103
+ "ollama_api_key": "...",
104
+ "mistral_api_key": "...",
105
+ "modal_api_key": "sk-modal-..."
106
+ }
107
+ ```
108
+
109
+ Or set environment variables instead (same names, uppercase: `OPENROUTER_API_KEY`, `NVIDIA_API_KEY`, etc.)
110
+
111
+ See the [Providers That Need Authentication](#providers-that-need-authentication) section below for detailed setup instructions per provider.
112
+
113
+ ### 5. Quick commands reference
114
+
115
+ | Command | What it does |
116
+ |---------|-------------|
117
+ | `/toggle-{provider}` | Switch between free-only and all models for that provider |
118
+ | `/free-providers` | Show free/paid model counts for all providers |
119
+ | `/login kilo` | Start OAuth flow for Kilo |
120
+ | `/login cline` | Start OAuth flow for Cline |
121
+ | `/logout kilo` | Clear Kilo OAuth credentials |
122
+ | `/logout cline` | Clear Cline OAuth credentials |
123
+
124
+ ---
125
+
126
+ ## Using Free Models (No Setup Required)
127
+
128
+ ### OpenCode
129
+
130
+ Works immediately with zero setup:
131
+
132
+ 1. Press `Ctrl+L`
133
+ 2. Search for `opencode/`
134
+ 3. Pick any model (e.g., `opencode/big-pickle`)
135
+ 4. Start chatting
136
+
137
+ No account, no API key, no OAuth. Run `/toggle-opencode` to switch between free and paid OpenCode models.
138
+
139
+ ### Kilo (free models, more after login)
140
+
141
+ Kilo shows free models immediately. To unlock all models, authenticate with Kilo's free OAuth:
142
+
143
+ ```
144
+ /login kilo
145
+ ```
146
+
147
+ This command will:
148
+ 1. Open your browser to Kilo's authorization page
149
+ 2. Show a device code in Pi's UI
150
+ 3. Wait for you to authorize in the browser
151
+ 4. Automatically complete login once approved
152
+
153
+ - No credit card required
154
+ - Free tier: 200 requests/hour
155
+ - After login, run `/toggle-kilo` to switch between free-only and all models
156
+
157
+ ### Cline (free account)
158
+
159
+ Cline models appear immediately in the model picker. To use them, authenticate with Cline's free account:
160
+
161
+ ```
162
+ /login cline
163
+ ```
164
+
165
+ This command will:
166
+ 1. Open your browser to Cline's sign-in page
167
+ 2. Wait for you to complete sign-in
168
+ 3. Automatically complete login once approved
169
+
170
+ - Free account required (no credit card)
171
+ - Uses local ports 48801-48811 for OAuth callback
172
+
173
+ ---
174
+
175
+ ## Providers That Need Authentication
176
+
177
+ Some providers require a free account or API key to access their free tiers.
178
+
179
+ ---
180
+
181
+ ### 🆓 Free Providers
182
+
183
+ ### OpenRouter (free models available)
184
+
185
+ Get a free API key at [openrouter.ai/keys](https://openrouter.ai/keys), then either:
186
+
187
+ **Option A: Environment variable**
188
+ ```bash
189
+ export OPENROUTER_API_KEY="sk-or-v1-..."
190
+ ```
191
+
192
+ **Option B: Config file** (`~/.pi/free.json`)
193
+ ```json
194
+ {
195
+ "openrouter_api_key": "sk-or-v1-..."
196
+ }
197
+ ```
198
+
199
+ Then use `/toggle-openrouter` to switch between free-only and all models.
200
+
201
+ ### NVIDIA NIM (Free Credits System)
202
+
203
+ NVIDIA provides **free monthly credits** (1000 requests/month) at [build.nvidia.com](https://build.nvidia.com).
204
+
205
+ **Important:** Models have different "costs" per token:
206
+ - **Zero-cost models**: Don't consume your credit balance (shown by default)
207
+ - **Credit-costing models**: Consume credits faster (hidden by default)
208
+
209
+ Get your API key and optionally enable all models:
210
+
211
+ **Option A: Show only free models (default)**
212
+ ```bash
213
+ export NVIDIA_API_KEY="nvapi-..."
214
+ ```
215
+ Uses only zero-cost models → your 1000 credits last the full month
216
+
217
+ **Option B: Show all models (uses credits faster)**
218
+ ```bash
219
+ export NVIDIA_API_KEY="nvapi-..."
220
+ export NVIDIA_SHOW_PAID=true
221
+ ```
222
+
223
+ Or in `~/.pi/free.json`:
224
+ ```json
225
+ {
226
+ "nvidia_api_key": "nvapi-...",
227
+ "nvidia_show_paid": true
228
+ }
229
+ ```
230
+
231
+ Toggle anytime with `/toggle-nvidia`
232
+
233
+ ### Cloudflare Workers AI (10K Neurons/day Free Tier)
234
+
235
+ Cloudflare provides **50+ open-source AI models** with a generous free tier:
236
+ - **10,000 Neurons per day FREE** (resets daily at 00:00 UTC)
237
+ - **$0.011 per 1,000 Neurons** beyond the free allocation
238
+
239
+ Get your API token at [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens):
240
+ 1. Create a token with "Cloudflare AI" → "Read" permission
241
+ 2. Or use "My Account" "Read" for broader access
242
+
243
+ **Setup:**
244
+ ```bash
245
+ export CLOUDFLARE_API_TOKEN="your_token_here"
246
+ ```
247
+
248
+ The account ID is automatically derived from your token. Optionally, you can also set:
249
+ ```bash
250
+ export CLOUDFLARE_ACCOUNT_ID="your_account_id" # Optional
251
+ ```
252
+
253
+ **Models available:** Llama 4, Mistral Small 3.1, DeepSeek R1, Gemma 4, Kimi K2.5/2.6, and more.
254
+
255
+ Toggle with `/toggle-cloudflare`
256
+
257
+ ### Modal (GLM-5.1 FP8 — free promotional period until April 30, 2026)
258
+
259
+ Modal hosts GLM-5.1 FP8 with a free promotional period. Get an API key at [modal.com](https://modal.com), then:
260
+
261
+ **Option A: Environment variable**
262
+ ```bash
263
+ export MODAL_API_KEY="sk-modal-..."
264
+ ```
265
+
266
+ **Option B: Config file** (`~/.pi/free.json`)
267
+ ```json
268
+ {
269
+ "modal_api_key": "sk-modal-..."
270
+ }
271
+ ```
272
+
273
+ Then select a `modal/` model in the model picker.
274
+
275
+ **Details:**
276
+ - Free promotional period until April 30, 2026
277
+ - Model: GLM-5.1 FP8 (128k context, 16k max output)
278
+ - No credit card required during the promotional period
279
+
280
+ ### Ollama Cloud
281
+
282
+ Get an API key from [ollama.com/settings/keys](https://ollama.com/settings/keys), then:
283
+
284
+ **Option A: Environment variable**
285
+ ```bash
286
+ export OLLAMA_API_KEY="..."
287
+ export OLLAMA_SHOW_PAID=true
288
+ ```
289
+
290
+ **Option B: Config file** (`~/.pi/free.json`)
291
+ ```json
292
+ {
293
+ "ollama_api_key": "YOUR_KEY",
294
+ "ollama_show_paid": true
295
+ }
296
+ ```
297
+
298
+ **Note:** Ollama requires `OLLAMA_SHOW_PAID=true` because they have usage limits on their cloud API.
299
+
300
+ Free tier resets every 5 hours + 7 days.
301
+
302
+ ### Mistral (free API key)
303
+
304
+ Add API key to `~/.pi/free.json` or environment variables:
305
+
306
+ ```bash
307
+ export MISTRAL_API_KEY="..."
308
+ ```
309
+
310
+ ---
311
+
312
+ ## Slash Commands
313
+
314
+ Each provider has toggle commands to switch between free and all models:
315
+
316
+ | Command | Action |
317
+ |---------|--------|
318
+ | `/toggle-opencode` | Toggle between free/all OpenCode models |
319
+ | `/toggle-kilo` | Toggle between free/all Kilo models |
320
+ | `/toggle-openrouter` | Toggle between free/all OpenRouter models |
321
+ | `/toggle-cline` | Toggle between free/all Cline models |
322
+ | `/toggle-nvidia` | Toggle between free/all NVIDIA models |
323
+ | `/toggle-cloudflare` | Toggle between free/all Cloudflare models |
324
+ | `/toggle-ollama` | Toggle between free/all Ollama Cloud models |
325
+ | `/toggle-mistral` | Toggle between free/all Mistral models (🔧 dynamic) |
326
+ | `/toggle-groq` | Toggle between free/all Groq models (🔧 dynamic) |
327
+ | `/toggle-cerebras` | Toggle between free/all Cerebras models (🔧 dynamic) |
328
+
329
+ **The toggle command:**
330
+ - **For free providers**: Switches between showing only free models vs. all available models (including paid)
331
+ - **For 🔄 freemium providers**: Shows all models by default; toggle switches between filtered and full list
332
+ - **For 🔧 dynamic API providers**: Filters the model list when you have an API key configured
333
+ - **Persists your preference** to `~/.pi/free.json` for next startup
334
+ - Shows a notification: "opencode: showing free models" or "opencode: showing all models"
335
+
336
+ ---
337
+
338
+ ## Configuration
339
+
340
+ Create `~/.pi/free.json` in your home directory:
341
+
342
+ ```json
343
+ {
344
+ "openrouter_api_key": "YOUR_OPENROUTER_KEY",
345
+ "nvidia_api_key": "YOUR_NVIDIA_KEY",
346
+ "mistral_api_key": "YOUR_MISTRAL_KEY",
347
+ "opencode_api_key": "YOUR_OPENCODE_KEY",
348
+ "ollama_api_key": "YOUR_OLLAMA_KEY",
349
+ "ollama_show_paid": true,
350
+ "modal_api_key": "YOUR_MODAL_KEY",
351
+ "hidden_models": ["model-id-to-hide"]
352
+ }
353
+ ```
354
+
355
+ Or use environment variables (same names, uppercase):
356
+
357
+ ```bash
358
+ export OPENROUTER_API_KEY="..."
359
+ export NVIDIA_API_KEY="..."
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Logging & Debugging
365
+
366
+ pi-free now writes extension logs to:
367
+
368
+ - **Windows:** `%USERPROFILE%\.pi\free.log`
369
+ - **Linux/macOS:** `~/.pi/free.log`
370
+
371
+ Useful env vars:
372
+
373
+ ```bash
374
+ # Console log verbosity (default: error)
375
+ LOG_LEVEL=debug
376
+
377
+ # File log verbosity (default: debug)
378
+ PI_FREE_LOG_LEVEL=debug
379
+
380
+ # Custom log path (optional)
381
+ PI_FREE_LOG_PATH=/tmp/pi-free.log
382
+
383
+ # Disable file logging
384
+ PI_FREE_FILE_LOG=false
385
+ ```
386
+
387
+ ---
388
+
389
+ ## License
390
+
391
+ MIT See [LICENSE](LICENSE)
392
+
393
+ **Questions?** [Open an issue](https://github.com/apmantza/pi-free/issues)