pi-free 2.2.3 → 2.2.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 CHANGED
@@ -14,574 +14,83 @@ Free and paid AI model providers for [Pi](https://pi.dev). Access **free and pai
14
14
 
15
15
  When you install pi-free, it:
16
16
 
17
- 1. **Registers free-tier providers** with Pi's model picker — Kilo (free), Cline (free), LLM7 (free), TokenRouter (1 free model), ZenMux (paid), CrofAI (paid), b.ai (paid, 1 free promo model), Ollama Cloud (freemium), SambaNova (freemium), Codestral (freemium), DeepInfra (trial credit), Together AI (trial credit), Novita (paid), Routeway (paid), and more
18
-
19
- 2. **Captures Pi's built-in OpenCode and OpenRouter providers** with a free/paid toggle OpenCode and OpenRouter are now built into Pi; pi-free adds `/toggle-opencode` and `/toggle-openrouter` so you can switch between free-only and all models without restart
20
-
21
- 3. **Fetches models dynamically** from provider APIs ZenMux, CrofAI, and Pi's built-in providers (Mistral, Groq, Cerebras, xAI, Hugging Face, OpenRouter) when API keys are configured
22
-
23
- 4. **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.
24
-
25
- 5. **Provides per-provider toggle commands** — Run `/toggle-{provider}` (e.g., `/toggle-kilo`) to switch between free-only mode and showing all models including paid ones. Changes apply immediately and your preference is saved for the next Pi restart.
26
-
27
- 6. **Handles authentication for you** — OAuth flows (Kilo, Cline) open your browser automatically; API keys are read from `~/.pi/free.json` or environment variables
28
-
29
- 7. **Adds Coding Index scores** — Model names include a coding benchmark score (CI: 45.2) to help you pick capable coding models at a glance
30
-
31
- 8. **Persists your preferences** — Your toggle choices (free vs all models) are saved to `~/.pi/free.json` and remembered across Pi restarts
17
+ 1. **Registers free-tier providers** — Kilo, Cline, LLM7, OpenModel, TokenRouter, and more
18
+ 2. **Captures Pi's built-in providers** with free/paid toggles — OpenCode, OpenRouter
19
+ 3. **Fetches models dynamically** — ZenMux, CrofAI, Mistral, Groq, Cerebras, xAI, Hugging Face when API keys are configured
20
+ 4. **Filters to show only free models by default** — paid models hidden until explicitly toggled on
21
+ 5. **Provides per-provider toggle commands** — `/toggle-{provider}` switches free all immediately
22
+ 6. **Handles authentication** — OAuth flows open your browser; API keys from `~/.pi/free.json` or env vars
23
+ 7. **Adds Coding Index scores** — model names include benchmark scores (`CI: 45.2`) for quick comparison
24
+ 8. **Auto-probes and hides broken models** — expired free tiers and decommissioned models detected automatically
32
25
 
33
26
  ---
34
27
 
35
- ## How to use
36
-
37
- ### 1. Install the extension
28
+ ## Install
38
29
 
39
30
  ```bash
40
31
  pi install git:github.com/apmantza/pi-free
41
32
  ```
42
33
 
43
- ### 2. Open the model picker
44
-
45
- Start Pi and press `Ctrl+L` to open the model picker.
46
-
47
- Free models are shown by default — look for the provider prefixes:
48
-
49
- **✅ Free Models (no payment required):**
50
-
51
- - `kilo/` — Kilo models (free models available immediately, more after `/login kilo`)
52
- - `openrouter/` — OpenRouter models (free account required)
53
- - `cline/` — Cline models (run `/login cline` to use)
54
- - `llm7/` — LLM7 gateway models (free tier: default/fast selectors, 100 req/hr)
55
- - `tokenrouter/` — TokenRouter gateway (1 free model: `MiniMax-M3`; requires API key with credits for the rest)
56
-
57
- **🔄 Freemium (free tier with limits, then paid):**
58
-
59
- - `ollama-cloud/` — Ollama Cloud models (usage-based free tier, resets every 5 hours + 7 days)
60
- - `sambanova/` — SambaNova Cloud models (20-480 RPM free, no credit card required)
61
- - `codestral/` — Codestral via Mistral (free Experiment plan: 2 req/min, 1B tokens/month)
62
-
63
- **💳 Paid Providers (API key with credits required):**
64
-
65
- - `zenmux/` — ZenMux AI gateway (200+ models from OpenAI, Anthropic, Google, etc.)
66
- - `crofai/` — CrofAI OpenAI-compatible API (streaming, reasoning models)
67
- - `deepinfra/` — DeepInfra inference cloud ($5 one-time trial credit, no credit card)
68
- - `novita/` — Novita AI (100+ open-source models, OpenAI-compatible, 3 free models)
69
- - `routeway/` — Routeway AI gateway (OpenAI-compatible, `:free` models)
70
- - `together/` — Together AI ($1 one-time trial credit, 200+ open-source models)
71
-
72
- > **Note:** Paid providers may occasionally offer free models or promotional credits. The `isFreeModel` helper automatically detects free models based on provider pricing data or model names containing "free". For providers that don't expose pricing (like CrofAI), only models with "free" in their names are marked as free.
73
-
74
- **🔧 Dynamic API Providers (fetched when API key configured):**
75
-
76
- - `mistral/` — Mistral models (when `MISTRAL_API_KEY` set)
77
- - `groq/` — Groq models (when `GROQ_API_KEY` set)
78
- - `cerebras/` — Cerebras models (when `CEREBRAS_API_KEY` set)
79
- - `xai/` — xAI models (when `XAI_API_KEY` set)
80
- - `huggingface/` — Hugging Face models (when `HF_TOKEN` set)
81
- - `openrouter/` — OpenRouter models (fetched from openrouter.ai, when `OPENROUTER_API_KEY` set)
82
- - `fastrouter/` — FastRouter models (always discovered, 170+ models, no auth for listing)
83
-
84
- **Note:** Fireworks and NVIDIA NIM are now [built-in Pi providers](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#0681---2026-04-22) — no extension needed. Set `FIREWORKS_API_KEY` or `NVIDIA_API_KEY` to use them directly.
85
-
86
- ### 3. Toggle between free and paid models
87
-
88
- Want to see paid models too? Run the toggle command for your provider:
89
-
90
- ```
91
- /toggle-kilo # Toggle Kilo (✅ offers free models)
92
- /toggle-openrouter # Toggle OpenRouter (✅ offers free models)
93
- /toggle-opencode # Toggle OpenCode (✅ offers free models)
94
- /toggle-cline # Toggle Cline (✅ offers free models)
95
- /toggle-ollama # Toggle Ollama Cloud (🔄 freemium)
96
- /toggle-mistral # Toggle Mistral (🔧 dynamic - needs API key)
97
- /toggle-groq # Toggle Groq (🔧 dynamic - needs API key)
98
- /toggle-cerebras # Toggle Cerebras (🔧 dynamic - needs API key)
99
- /toggle-xai # Toggle xAI (🔧 dynamic - needs API key)
100
- /toggle-huggingface # Toggle Hugging Face (🔧 dynamic - needs HF_TOKEN)
101
- /toggle-zenmux # Toggle ZenMux (💳 paid - needs API key with credits)
102
- /toggle-crofai # Toggle CrofAI (💳 paid - needs API key with credits)
103
- /toggle-codestral # Toggle Codestral (🔄 free Experiment plan)
104
- /toggle-deepinfra # Toggle DeepInfra (💳 trial credit provider)
105
- /toggle-together # Toggle Together AI (💳 trial credit provider)
106
- /toggle-sambanova # Toggle SambaNova (🔄 freemium)
107
- /toggle-llm7 # Toggle LLM7 (✅ free gateway)
108
- /toggle-novita # Toggle Novita AI (💳 paid — 3 free models)
109
- /toggle-routeway # Toggle Routeway AI (💳 paid — has :free models)
110
- /toggle-fastrouter # Toggle FastRouter (🔧 dynamic — always discovered)
111
- /toggle-tokenrouter # Toggle TokenRouter (💳 paid — 1 free model)
112
- ```
113
-
114
- **Notes:**
115
-
116
- - **Toggle commands are mainly for ✅ and 🔄 providers** — to switch between "free models only" vs "show paid models too"
117
- - **🔧 Dynamic providers** show all fetched models by default — the toggle filters the list when you have an API key configured
118
- - **Freemium providers** show all models by default; you manage your usage limits via their dashboards
119
-
120
- ### 4. Add API keys for more providers (optional)
121
-
122
- Some providers require a free account or API key.
123
-
124
- **The first time you run Pi after installing this extension, a config file is automatically created:**
125
-
126
- - **Linux/Mac:** `~/.pi/free.json`
127
- - **Windows:** `%USERPROFILE%\.pi\free.json`
128
-
129
- Add your API keys to this file:
130
-
131
- ```json
132
- {
133
- "ollama_api_key": "...",
134
- "mistral_api_key": "...",
135
- "codestral_api_key": "...",
136
- "deepinfra_api_key": "...",
137
- "sambanova_api_key": "...",
138
- "llm7_api_key": "...",
139
- "zenmux_api_key": "...",
140
- "crofai_api_key": "...",
141
- "routeway_api_key": "sk-..."
142
- }
143
- ```
144
-
145
- Or set environment variables instead (same names, uppercase: `OPENROUTER_API_KEY`, `OLLAMA_API_KEY`, etc.)
146
-
147
- If `~/.pi/free.json` contains invalid JSON, pi-free now logs the parse error to `~/.pi/free.log` so you can fix the file quickly.
148
-
149
- See the [Providers That Need Authentication](#providers-that-need-authentication) section below for detailed setup instructions per provider.
150
-
151
- ### 5. Quick commands reference
152
-
153
- | Command | What it does |
154
- | -------------------------- | --------------------------------------------------------- |
155
- | `/toggle-{provider}` | Switch between free-only and all models for that provider |
156
- | `/toggle-free` | Toggle global free-only mode for ALL providers |
157
- | `/free-providers` | Show free/paid model counts for all providers |
158
- | `/free-telemetry` | Show real-world performance data (tokens/s, latency, success rate) for free models |
159
- | `/clear-free-telemetry` | Clear all stored telemetry data |
160
- | `/login kilo` | Start OAuth flow for Kilo |
161
- | `/login cline` | Start OAuth flow for Cline |
162
- | `/logout kilo` | Clear Kilo OAuth credentials |
163
- | `/logout cline` | Clear Cline OAuth credentials |
164
-
165
- ---
166
-
167
- ## Features
168
-
169
- ### 🔍 Model Availability Probing
170
-
171
- Some provider APIs list models that return errors when you try to use them (expired free promotions, decommissioned models, server spin-down). pi-free automatically detects and hides broken models:
172
-
173
- - **Ollama Cloud**: `/probe-ollama` — probes for 403 errors, auto-hides inaccessible models
174
- - **Routeway**: `/probe-routeway` — probes for 5xx/404 errors, auto-hides broken models
175
- - **OpenCode**: `/probe-opencode`, `/probe-opencode-go` — probes for expired free promotions (reports only, no auto-hide)
176
- - **DeepInfra**: `/probe-deepinfra` — probes for 404/5xx errors, auto-hides broken models
177
- - **SambaNova**: `/probe-sambanova` — probes for 404/5xx errors, auto-hides broken models
178
- - **Together AI**: `/probe-together` — probes for 404/5xx errors, auto-hides broken models
179
- - **Novita AI**: `/probe-novita` — probes for 404/5xx errors, auto-hides broken models
180
-
181
- All probes use a **24-hour probe cache** to avoid re-checking recently-verified models. Run any probe command manually to force a full re-check, or let the lazy auto-probe on first `session_start` handle it.
182
-
183
- ### 🎯 Coding Index (CI) Scores
184
-
185
- Every model shows a **Coding Index score** (e.g., `CI: 52.3`) in the model picker:
186
-
187
- - **Benchmark-based** — Scores derived from Artificial Analysis coding benchmarks (HumanEval, MBPP, etc.)
188
- - **Quality indicator** — Higher scores = better coding performance
189
- - **All providers** — Applied to every model from every provider (Mistral, Groq, Cerebras, etc.)
190
-
191
- **Missing CI scores?** Provider model IDs often don't match benchmark database keys exactly. pi-free applies provider-specific normalization to improve matching:
192
-
193
- | Provider | Normalization Applied |
194
- | ------------ | ------------------------------------------------------------------ |
195
- | **Fireworks** | Strips vendor prefixes (`meta/`, `mistralai/`, `microsoft/`, etc.) |
196
- | **Groq** | Removes `-versatile` and numeric suffixes (`-32768`) |
197
- | **Cerebras** | Normalizes `llama3.1` → `llama-3.1`, adds `instruct` suffix |
198
- | **Mistral** | Strips `-latest` suffix |
199
- | **Ollama** | Converts `model:tag` → `model-tag` |
200
-
201
- **Debug missing scores:** Check `~/.pi/modelmatch.log` to see which models matched/didn't match and what normalization was applied.
202
-
203
- ### 🔄 Free/Paid Model Toggling
204
-
205
- Providers have different pricing models. pi-free handles them all:
206
-
207
- - **Free-only by default** — Shows only zero-cost models initially
208
- - **Auto-probe on session_start** — Lazy background probes detect broken models automatically on your first session; no manual command needed
209
- - **Per-provider toggles** — Run `/toggle-{provider}` to switch between "free only" vs "all models"
210
- - **Persists across sessions** — Your preference is saved to `~/.pi/free.json`
211
- - **Instant updates** — Changes apply immediately; no Pi restart needed
212
-
213
- **Provider types:**
214
-
215
- - ✅ **Free providers** (Kilo, Cline) — Toggle between free-only vs paid models
216
- - 🔄 **Freemium** (Ollama, SambaNova) — Free tier with limits, toggle shows all
217
- - 🔧 **Dynamic API** (Mistral, Groq, Cerebras, xAI) — Fetched when API key configured, toggle filters the list
218
-
219
- ### 🔐 OAuth + API Key Handling
220
-
221
- Authentication is handled automatically:
222
-
223
- - **OAuth flows** — `/login kilo` and `/login cline` open your browser, wait for authorization, and complete automatically
224
- - **Multiple auth sources** — API keys read from `~/.pi/free.json`, environment variables, or standard Pi auth files (`~/.pi/agent/auth.json`)
225
-
226
- ---
227
-
228
- ## Using Free Models (No Setup Required)
229
-
230
- ### Kilo (free models, more after login)
231
-
232
- Kilo shows free models immediately. To unlock all models, authenticate with Kilo's free OAuth:
233
-
234
- ```
235
- /login kilo
236
- ```
237
-
238
- This command will:
239
-
240
- 1. Open your browser to Kilo's authorization page
241
- 2. Show a device code in Pi's UI
242
- 3. Wait for you to authorize in the browser
243
- 4. Automatically complete login once approved
244
-
245
- - No credit card required
246
- - Free tier: 200 requests/hour
247
- - After login, run `/toggle-kilo` to switch between free-only and all models
248
-
249
- ### Cline (free account)
250
-
251
- Cline models appear immediately in the model picker. To use them, authenticate with Cline's free account:
252
-
253
- ```
254
- /login cline
255
- ```
256
-
257
- This command will:
258
-
259
- 1. Open your browser to Cline's sign-in page
260
- 2. Wait for you to complete sign-in
261
- 3. Automatically complete login once approved
262
-
263
- - Free account required (no credit card)
264
- - Uses local ports 48801-48811 for OAuth callback
265
-
266
- ---
267
-
268
- ## Providers That Need Authentication
269
-
270
- Some providers require a free account or API key to access their free tiers.
271
-
272
- ---
273
-
274
- ### 🆓 Free Providers
275
-
276
- ### OpenRouter (free models available)
277
-
278
- Get a free API key at [openrouter.ai/keys](https://openrouter.ai/keys), then either:
279
-
280
- **Option A: Environment variable**
281
-
282
- ```bash
283
- export OPENROUTER_API_KEY="sk-or-v1-..."
284
- ```
285
-
286
- **Option B: Pi's auth file** (`~/.pi/agent/auth.json`)
287
-
288
- OpenRouter reads its key from Pi's built-in auth storage. Set it via:
289
-
290
- ```bash
291
- export OPENROUTER_API_KEY="sk-or-v1-..."
292
- ```
293
-
294
- Then use `/toggle-openrouter` to switch between free-only and all models.
295
-
296
- **Note:** `openrouter_api_key` in `~/.pi/free.json` is ignored. OpenRouter always reads from Pi's auth system to avoid stale keys.
297
-
298
- ### NVIDIA NIM (now built-in)
299
-
300
- NVIDIA NIM is now a **built-in Pi provider** — no extension needed. Set `NVIDIA_API_KEY` to use it directly with Pi's built-in model picker.
301
-
302
- ### Ollama Cloud
303
-
304
- Get an API key from [ollama.com/settings/keys](https://ollama.com/settings/keys), then:
305
-
306
- **Option A: Environment variable**
307
-
308
- ```bash
309
- export OLLAMA_API_KEY="..."
310
- export OLLAMA_SHOW_PAID=true
311
- ```
312
-
313
- **Option B: Config file** (`~/.pi/free.json`)
314
-
315
- ```json
316
- {
317
- "ollama_api_key": "YOUR_KEY",
318
- "ollama_show_paid": true
319
- }
320
- ```
321
-
322
- **Note:** Ollama requires `OLLAMA_SHOW_PAID=true` because they have usage limits on their cloud API.
323
-
324
- Free tier resets every 5 hours + 7 days.
325
-
326
- ### Mistral (free API key)
327
-
328
- Add API key to `~/.pi/free.json` or environment variables:
329
-
330
- ```bash
331
- export MISTRAL_API_KEY="..."
332
- ```
34
+ Press `Ctrl+L` to open the model picker. Free models are shown by default.
333
35
 
334
36
  ---
335
37
 
336
- ### 💳 Paid Providers
38
+ ## Quick Start
337
39
 
338
- ### Codestral (free Experiment plan)
40
+ ### 1. Use free models (no setup)
339
41
 
340
- Codestral is Mistral's code-focused model via `codestral.mistral.ai`:
42
+ Kilo and Cline models appear immediately. To unlock all models:
341
43
 
342
- - Free tier (Experiment plan): 2 req/min, 500K tokens/min, 1B tokens/month
343
- - No credit card — phone verification only
344
- - Sign up at <https://console.mistral.ai/codestral>
345
-
346
- ```bash
347
- export CODESTRAL_API_KEY="..."
348
44
  ```
349
-
350
- Or add to `~/.pi/free.json`:
351
-
352
- ```json
353
- {
354
- "codestral_api_key": "YOUR_KEY"
355
- }
45
+ /login kilo # Kilo free OAuth
46
+ /login cline # Cline free OAuth
356
47
  ```
357
48
 
358
- **Note:** Codestral uses Mistral's SDK (`mistral-conversations` API type), not OpenAI-completions.
49
+ ### 2. Toggle between free and paid
359
50
 
360
- ### LLM7.io (free gateway)
361
-
362
- LLM7 routes across multiple providers through a single OpenAI-compatible endpoint:
363
-
364
- - Free tier: default/fast selectors, 100 req/hr, 20 req/min
365
- - No credit card required
366
- - Get free token at <https://token.llm7.io/>
367
-
368
- ```bash
369
- export LLM7_API_KEY="..."
370
51
  ```
371
-
372
- ### DeepInfra ($5 trial credit)
373
-
374
- AI inference cloud with 100+ open-source models:
375
-
376
- - $5 one-time credit on signup (no credit card)
377
- - ~5M tokens, expires after 90 days
378
- - 60 RPM (varies by model)
379
-
380
- ```bash
381
- export DEEPINFRA_TOKEN="..."
382
- ```
383
-
384
- ### Together AI ($1 trial credit)
385
-
386
- Fast inference on 200+ open-source models:
387
-
388
- - $1 one-time credit on signup (no credit card)
389
- - 138 chat models (Llama, DeepSeek, Qwen, Mixtral, etc.)
390
- - 60 RPM, 600 RPD (varies by model)
391
-
392
- ```bash
393
- export TOGETHER_AI_API_KEY="..."
394
- ```
395
-
396
- ### SambaNova Cloud (free tier)
397
-
398
- Fast inference on custom RDU hardware:
399
-
400
- - Free tier: 20-480 RPM, 400-9600 RPD (no credit card)
401
- - Models include Llama 3.3 70B, DeepSeek-V3/R1, Llama 4 Maverick
402
-
403
- ```bash
404
- export SAMBANOVA_API_KEY="..."
52
+ /toggle-kilo # Kilo free ↔ all
53
+ /toggle-openrouter # OpenRouter free ↔ all
54
+ /toggle-free # global free-only mode
55
+ /free-providers # show model counts
405
56
  ```
406
57
 
407
- ### b.ai (paid gateway with 1 free promo model)
408
-
409
- OpenAI-compatible gateway at `api.b.ai/v1` providing access to 29 frontier models:
58
+ ### 3. Add API keys (optional)
410
59
 
411
- - **Anthropic**: Claude Opus 4.5–4.8, Claude Sonnet 4.5–4.6, Claude Haiku 4.5
412
- - **OpenAI**: GPT-5.5, GPT-5.5 Instant, GPT-5.4, GPT-5.4 Pro/Mini/Nano, GPT-5.2, GPT-5 Mini/Nano
413
- - **Google**: Gemini 3.1 Pro, Gemini 3 Flash, Gemini 3.5 Flash
414
- - **DeepSeek**: V4 Pro, V4 Flash, V3.2
415
- - **GLM**: GLM-5.x family
416
- - **Other**: Kimi K2.5, Qwen 3.6-27B, MiniMax M3 / M2.7
417
-
418
- Currently advertises `MiniMax-M3` as a limited-time free promotional model. All other models are paid — they're visible by default (toggle with `/toggle-bai` to show free-only).
419
-
420
- ```bash
421
- export BAI_API_KEY="sk-..."
422
- ```
423
-
424
- Or add to `~/.pi/free.json`:
60
+ First run creates `~/.pi/free.json` automatically. Add keys there or use environment variables:
425
61
 
426
62
  ```json
427
63
  {
428
- "bai_api_key": "sk-...",
429
- "bai_show_paid": true
64
+ "ollama_api_key": "...",
65
+ "sambanova_api_key": "...",
66
+ "deepinfra_api_key": "..."
430
67
  }
431
68
  ```
432
69
 
433
- Get a key at <https://b.ai/>.
434
-
435
70
  ---
436
71
 
437
- ## Slash Commands
438
-
439
- Each provider has toggle commands to switch between free and all models:
440
-
441
- | Command | Action |
442
- | ----------------------- | -------------------------------------------------------- |
443
- | `/toggle-kilo` | Toggle between free/all Kilo models |
444
- | `/toggle-openrouter` | Toggle between free/all OpenRouter models |
445
- | `/toggle-opencode` | Toggle between free/all OpenCode models |
446
- | `/toggle-cline` | Toggle between free/all Cline models |
447
- | `/toggle-ollama` | Toggle between free/all Ollama Cloud models |
448
- | `/toggle-mistral` | Toggle between free/all Mistral models (🔧 dynamic) |
449
- | `/toggle-groq` | Toggle between free/all Groq models (🔧 dynamic) |
450
- | `/toggle-cerebras` | Toggle between free/all Cerebras models (🔧 dynamic) |
451
- | `/toggle-xai` | Toggle between free/all xAI models (🔧 dynamic) |
452
- | `/toggle-huggingface` | Toggle between free/all Hugging Face models (🔧 dynamic) |
453
- | `/toggle-codestral` | Toggle Codestral (🔄 freemium) |
454
- | `/toggle-deepinfra` | Toggle DeepInfra (💳 trial credit) |
455
- | `/toggle-together` | Toggle Together AI (💳 trial credit) |
456
- | `/toggle-sambanova` | Toggle SambaNova (🔄 freemium) |
457
- | `/toggle-bai` | Toggle b.ai (💳 paid — 1 free promo model) |
458
- | `/toggle-llm7` | Toggle LLM7 (✅ free gateway) |
459
- | `/toggle-zenmux` | Toggle ZenMux (💳 paid) |
460
- | `/toggle-crofai` | Toggle CrofAI (💳 paid) |
461
- | `/toggle-novita` | Toggle Novita AI (💳 paid) |
462
- | `/toggle-routeway` | Toggle Routeway AI (💳 paid) |
463
- | `/toggle-fastrouter` | Toggle FastRouter (🔧 dynamic) |
464
- | `/toggle-tokenrouter` | Toggle TokenRouter (💳 paid — 1 free model) |
465
- | `/ollama-cloud-refresh` | Re-fetch Ollama Cloud models live (no restart needed) |
466
- | `/probe-ollama` | Test Ollama Cloud models for 403 errors (auto-hide) |
467
-
468
- **The toggle command:**
469
-
470
- - **For ✅ free providers**: Switches between showing only free models vs. all available models (including paid)
471
- - **For 🔄 freemium providers**: Shows all models by default; toggle switches between filtered and full list
472
- - **For 🔧 dynamic API providers**: Filters the model list when you have an API key configured
473
- - **Persists your preference** to `~/.pi/free.json` for next startup
474
-
475
- ### Probe Commands (Health Check)
476
-
477
- Test models for errors and auto-hide broken ones:
478
-
479
- | Command | What it does |
480
- | ---------------------- | ----------------------------------------------------------- |
481
- | `/probe-ollama` | Test all Ollama Cloud models, auto-hide 403s |
482
- | `/probe-routeway` | Test all Routeway models, auto-hide 5xx/404s |
483
- | `/probe-opencode` | Test all OpenCode free models for expired promotions |
484
- | `/probe-opencode-go` | Test all OpenCode Go free models for expired promotions |
485
- | `/probe-deepinfra` | Test all DeepInfra models for availability, auto-hide broken|
486
- | `/probe-sambanova` | Test all SambaNova models for availability, auto-hide broken|
487
- | `/probe-together` | Test all Together AI models for availability, auto-hide broken|
488
- | `/probe-novita` | Test all Novita AI models for availability, auto-hide broken|
489
-
490
- **How it works:**
491
-
492
- 1. Sends a minimal test request to every model
493
- 2. Identifies broken models (404/403 responses)
494
- 3. **Auto-hides** broken models in your config (provider-scoped: `"ollama/kimi-k2.6"`)
495
- 4. Re-registers the provider so broken models disappear immediately
496
- 5. Hidden models persist across Pi restarts
497
-
498
- Use these when you see models that appear in the picker but fail when you try to use them.
72
+ ## Provider Catalog
499
73
 
500
- ---
74
+ | Category | Providers |
75
+ |---|---|
76
+ | ✅ **Free** | Kilo, Cline, OpenRouter, OpenCode, LLM7, OpenModel, TokenRouter (1 free) |
77
+ | 🔄 **Freemium** | Ollama Cloud, SambaNova, Codestral, AgentRouter |
78
+ | 💳 **Paid** | ZenMux, CrofAI, DeepInfra, Together, Novita, Routeway, b.ai |
79
+ | 🔧 **Dynamic** | Mistral, Groq, Cerebras, xAI, Hugging Face, FastRouter |
501
80
 
502
- ## Configuration
503
-
504
- Create `~/.pi/free.json` in your home directory:
505
-
506
- ```json
507
- {
508
- "mistral_api_key": "YOUR_MISTRAL_KEY",
509
- "ollama_api_key": "YOUR_OLLAMA_KEY",
510
- "ollama_show_paid": true,
511
- "hidden_models": ["model-id-to-hide"]
512
- }
513
- ```
514
-
515
- Or use environment variables (same names, uppercase):
516
-
517
- ```bash
518
- export MISTRAL_API_KEY="..."
519
- export OLLAMA_API_KEY="..."
520
- ```
81
+ **Full catalog and setup instructions:** [docs/providers.md](docs/providers.md)
521
82
 
522
83
  ---
523
84
 
524
- ## Logging & Debugging
525
-
526
- pi-free writes extension logs to:
527
-
528
- - **Windows:** `%USERPROFILE%\.pi\free.log`
529
- - **Linux/macOS:** `~/.pi/free.log`
85
+ ## Docs
530
86
 
531
- If the extension fails to read `~/.pi/free.json`, check this log first — config parse errors are written here.
532
-
533
- ```bash
534
- # Console log verbosity (default: error)
535
- LOG_LEVEL=debug
536
-
537
- # File log verbosity (default: debug)
538
- PI_FREE_LOG_LEVEL=debug
539
-
540
- # Custom log path (optional)
541
- PI_FREE_LOG_PATH=/tmp/pi-free.log
542
-
543
- # Disable file logging
544
- PI_FREE_FILE_LOG=false
545
- ```
546
-
547
- ### Model Matching Debug Log
548
-
549
- To diagnose why some models don't show Coding Index scores, pi-free writes detailed matching diagnostics to:
550
-
551
- - **Windows:** `%USERPROFILE%\.pi\modelmatch.log`
552
- - **Linux/macOS:** `~/.pi/modelmatch.log`
553
-
554
- **Log format:**
555
-
556
- ```
557
- timestamp|provider|modelId|modelName|action|strategy|normalizedId|matchKey|codingIndex|details
558
- ```
559
-
560
- **Example entries:**
561
-
562
- ```
563
- 2026-04-26T10:30:00Z|nvidia|meta/llama-3.1-405b-instruct|Llama 3.1 405B|match|provider-normalized:strip-nvidia-prefix|llama-3.1-405b-instruct|llama-3.1-instruct-405b|52.3|
564
- 2026-04-26T10:30:01Z|groq|llama-3.1-70b-versatile|Llama 3.1 70B Versatile|match|strip-groq-versatile|llama-3.1-70b|llama-3.1-instruct-70b|48.5|
565
- 2026-04-26T10:30:02Z|groq|mixtral-8x7b-instruct|Mixtral 8x7B|miss|all-strategies-failed|mixtral-8x7b-instruct|||
566
- ```
567
-
568
- **Common mismatch patterns:**
569
-
570
- - `miss` + `all-strategies-failed` = Model not in benchmark database or ID format not recognized
571
- - Check `normalizedId` column to see what the lookup tried against
572
-
573
- **View the log:**
574
-
575
- ```bash
576
- # Pretty-print with column alignment
577
- cat ~/.pi/modelmatch.log | column -t -s '|'
578
-
579
- # See only misses (models without CI scores)
580
- grep '|miss|' ~/.pi/modelmatch.log
581
-
582
- # See stats for specific provider
583
- grep '|nvidia|' ~/.pi/modelmatch.log | grep -c '|match|'
584
- ```
87
+ | Topic | Link |
88
+ |---|---|
89
+ | Provider catalog & auth | [docs/providers.md](docs/providers.md) |
90
+ | Slash commands | [docs/commands.md](docs/commands.md) |
91
+ | Configuration & logging | [docs/configuration.md](docs/configuration.md) |
92
+ | Features deep dive | [docs/features.md](docs/features.md) |
93
+ | Adding new providers | [CONTRIBUTING.md](CONTRIBUTING.md) |
585
94
 
586
95
  ---
587
96