pi-free 2.1.1 → 2.2.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/CHANGELOG.md CHANGED
@@ -7,6 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.2.1] - 2026-06-19
11
+
12
+ ### Security
13
+
14
+ - `~/.pi/free.json` (which contains API keys for paid providers) is now
15
+ written and re-tightened with mode `0600` (owner read/write only) on
16
+ every startup and on every write. Previously the file was world-readable
17
+ on Unix. No-op on Windows. Closes DRYKISS finding.
18
+
19
+ ### Fixed
20
+
21
+ - Wrap quota monitoring and telemetry event handlers in `try/catch` so a
22
+ failed status-bar update or telemetry write can never break the agent
23
+ loop (DRYKISS resilience findings).
24
+
25
+ ## [2.2.0] - 2026-06-19
26
+
27
+ ### Added
28
+
29
+ - **b.ai** provider (`api.b.ai/v1`) — OpenAI-compatible gateway with 29 models
30
+ (Claude Opus 4.x / Sonnet 4.x, GPT-5.x family, Gemini 3.x family, DeepSeek
31
+ V4 / V3.2, GLM-5.x, Kimi K2.5, Qwen 3.6-27B, MiniMax M3 / M2.7). Currently
32
+ advertises `MiniMax-M3` as a limited-time free promotional model; all
33
+ other models default to paid (visible by default). Static API key auth via
34
+ `BAI_API_KEY` env var or `bai_api_key` in `~/.pi/free.json`. New commands:
35
+ `/toggle-bai`.
36
+
37
+ ### Security
38
+
39
+ - Bumped `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and
40
+ `@earendil-works/pi-tui` to `^0.79.8` — resolves Dependabot advisories
41
+ #19 and #21 (high-severity protobufjs, ws, undici vulnerabilities in
42
+ `@earendil-works/pi-coding-agent`).
43
+ - Bumped `typescript` devDep to `^6.0.3`.
44
+ - Removed now-redundant `overrides` for `protobufjs` and `ws` (fixed
45
+ upstream).
46
+
10
47
  ## [2.1.1] - 2026-06-15
11
48
 
12
49
  ### Fixed
package/README.md CHANGED
@@ -14,7 +14,7 @@ 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), Ollama Cloud (freemium), SambaNova (freemium), Codestral (freemium), DeepInfra (trial credit), Together AI (trial credit), Novita (paid), Routeway (paid), and more
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
18
 
19
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
20
 
@@ -341,7 +341,7 @@ Codestral is Mistral's code-focused model via `codestral.mistral.ai`:
341
341
 
342
342
  - Free tier (Experiment plan): 2 req/min, 500K tokens/min, 1B tokens/month
343
343
  - No credit card — phone verification only
344
- - Sign up at https://console.mistral.ai/codestral
344
+ - Sign up at <https://console.mistral.ai/codestral>
345
345
 
346
346
  ```bash
347
347
  export CODESTRAL_API_KEY="..."
@@ -363,7 +363,7 @@ LLM7 routes across multiple providers through a single OpenAI-compatible endpoin
363
363
 
364
364
  - Free tier: default/fast selectors, 100 req/hr, 20 req/min
365
365
  - No credit card required
366
- - Get free token at https://token.llm7.io/
366
+ - Get free token at <https://token.llm7.io/>
367
367
 
368
368
  ```bash
369
369
  export LLM7_API_KEY="..."
@@ -404,6 +404,34 @@ Fast inference on custom RDU hardware:
404
404
  export SAMBANOVA_API_KEY="..."
405
405
  ```
406
406
 
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:
410
+
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`:
425
+
426
+ ```json
427
+ {
428
+ "bai_api_key": "sk-...",
429
+ "bai_show_paid": true
430
+ }
431
+ ```
432
+
433
+ Get a key at <https://b.ai/>.
434
+
407
435
  ---
408
436
 
409
437
  ## Slash Commands
@@ -426,6 +454,7 @@ Each provider has toggle commands to switch between free and all models:
426
454
  | `/toggle-deepinfra` | Toggle DeepInfra (💳 trial credit) |
427
455
  | `/toggle-together` | Toggle Together AI (💳 trial credit) |
428
456
  | `/toggle-sambanova` | Toggle SambaNova (🔄 freemium) |
457
+ | `/toggle-bai` | Toggle b.ai (💳 paid — 1 free promo model) |
429
458
  | `/toggle-llm7` | Toggle LLM7 (✅ free gateway) |
430
459
  | `/toggle-zenmux` | Toggle ZenMux (💳 paid) |
431
460
  | `/toggle-crofai` | Toggle CrofAI (💳 paid) |
@@ -443,7 +472,6 @@ Each provider has toggle commands to switch between free and all models:
443
472
  - **For 🔧 dynamic API providers**: Filters the model list when you have an API key configured
444
473
  - **Persists your preference** to `~/.pi/free.json` for next startup
445
474
 
446
-
447
475
  ### Probe Commands (Health Check)
448
476
 
449
477
  Test models for errors and auto-hide broken ones:
package/banner.svg CHANGED
@@ -96,7 +96,7 @@
96
96
  <text x="20" y="70" font-family="system-ui, sans-serif" font-size="11" fill="#8b9aaa">Ollama Cloud · SambaNova</text>
97
97
  <text x="20" y="90" font-family="system-ui, sans-serif" font-size="11" fill="#8b9aaa">Codestral · LLM7 · Novita</text>
98
98
  <text x="20" y="110" font-family="system-ui, sans-serif" font-size="11" fill="#8b9aaa">ZenMux · CrofAI · DeepInfra</text>
99
- <text x="20" y="130" font-family="system-ui, sans-serif" font-size="11" fill="#8b9aaa">Together · TokenRouter · FastRouter</text>
99
+ <text x="20" y="130" font-family="system-ui, sans-serif" font-size="11" fill="#8b9aaa">Together · TokenRouter · b.ai</text>
100
100
  </g>
101
101
 
102
102
  <g transform="translate(970, 55)">