pi-free 2.2.6 → 2.2.8
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 +31 -4
- package/README.md +3 -2
- package/config.ts +815 -803
- package/constants.ts +113 -121
- package/index.ts +6 -7
- package/lib/built-in-toggle.ts +426 -426
- package/lib/model-detection.ts +1 -1
- package/package.json +74 -74
- package/provider-helper.ts +29 -7
- package/providers/anyapi/anyapi.ts +270 -0
- package/providers/cline/cline-auth.ts +473 -473
- package/providers/cline/cline-xml-bridge.ts +1506 -1506
- package/providers/cline/cline.ts +205 -205
- package/providers/dynamic-built-in/index.ts +718 -718
- package/providers/kilo/kilo-auth.ts +152 -155
- package/providers/kilo/kilo.ts +14 -13
- package/providers/opencode-session.ts +514 -463
- package/providers/qoder/auth.ts +548 -548
- package/providers/qoder/qoder.ts +119 -119
- package/providers/qoder/stream.ts +585 -585
- package/providers/qoder/thinking-parser.ts +251 -251
- package/providers/qoder/transform.ts +192 -192
- package/providers/tokenrouter/tokenrouter.ts +636 -637
- package/providers/qwen/qwen-auth.ts +0 -416
- package/providers/qwen/qwen-models.ts +0 -101
- package/providers/qwen/qwen.ts +0 -200
package/CHANGELOG.md
CHANGED
|
@@ -7,17 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.2.8] - 2026-07-19
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Pi 0.80.8 compatibility** — migrate OAuth checks to Pi's runtime APIs and raise the peer dependency floor to `>=0.80.8`.
|
|
15
|
+
- **Remove deprecated providers** — remove the Qwen and Modal providers now that their supported free tiers are no longer available.
|
|
16
|
+
- **CI hardening** — pin GitHub Actions to immutable commit SHAs.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Pi runtime auth compatibility** — guard OAuth detection when the model registry compatibility APIs are unavailable.
|
|
21
|
+
|
|
22
|
+
## [2.2.7] - 2026-07-10
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **AnyAPI provider** — add AnyAPI's OpenAI-compatible gateway with dynamic model discovery, free-model filtering, a 100K-token daily free plan, and `/toggle-anyapi` for switching to the full catalog.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Pi 0.80 compatibility** — update the Pi SDK peer requirements to `>=0.80.0` and refresh the development toolchain dependencies.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- **AnyAPI model limits** — enrich context and output limits from models.dev when AnyAPI omits them, avoiding incorrect 4K defaults and migrating existing caches once.
|
|
35
|
+
- **TokenRouter Pi AI compatibility** — use the supported lazy OpenAI completions API path for Pi 0.80.
|
|
36
|
+
|
|
10
37
|
## [2.2.6] - 2026-07-09
|
|
11
38
|
|
|
12
39
|
### Changed
|
|
13
40
|
|
|
14
|
-
- **Faster startup (~30x)** — warm-cache load dropped from ~2.1s to ~70ms: providers now serve from a 1-hour disk cache and fetch live only on cold/stale cache. Extends the cache-first pattern (already used by Cline) to kilo, fastrouter, and all OpenAI-compatible fetchers (tokenrouter, zenmux, crofai, deepinfra, sambanova, together, novita, routeway, bai, openmodel); the dynamic built-in phase runs concurrently with the static providers.
|
|
15
|
-
- **Coding-Index debug logging is now opt-in** — `~/.pi/modelmatch.log` previously received one synchronous `appendFileSync` per model per match attempt at startup. Now off by default; set `PI_FREE_BENCHMARK_DEBUG=1` to re-enable.
|
|
16
|
-
- **Config reads are memoized** — `~/.pi/free.json` is parsed once and reused while its mtime is unchanged.
|
|
41
|
+
- **Faster startup (~30x)** — warm-cache load dropped from ~2.1s to ~70ms: providers now serve from a 1-hour disk cache and fetch live only on cold/stale cache. Extends the cache-first pattern (already used by Cline) to kilo, fastrouter, and all OpenAI-compatible fetchers (tokenrouter, zenmux, crofai, deepinfra, sambanova, together, novita, routeway, bai, openmodel); the dynamic built-in phase runs concurrently with the static providers. Thanks @lmilojevicc
|
|
42
|
+
- **Coding-Index debug logging is now opt-in** — `~/.pi/modelmatch.log` previously received one synchronous `appendFileSync` per model per match attempt at startup. Now off by default; set `PI_FREE_BENCHMARK_DEBUG=1` to re-enable. Thanks @lmilojevicc
|
|
43
|
+
- **Config reads are memoized** — `~/.pi/free.json` is parsed once and reused while its mtime is unchanged. Thanks @lmilojevicc
|
|
17
44
|
|
|
18
45
|
### Fixed
|
|
19
46
|
|
|
20
|
-
- **Cache-poisoning guard** — a transient partial API response (a 200 returning a near-empty list) can no longer overwrite a healthy cached model list; fetches returning < 50% of the cached count keep the existing cache.
|
|
47
|
+
- **Cache-poisoning guard** — a transient partial API response (a 200 returning a near-empty list) can no longer overwrite a healthy cached model list; fetches returning < 50% of the cached count keep the existing cache. Thanks @lmilojevicc
|
|
21
48
|
|
|
22
49
|
### Removed
|
|
23
50
|
|
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** — Kilo, Cline, LLM7, OpenModel, TokenRouter, and more
|
|
17
|
+
1. **Registers free-tier providers** — Kilo, Cline, LLM7, OpenModel, TokenRouter, AnyAPI, and more
|
|
18
18
|
2. **Captures Pi's built-in providers** with free/paid toggles — OpenCode, OpenRouter
|
|
19
19
|
3. **Fetches models dynamically** — ZenMux, CrofAI, Mistral, Groq, Cerebras, xAI, Hugging Face when API keys are configured
|
|
20
20
|
4. **Filters to show only free models by default** — paid models hidden until explicitly toggled on
|
|
@@ -62,6 +62,7 @@ First run creates `~/.pi/free.json` automatically. Add keys there or use environ
|
|
|
62
62
|
```json
|
|
63
63
|
{
|
|
64
64
|
"ollama_api_key": "...",
|
|
65
|
+
"anyapi_api_key": "...",
|
|
65
66
|
"sambanova_api_key": "...",
|
|
66
67
|
"deepinfra_api_key": "..."
|
|
67
68
|
}
|
|
@@ -74,7 +75,7 @@ First run creates `~/.pi/free.json` automatically. Add keys there or use environ
|
|
|
74
75
|
| Category | Providers |
|
|
75
76
|
|---|---|
|
|
76
77
|
| ✅ **Free** | Kilo, Cline, OpenRouter, OpenCode, LLM7, OpenModel, TokenRouter (1 free) |
|
|
77
|
-
| 🔄 **Freemium** | Ollama Cloud, SambaNova
|
|
78
|
+
| 🔄 **Freemium** | AnyAPI, Ollama Cloud, SambaNova |
|
|
78
79
|
| 💳 **Paid** | ZenMux, CrofAI, DeepInfra, Together, Novita, Routeway, b.ai |
|
|
79
80
|
| 🔧 **Dynamic** | Mistral, Groq, Cerebras, xAI, Hugging Face, FastRouter |
|
|
80
81
|
|