pi-free 2.0.1 → 2.0.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/CHANGELOG.md +179 -3
- package/README.md +495 -393
- package/config.ts +46 -54
- package/constants.ts +6 -0
- package/index.ts +39 -12
- package/lib/built-in-toggle.ts +63 -43
- package/lib/model-enhancer.ts +20 -20
- package/lib/open-browser.ts +1 -1
- package/lib/provider-compat.ts +46 -0
- package/lib/registry.ts +193 -144
- package/lib/toggle-state.ts +86 -0
- package/lib/types.ts +101 -108
- package/package.json +8 -8
- package/provider-failover/benchmark-lookup.ts +637 -247
- package/provider-helper.ts +279 -260
- package/providers/cline/cline-auth.ts +473 -473
- package/providers/cline/cline-models.ts +129 -128
- package/providers/cline/cline.ts +311 -298
- package/providers/crofai/crofai.ts +170 -0
- package/providers/dynamic-built-in/index.ts +259 -308
- package/providers/kilo/kilo-auth.ts +155 -155
- package/providers/kilo/kilo-models.ts +2 -1
- package/providers/kilo/kilo.ts +263 -235
- package/providers/nvidia/nvidia.ts +476 -152
- package/providers/ollama/ollama.ts +130 -7
- package/providers/opencode-session.ts +3 -4
- package/providers/qwen/qwen-models.ts +101 -101
- package/providers/zenmux/zenmux.ts +176 -0
- package/scripts/check-extensions.mjs +64 -55
- package/provider-factory.ts +0 -207
- package/providers/cloudflare/cloudflare.ts +0 -368
- package/providers/modal/modal.ts +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,156 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [2.0.4] - 2026-05-02
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **OpenRouter key resolution no longer falls back to `free.json`** —
|
|
13
|
+
`getOpenrouterApiKey()` now only checks the `OPENROUTER_API_KEY` environment variable.
|
|
14
|
+
Previously it fell back to `~/.pi/free.json`, which could contain stale/revoked keys
|
|
15
|
+
that conflict with pi's built-in OpenRouter provider (which reads from
|
|
16
|
+
`~/.pi/agent/auth.json`).
|
|
17
|
+
|
|
18
|
+
- **Removed `openrouter_api_key` from `PiFreeConfig` interface and config template** —
|
|
19
|
+
Prevents future persistence of OpenRouter keys in `free.json`, eliminating the
|
|
20
|
+
source of stale key conflicts for built-in providers.
|
|
21
|
+
|
|
22
|
+
## [2.0.3] - 2026-05-02
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **Consistent `isFreeModel` helper with Route A/B logic** — Created a unified helper for free model detection that automatically detects whether a provider exposes pricing:
|
|
27
|
+
|
|
28
|
+
- **Route A (pricing-exposed)**: Model is free if `cost === 0` OR `"free"` in name (OR logic)
|
|
29
|
+
- **Route B (non-pricing-exposed)**: Model is free only if `"free"` in name
|
|
30
|
+
- Dynamic detection: If ALL models have cost === 0, assumes pricing not exposed → uses Route B
|
|
31
|
+
- If ANY model has cost > 0, assumes pricing exposed → uses Route A
|
|
32
|
+
- All providers (Cline, Kilo, NVIDIA, Ollama, dynamic built-in) now use this consistent helper
|
|
33
|
+
|
|
34
|
+
- **CrofAI provider (PAID)** — Added new **paid** provider for CrofAI (https://crof.ai), an OpenAI-compatible LLM inference API. **Note: CrofAI is a paid provider** — users must have a CrofAI API key with credits. The provider uses Route B detection (name-only) since CrofAI's API doesn't expose per-model pricing. Only models with `"free"` in their names are marked as free (none currently).
|
|
35
|
+
|
|
36
|
+
- **ZenMux provider (PAID)** — Added new **paid** provider for ZenMux AI gateway (https://zenmux.ai), a unified API for 200+ models from OpenAI, Anthropic, Google, etc. **Note: ZenMux is a paid provider** — users must have a ZenMux API key with credits. The provider uses Route A detection (OR logic) since ZenMux exposes pricing. Models marked as free only if `cost === 0` OR `"free"` in name (2 free models identified: GLM 4.7 Flash Free, GLM 4.6v Flash Free).
|
|
37
|
+
|
|
38
|
+
- **Comprehensive `isFreeModel` test suite** — Added 30+ unit tests covering Route A, Route B, freemium behavior, and edge cases. Tests verify correct classification on actual OpenRouter API data (371 models, 30 free).
|
|
39
|
+
|
|
40
|
+
- **Toggle commands for dynamic built-in providers** — Added `/toggle-mistral`, `/toggle-groq`,
|
|
41
|
+
`/toggle-cerebras`, `/toggle-xai`, and `/toggle-huggingface` commands. These providers were
|
|
42
|
+
registered with the global toggle system but lacked per-provider toggle commands, making
|
|
43
|
+
free/paid switching inaccessible without editing config files.
|
|
44
|
+
|
|
45
|
+
- **Lazy auto-probe for NVIDIA models** — Extracted `runNvidiaProbe()` into a shared function
|
|
46
|
+
called automatically on first `session_start` (once per session). Previously, users had to
|
|
47
|
+
manually run `/probe-nvidia` to discover 404 models. Now broken models are detected and
|
|
48
|
+
auto-hidden on first use.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- **Cline provider now uses `isFreeModel`** — Fixed Cline to use the consistent `isFreeModel` helper instead of `m.cost.input === 0`. Previously used cost-only filtering, now uses proper OR logic for pricing-exposed providers.
|
|
53
|
+
|
|
54
|
+
- **NVIDIA test expectations updated** — Updated tests to reflect strict Route B behavior (name-only detection for non-pricing-exposed providers). Added test for models with `"free"` in name being marked as free.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- **`provider-factory.ts` — `beforeProviderRequest` hook now scoped to owning provider** —
|
|
59
|
+
The hook was firing for **all** provider requests regardless of which provider the factory
|
|
60
|
+
was configuring. Now checks `evt.provider !== def.providerId` and returns early if the
|
|
61
|
+
event doesn't belong to the owning provider.
|
|
62
|
+
|
|
63
|
+
- **`provider-factory.ts` — `reRegister` callback no longer corrupts stored model lists** —
|
|
64
|
+
When toggling between free/paid modes, the callback was overwriting `stored.all` with only
|
|
65
|
+
the filtered subset, losing the original full model list. Now preserves the original model
|
|
66
|
+
lists for correct subsequent toggling.
|
|
67
|
+
|
|
68
|
+
- **`lib/types.ts` — Removed leftover `LspTestInterface`** — Removed a test interface that
|
|
69
|
+
was left in production code.
|
|
70
|
+
|
|
71
|
+
- **`index.ts` — Removed redundant `.catch()` on deprecated Qwen provider** — The `.catch()`
|
|
72
|
+
was unnecessary since `Promise.allSettled` already handles rejections.
|
|
73
|
+
|
|
74
|
+
### Removed
|
|
75
|
+
|
|
76
|
+
- **Qwen provider (deprecated)** — Removed Qwen OAuth provider as the 1,000 req/day free tier is no longer available. Provider remains functional for existing authenticated users but new free tier registrations are not supported.
|
|
77
|
+
|
|
78
|
+
- **Modal provider** — Removed single-model Modal provider (only had GLM-5.1 FP8). Users should use other providers for GLM models.
|
|
79
|
+
|
|
80
|
+
- **Cloudflare provider** — Removed Cloudflare Workers AI provider as it's now built into pi core. Users can use pi's built-in Cloudflare provider instead.
|
|
81
|
+
|
|
82
|
+
- **Qwen test file** — Removed `tests/qwen.test.ts` along with the deprecated provider.
|
|
83
|
+
|
|
84
|
+
## [2.0.2] - 2026-04-26
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- **Model matching debug logging** — Added `~/.pi/modelmatch.log` to diagnose which models get Coding Index scores and which don't:
|
|
89
|
+
|
|
90
|
+
- Logs every matching attempt with provider, model ID, normalization strategy, and result
|
|
91
|
+
- CSV-like format: `timestamp|provider|modelId|modelName|action|strategy|normalizedId|matchKey|codingIndex|details`
|
|
92
|
+
- Provider-specific normalizers for better matching:
|
|
93
|
+
- **NVIDIA**: Strips vendor prefixes (`meta/`, `mistralai/`, `microsoft/`, `qwen/`, etc.)
|
|
94
|
+
- **Cloudflare**: Strips `@cf/namespace/` prefixes
|
|
95
|
+
- **Groq**: Removes `-versatile` and numeric context suffixes (`-32768`)
|
|
96
|
+
- **Cerebras**: Normalizes `llama3.1` → `llama-3.1`, auto-adds `instruct` suffix
|
|
97
|
+
- **Mistral**: Strips `-latest` suffix
|
|
98
|
+
- **Ollama**: Converts `model:tag` → `model-tag`
|
|
99
|
+
- Common suffix stripping: `:free`, date codes (`-20250514`), versions (`-v1.1`), `-it`, `-fp8`/`-bf16`
|
|
100
|
+
|
|
101
|
+
- **Enhanced benchmark lookup** — `enhanceModelNameWithCodingIndex()` now accepts optional `provider` parameter for provider-aware normalization
|
|
102
|
+
|
|
103
|
+
- **Static 404 model blocklist for NVIDIA** — Probed all 136 models from `integrate.api.nvidia.com/v1/models` and identified 57 that return 404 "Function not found" on `/v1/chat/completions`. These are now hard-filtered so they never appear in the model selector:
|
|
104
|
+
|
|
105
|
+
- Covers discontinued models (`databricks/dbrx-instruct`, `meta/codellama-70b`, `meta/llama2-70b`, `ibm/granite-*`, etc.)
|
|
106
|
+
- Covers embedding-only models listed as chat-capable (`nvidia/nv-embed-v1`, `nvidia/nv-embedqa-*`, `snowflake/arctic-embed-l`, etc.)
|
|
107
|
+
- Covers stale API catalog entries (`mistralai/mistral-large`, `mistralai/mistral-large-2-instruct`, `writer/palmyra-*`, etc.)
|
|
108
|
+
- Full list in `NVIDIA_KNOWN_404_MODELS` in `providers/nvidia/nvidia.ts`
|
|
109
|
+
|
|
110
|
+
- **`/probe-nvidia` command** — On-demand model health check. Tests every registered NVIDIA model with a minimal `max_tokens: 1` request, auto-hides any new 404s in `~/.pi/free.json`, and re-registers the provider immediately.
|
|
111
|
+
|
|
112
|
+
- **`scripts/probe-nvidia.mjs`** — Standalone Node.js script to reproduce the probe. Reads `~/.pi/free.json` for the API key, batches 20 requests at a time with 10s timeout, and prints all broken model IDs for adding to the blocklist.
|
|
113
|
+
|
|
114
|
+
- **Ollama Cloud 403 handling** — Same pattern as NVIDIA 404s for Ollama Cloud:
|
|
115
|
+
|
|
116
|
+
- `OLLAMA_KNOWN_403_MODELS` blocklist for models that return 403 "access denied"
|
|
117
|
+
- `/probe-ollama` command to test all models on-demand, auto-hide broken ones, and re-register
|
|
118
|
+
- `scripts/probe-ollama.mjs` standalone script for blocklist maintenance
|
|
119
|
+
|
|
120
|
+
- **Provider-scoped hidden models** — Hidden models are now provider-specific:
|
|
121
|
+
- Format: `"provider/model-id"` (e.g., `"ollama/kimi-k2.6"`, `"nvidia/broken-model"`)
|
|
122
|
+
- A model hidden from one provider doesn't hide it from other providers
|
|
123
|
+
- Backward compatible with old global `"model-id"` format
|
|
124
|
+
- All providers updated: NVIDIA, Ollama, Cloudflare, Cline, Kilo, Modal
|
|
125
|
+
|
|
126
|
+
### Fixed
|
|
127
|
+
|
|
128
|
+
- **Probe commands timeout handling** — Added `fetchWithTimeout` with 10-second timeout to `/probe-nvidia` and `/probe-ollama` commands. Prevents the coding harness from freezing when individual model probe requests hang indefinitely.
|
|
129
|
+
|
|
130
|
+
- **NVIDIA provider now sends `authHeader: true`** — Explicitly enables `Authorization: Bearer` header injection. Previously relied on pi's implicit behavior which could fail in some configurations.
|
|
131
|
+
|
|
132
|
+
### Removed
|
|
133
|
+
|
|
134
|
+
- **NVIDIA 404 model warning log** — Removed the `console.warn("[nvidia] Skipping known 404 model: ...")` output when filtering out known broken models. The filter still works silently; use `/probe-nvidia` to identify new 404s if needed.
|
|
135
|
+
|
|
136
|
+
### Changed
|
|
137
|
+
|
|
138
|
+
- **Cloudflare provider now fetches models dynamically** — Replaced static 19-model hardcoded list with live API fetch from `api.cloudflare.com/client/v4/accounts/{account_id}/ai/models`:
|
|
139
|
+
|
|
140
|
+
- Automatically discovers all 30+ text generation models (was manually maintaining 19)
|
|
141
|
+
- Smart filtering excludes embeddings, image generation, speech, translation, and vision-only models via regex patterns
|
|
142
|
+
- Metadata inference from model IDs: detects vision (`vision`/`multimodal`), reasoning (`r1`/`thinking`/`qwq`), context windows, and estimated costs
|
|
143
|
+
- Fixed Mistral Small ID: changed from incorrect `@cf/mistralai/...` to correct `@cf/mistral/...`
|
|
144
|
+
- Added new fallback models: Kimi K2.6, OpenAI GPT-OSS 120B/20B, Qwen 2.5 Coder 32B, QwQ 32B, Llama 3.2 11B Vision
|
|
145
|
+
- Graceful fallback to expanded 18-model hardcoded list if API fetch fails
|
|
146
|
+
|
|
147
|
+
- **NVIDIA provider now queries NVIDIA's API directly** — Source of truth switched from `models.dev` curated JSON to `https://integrate.api.nvidia.com/v1/models`:
|
|
148
|
+
- Eliminates 57 missing models and 25 stale entries from the old third-party source
|
|
149
|
+
- Models not in `models.dev` get inferred metadata (128k context, 4k output, vision/reasoning heuristics)
|
|
150
|
+
- Added regex-based non-chat model filtering for unknown models (embeddings, whisper, reward models, safety guards, parsers, detectors, etc.)
|
|
151
|
+
- Graceful fallback to `models.dev` if NVIDIA API is unreachable
|
|
152
|
+
- Removed paid/free toggle filtering — NVIDIA is freemium (all models use free credits)
|
|
9
153
|
|
|
10
154
|
## [2.0.1] - 2026-04-24
|
|
11
155
|
|
|
12
156
|
### Added
|
|
157
|
+
|
|
13
158
|
- **Built-in provider toggle support** (`lib/built-in-toggle.ts`) — Enables free/paid filtering for Pi's built-in providers that expose per-model pricing:
|
|
14
159
|
- **OpenCode (`/toggle-opencode`)** — Captures built-in OpenCode models on session start and filters to free-only by default
|
|
15
160
|
- **OpenRouter (`/toggle-openrouter`)** — Now uses the built-in toggle system for consistency
|
|
@@ -17,7 +162,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
162
|
- Persisted via `opencode_show_paid` and `openrouter_show_paid` in `~/.pi/free.json`
|
|
18
163
|
|
|
19
164
|
### Changed
|
|
165
|
+
|
|
20
166
|
- **OpenRouter moved to built-in toggle system** — OpenRouter is now handled by `lib/built-in-toggle.ts` alongside OpenCode for a unified approach:
|
|
167
|
+
|
|
21
168
|
- Removed from `providers/dynamic-built-in/index.ts`
|
|
22
169
|
- Eliminated duplicate toggle command registration logic
|
|
23
170
|
- Consolidated toggle persistence with other built-in providers
|
|
@@ -35,17 +182,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
35
182
|
- `/toggle-opencode` (new)
|
|
36
183
|
|
|
37
184
|
### Fixed
|
|
185
|
+
|
|
38
186
|
- **Ollama Cloud model fetching endpoint** — Corrected the `/v1/models` → `/models` endpoint path in `providers/ollama/ollama.ts`:
|
|
39
187
|
- The previous fix (2.0.0) incorrectly used `/v1/models`; Ollama Cloud's models endpoint is `/v1/models` for chat completions but `/models` for listing
|
|
40
188
|
- This ensures model fetching works correctly with the OpenAI-compatible API
|
|
41
189
|
|
|
42
190
|
### Removed
|
|
191
|
+
|
|
43
192
|
- **Global `/free` command** — Removed the global free-only toggle. Per-provider toggles (`/toggle-{provider}`) are now the only way to switch between free and paid models. The `/free-providers` status command remains.
|
|
44
193
|
|
|
45
194
|
## [2.0.0] - 2026-04-23
|
|
46
195
|
|
|
47
196
|
### Breaking Changes
|
|
197
|
+
|
|
48
198
|
- **Removed Fireworks provider** — Fireworks is now a built-in Pi provider (added in pi 0.68.1), so the extension's Fireworks provider has been removed to avoid conflicts:
|
|
199
|
+
|
|
49
200
|
- Deleted `providers/fireworks/fireworks.ts` and `tests/fireworks.test.ts`
|
|
50
201
|
- Removed all Fireworks configuration options from `config.ts` (`fireworks_api_key`, `fireworks_show_paid`)
|
|
51
202
|
- Users should now use Pi's built-in Fireworks support with `FIREWORKS_API_KEY`
|
|
@@ -55,16 +206,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
55
206
|
- All log messages and documentation now reference "Ollama Cloud"
|
|
56
207
|
|
|
57
208
|
### Removed
|
|
209
|
+
|
|
58
210
|
- **Dropped `@sinclair/typebox` peer dependency** — Pi 0.69.0 migrated from `@sinclair/typebox` to `typebox` 1.x. The extension didn't directly import this package, so it was removed from `peerDependencies` to avoid potential conflicts.
|
|
59
211
|
|
|
60
212
|
### Fixed
|
|
213
|
+
|
|
61
214
|
- **Ollama Cloud API endpoint** — Fixed broken Ollama Cloud integration:
|
|
62
215
|
- Changed `BASE_URL_OLLAMA` from `https://ollama.com` to `https://ollama.com/v1` — the OpenAI-compatible API endpoint
|
|
63
216
|
- Fixed model fetching to use `/v1/models` instead of `/api/tags` — ensures model IDs work with chat completions endpoint
|
|
64
217
|
- Previously calls went to HTML homepage instead of API endpoints, causing 404 errors
|
|
65
218
|
|
|
66
219
|
### Removed
|
|
220
|
+
|
|
67
221
|
- **Removed paid model warning on selection** — Deleted the `model_select` event handler that showed:
|
|
222
|
+
|
|
68
223
|
- `⚠️ Paid model selected (${model.id}). Use "/free off" to enable paid models.`
|
|
69
224
|
- This warning was redundant since the global `/free` toggle and provider toggles already control model visibility
|
|
70
225
|
|
|
@@ -73,13 +228,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
73
228
|
- Modal provider now sets `skipToggle: true` to prevent toggle command creation
|
|
74
229
|
|
|
75
230
|
### Changed
|
|
231
|
+
|
|
76
232
|
- **Marked Qwen provider as fully deprecated** — Updated messaging to clarify the provider is broken:
|
|
77
233
|
- Changed model name from `"Qwen Coder — Free 1k/day"` to `"Qwen Coder — DEPRECATED (free tier discontinued)"`
|
|
78
234
|
- Updated all JSDoc comments to clearly state auth is broken and free tier is no longer available
|
|
79
235
|
- Provider remains for backward compatibility but should not be used
|
|
80
236
|
|
|
81
237
|
### Added
|
|
238
|
+
|
|
82
239
|
- **Cloudflare Workers AI provider** — New provider for Cloudflare's serverless GPU platform:
|
|
240
|
+
|
|
83
241
|
- 50+ open-source models: Llama 4, Mistral Small 3.1, Qwen 2.5/3, DeepSeek R1, Gemma 4, Kimi K2.5/2.6, and more
|
|
84
242
|
- **10,000 Neurons/day FREE tier** (resets daily at 00:00 UTC)
|
|
85
243
|
- **$0.011 per 1,000 Neurons** beyond free allocation
|
|
@@ -88,6 +246,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
88
246
|
- Create token at https://dash.cloudflare.com/profile/api-tokens
|
|
89
247
|
|
|
90
248
|
- **Unified dynamic built-in providers module** — New `providers/dynamic-built-in/` module that dynamically fetches models from Pi's built-in providers when users have API keys:
|
|
249
|
+
|
|
91
250
|
- **Mistral** (`MISTRAL_API_KEY`) — Fetches from `api.mistral.ai/v1/models`
|
|
92
251
|
- **Groq** (`GROQ_API_KEY`) — Fetches from `api.groq.com/openai/v1/models`
|
|
93
252
|
- **Cerebras** (`CEREBRAS_API_KEY`) — Fetches from `api.cerebras.ai/v1/models`
|
|
@@ -103,12 +262,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
103
262
|
- Providers register via `registerWithGlobalToggle()` for unified filtering
|
|
104
263
|
|
|
105
264
|
### Fixed
|
|
265
|
+
|
|
106
266
|
- **Toggle commands now actually filter models from UI** — Previously, toggle commands only showed notifications but didn't remove paid models from the model picker:
|
|
107
267
|
- **OpenRouter (`/openrouter-toggle`)**: Now uses `registerProvider`/`unregisterProvider` to actually filter models from the picker UI
|
|
108
268
|
- **NVIDIA (`/nvidia-toggle`)**: Added dynamic `showPaid` parameter to `fetchNvidiaModels()` so toggle properly switches between free and paid model sets
|
|
109
269
|
- **Fireworks**: Removed broken toggle command — all models are paid with no free tier, so there was nothing to toggle
|
|
110
270
|
|
|
111
271
|
### Added
|
|
272
|
+
|
|
112
273
|
- **OpenRouter per-provider free model toggle** — Added `/openrouter-toggle` command for the built-in OpenRouter provider:
|
|
113
274
|
- `/openrouter-toggle` — Switch between showing only free models vs all models (including paid)
|
|
114
275
|
- New config flag `openrouter_show_paid` in `~/.pi/free.json` (default: `false`)
|
|
@@ -116,6 +277,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
116
277
|
- This brings OpenRouter (a built-in pi provider) in line with extension providers that have per-provider toggles
|
|
117
278
|
|
|
118
279
|
### Deprecated
|
|
280
|
+
|
|
119
281
|
- **Qwen provider** — The 1,000 requests/day free tier is no longer available from Qwen/DashScope. The provider code remains for backward compatibility but is now deprecated:
|
|
120
282
|
- Added `@deprecated` JSDoc tags to all Qwen-related exports
|
|
121
283
|
- Added deprecation warning when Qwen provider loads
|
|
@@ -123,11 +285,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
123
285
|
- Consider migrating to other free providers: Kilo, Cline, NVIDIA, or Modal
|
|
124
286
|
|
|
125
287
|
### Added
|
|
288
|
+
|
|
126
289
|
- **Go provider** — OpenCode Go subscription gateway (⚠️ paid only — $5 first month, then $10/month, no free tier) with models: GLM-5, Kimi K2.5, MiMo-V2-Pro, MiMo-V2-Omni, MiniMax M2.7, MiniMax M2.5
|
|
127
290
|
- Set `OPENCODE_GO_API_KEY` or `opencode_go_api_key` in `~/.pi/free.json`
|
|
128
291
|
- Toggle with `/go-toggle`
|
|
129
292
|
|
|
130
293
|
### Fixed
|
|
294
|
+
|
|
131
295
|
- **All providers now show Coding Index scores in model selector** — Added `enhanceWithCI()` to factory-based providers (nvidia, fireworks, mistral, modal, ollama) and cline. Now all providers display CI scores in `/models` command (pi-models extension).
|
|
132
296
|
|
|
133
297
|
- **All providers now show in `--list-models`** — Providers (zen, openrouter, go) that registered models only in `session_start` were missing from `pi --list-models` which runs before session starts. Added immediate registration for these providers:
|
|
@@ -137,22 +301,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
137
301
|
- All 11 providers now visible in `--list-models`
|
|
138
302
|
|
|
139
303
|
### Changed
|
|
304
|
+
|
|
140
305
|
- Updated README with clear free vs paid provider distinction (9 free + 2 paid-only: Go, Fireworks)
|
|
141
306
|
- Added Go and Fireworks provider documentation under new "💳 Paid-Only Providers" section
|
|
142
307
|
- Added `opencode_go_api_key` to config file template
|
|
143
308
|
- Updated package.json description and keywords to include all 11 providers
|
|
144
309
|
|
|
145
310
|
### Added
|
|
311
|
+
|
|
146
312
|
- **Provider model cache** (`lib/provider-cache.ts`) — New utility for caching provider model lists to `~/.pi/provider-cache.json`. Used by zen provider for faster startup and offline access after first successful fetch.
|
|
147
313
|
|
|
148
314
|
## [1.0.9] - 2026-04-14
|
|
149
315
|
|
|
150
316
|
### Fixed
|
|
317
|
+
|
|
151
318
|
- **Qwen OAuth breaks other OAuth providers** — `modifyModels` receives all models across every registered provider, not just Qwen's. The previous `map()` stamped the Qwen dashscope `baseUrl` onto every model, causing other OAuth providers (Kilo, OpenRouter, etc.) to return 404 after a `/login qwen` flow. Now only models with `provider === PROVIDER_QWEN` are patched; others pass through unchanged.
|
|
152
319
|
|
|
153
320
|
## [1.0.8] - 2026-04-13
|
|
154
321
|
|
|
155
322
|
### Added
|
|
323
|
+
|
|
156
324
|
- **Modal provider** — Free access to GLM-5.1 FP8 (128k context, 16k max output) during promotional period (free until April 30, 2026)
|
|
157
325
|
- Requires a free Modal API key (`MODAL_API_KEY` or `modal_api_key` in `~/.pi/free.json`)
|
|
158
326
|
- Model: `zai-org/GLM-5.1-FP8` — 128k context window, 16k max output tokens
|
|
@@ -162,6 +330,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
162
330
|
- 131k context window, 16k max output tokens, zero cost
|
|
163
331
|
|
|
164
332
|
### Fixed
|
|
333
|
+
|
|
165
334
|
- **Qwen OAuth browser launch on Windows** — URLs with `&` query params were truncated by `cmd.exe`'s `&` command separator; switched to `powershell.exe Start-Process` which passes the URL as a literal string
|
|
166
335
|
- **Qwen API endpoint** — Replicates qwen-code's `getCurrentEndpoint()` logic: uses `resource_url` from OAuth token response (`dashscope.aliyuncs.com` for Chinese accounts, `portal.qwen.ai` for international), with fallback to `dashscope.aliyuncs.com/compatible-mode/v1`
|
|
167
336
|
- **Qwen DashScope headers** — Added all headers required by DashScope's OpenAI-compatible API: `X-DashScope-AuthType: qwen-oauth`, `X-DashScope-CacheControl: enable`, `X-DashScope-UserAgent`, `Client-Code: QwenCode`
|
|
@@ -170,6 +339,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
170
339
|
## [1.0.5] - 2025-04-03
|
|
171
340
|
|
|
172
341
|
### Fixed
|
|
342
|
+
|
|
173
343
|
- **NVIDIA provider non-chat model filtering** (comment/implementation mismatch)
|
|
174
344
|
- Added modalities-based filtering to exclude embedding, speech-to-text, OCR, and image-gen models
|
|
175
345
|
- Filters models where `output` is not `["text"]` (e.g., image generation like `black-forest-labs/flux.1-dev`)
|
|
@@ -180,6 +350,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
180
350
|
## [1.0.4] - 2025-04-03
|
|
181
351
|
|
|
182
352
|
### Fixed
|
|
353
|
+
|
|
183
354
|
- **All tests now passing** (127/127)
|
|
184
355
|
- Fixed mock paths in kilo.test.ts, zen.test.ts, ollama.test.ts
|
|
185
356
|
- Fixed createCtxReRegister mocks in zen.test.ts and openrouter.test.ts
|
|
@@ -187,6 +358,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
187
358
|
- Added missing DEFAULT_MIN_SIZE_B constant to openrouter mock
|
|
188
359
|
|
|
189
360
|
### Changed
|
|
361
|
+
|
|
190
362
|
- **Code quality improvements**
|
|
191
363
|
- Refactored usage modules to break circular dependency (limits.ts ↔ formatters.ts)
|
|
192
364
|
- Created usage/types.ts with shared interfaces (FreeTierLimit, FreeTierUsage)
|
|
@@ -195,12 +367,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
195
367
|
## [1.0.3] - 2025-04-03
|
|
196
368
|
|
|
197
369
|
### Changed
|
|
370
|
+
|
|
198
371
|
- Updated package.json metadata (name, description, keywords, repository URL)
|
|
199
372
|
- Updated .npmignore for cleaner publishes
|
|
200
373
|
|
|
201
374
|
## [1.0.0] - 2024-03-28
|
|
202
375
|
|
|
203
376
|
### Added
|
|
377
|
+
|
|
204
378
|
- Initial release with 6 providers: Kilo, Zen, OpenRouter, NVIDIA, Cline, Fireworks
|
|
205
379
|
- Free tier usage tracking across all sessions
|
|
206
380
|
- Provider failover with model hopping
|
|
@@ -210,12 +384,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
210
384
|
- Hardcoded benchmark data from Artificial Analysis
|
|
211
385
|
|
|
212
386
|
### Changed
|
|
213
|
-
|
|
387
|
+
|
|
388
|
+
- **Major refactoring**: Split free-tier-limits.ts into usage/\* modules
|
|
214
389
|
- usage/tracking.ts - runtime session tracking
|
|
215
390
|
- usage/cumulative.ts - persistent storage
|
|
216
391
|
- usage/formatters.ts - display formatting
|
|
217
392
|
- 77% line reduction (741 → 166 lines)
|
|
218
|
-
- **Major refactoring**: Split usage-widget.ts into widget
|
|
393
|
+
- **Major refactoring**: Split usage-widget.ts into widget/\* modules
|
|
219
394
|
- widget/data.ts - data collection
|
|
220
395
|
- widget/format.ts - formatting utilities
|
|
221
396
|
- widget/render.ts - HTML generation
|
|
@@ -240,6 +415,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
240
415
|
- Added resetUsageStats() for test isolation
|
|
241
416
|
|
|
242
417
|
### Fixed
|
|
418
|
+
|
|
243
419
|
- fetchWithRetry() now properly throws after exhausting retries
|
|
244
420
|
- Auth error pattern matching now handles more message variants
|
|
245
421
|
- Test isolation for free-tier-limits tests
|