pi-fireworks-provider 1.5.0 → 1.5.2
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 +3 -1
- package/deprecated-models.json +1 -0
- package/index.ts +39 -6
- package/models.json +35 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ _Kimi, MiniMax, GLM, DeepSeek, GPT-OSS — via Fireworks AI's Anthropic Messages
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- **
|
|
18
|
+
- **41+ AI Models** including Kimi K2.5, MiniMax M2.5, GLM 4.5/4.7/5, DeepSeek V3.1/V3.2, DeepSeek V4 Flash, and GPT-OSS
|
|
19
19
|
- **Dual API support** via Fireworks AI's Anthropic Messages and OpenAI-compatible completions endpoints (per-model routing, matching pi core's Fireworks provider)
|
|
20
20
|
- **Service tiers** — toggle Fireworks `priority` vs `standard` per request on supported models (with priority pricing reflected in cost tracking), via a keybinding, `/fireworks-tier`, and a footer status area
|
|
21
21
|
- **Preserved thinking** — toggle Fireworks' `reasoning_history: "preserved"` so prior assistant reasoning is retained across turns (better multi-turn recall; uses more tokens), via the `/fireworks-settings` panel, with a model-select notification. Matches neuralwatt/makora's settings-only UX, adapted to Fireworks' single global `reasoning_history` knob
|
|
@@ -90,6 +90,7 @@ pi
|
|
|
90
90
|
| GLM 5.2 Fast | Text | 1.0M | 131K | $2.10 | $6.60 |
|
|
91
91
|
| GPT OSS 120B | Text | 131K | 33K | $0.15 | $0.60 |
|
|
92
92
|
| GPT OSS 20B | Text | 131K | 33K | $0.07 | $0.30 |
|
|
93
|
+
| Inkling | Text + Image | 1.0M | 0 | Free | Free |
|
|
93
94
|
| Kimi K2 Instruct | Text | 131K | 16K | $1.00 | $3.00 |
|
|
94
95
|
| Kimi K2 Thinking | Text | 262K | 256K | $0.60 | $2.50 |
|
|
95
96
|
| Kimi K2.5 | Text + Image | 262K | 256K | $0.60 | $3.00 |
|
|
@@ -100,6 +101,7 @@ pi
|
|
|
100
101
|
| Kimi K2.6 Turbo | Text + Image | 262K | 262K | $2.00 | $8.00 |
|
|
101
102
|
| Kimi K2.7 Code | Text + Image | 262K | 262K | $0.95 | $4.00 |
|
|
102
103
|
| Kimi K2.7 Code Fast | Text + Image | 262K | 262K | $1.90 | $8.00 |
|
|
104
|
+
| Kimi K3 | Text + Image | 1.0M | 0 | Free | Free |
|
|
103
105
|
| Llama 3.3 70B Instruct | Text | 131K | 0 | Free | Free |
|
|
104
106
|
| MiniMax M2.7 (router) | Text | 204K | 0 | $0.30 | $1.20 |
|
|
105
107
|
| MiniMax-M2.1 | Text | 197K | 200K | $0.30 | $1.20 |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/index.ts
CHANGED
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
import { getAgentDir, type ExtensionAPI, type ModelRegistry } from "@earendil-works/pi-coding-agent";
|
|
29
|
-
import type { Input, matchesKey, Key, truncateToWidth, visibleWidth, wrapTextWithAnsi, fuzzyFilter, SettingsListTheme } from "@earendil-works/pi-tui";
|
|
29
|
+
import type { Input, matchesKey, Key, KeyId, truncateToWidth, visibleWidth, wrapTextWithAnsi, fuzzyFilter, SettingsListTheme } from "@earendil-works/pi-tui";
|
|
30
30
|
import modelsData from "./models.json" with { type: "json" };
|
|
31
31
|
import customModelsData from "./custom-models.json" with { type: "json" };
|
|
32
32
|
import patchData from "./patch.json" with { type: "json" };
|
|
33
|
+
import deprecatedData from "./deprecated-models.json" with { type: "json" };
|
|
33
34
|
import fs from "fs";
|
|
34
35
|
import path from "path";
|
|
35
36
|
|
|
@@ -44,7 +45,7 @@ interface JsonModel {
|
|
|
44
45
|
baseUrl?: string;
|
|
45
46
|
reasoning: boolean;
|
|
46
47
|
thinkingLevelMap?: Record<string, string | null>;
|
|
47
|
-
input:
|
|
48
|
+
input: ("text" | "image")[];
|
|
48
49
|
cost: {
|
|
49
50
|
input: number;
|
|
50
51
|
output: number;
|
|
@@ -64,7 +65,7 @@ interface PatchEntry {
|
|
|
64
65
|
baseUrl?: string;
|
|
65
66
|
reasoning?: boolean;
|
|
66
67
|
thinkingLevelMap?: Record<string, string | null>;
|
|
67
|
-
input?:
|
|
68
|
+
input?: ("text" | "image")[];
|
|
68
69
|
cost?: {
|
|
69
70
|
input?: number;
|
|
70
71
|
output?: number;
|
|
@@ -118,7 +119,10 @@ function applyPatch(model: JsonModel, patch: PatchEntry): JsonModel {
|
|
|
118
119
|
function buildModels(base: JsonModel[], custom: JsonModel[], patch: PatchData): JsonModel[] {
|
|
119
120
|
const modelMap = new Map<string, JsonModel>();
|
|
120
121
|
|
|
121
|
-
|
|
122
|
+
// Seed with the base list plus grace-period deprecated models so patch.json
|
|
123
|
+
// entries apply to deprecated models exactly as while the model was live
|
|
124
|
+
// (withDeprecated keeps live data on id conflicts).
|
|
125
|
+
for (const model of withDeprecated(base)) {
|
|
122
126
|
modelMap.set(model.id, model);
|
|
123
127
|
}
|
|
124
128
|
|
|
@@ -245,6 +249,35 @@ function mergeWithEmbedded(liveModels: JsonModel[], embeddedModels: JsonModel[])
|
|
|
245
249
|
return result;
|
|
246
250
|
}
|
|
247
251
|
|
|
252
|
+
// Grace period for delisted models. When the provider API stops listing a
|
|
253
|
+
// model, update-models.js moves its last-known definition into
|
|
254
|
+
// deprecated-models.json (stamped with deprecatedAt) instead of dropping it.
|
|
255
|
+
// For 14 days the model keeps working here so in-flight sessions and saved
|
|
256
|
+
// model settings do not break; afterwards it is evicted permanently.
|
|
257
|
+
const DEPRECATED_MODEL_TTL_MS = 14 * 24 * 60 * 60 * 1000;
|
|
258
|
+
|
|
259
|
+
// Grace-period deprecated models with deprecation metadata stripped.
|
|
260
|
+
function activeDeprecatedModels(): JsonModel[] {
|
|
261
|
+
const now = Date.now();
|
|
262
|
+
const result: JsonModel[] = [];
|
|
263
|
+
for (const entry of Object.values(deprecatedData as Record<string, JsonModel & { deprecatedAt?: string }>)) {
|
|
264
|
+
if (!entry?.id) continue;
|
|
265
|
+
const removedAt = Date.parse(entry.deprecatedAt ?? "");
|
|
266
|
+
if (Number.isNaN(removedAt) || now - removedAt > DEPRECATED_MODEL_TTL_MS) continue;
|
|
267
|
+
const model = { ...entry } as JsonModel & { deprecatedAt?: string };
|
|
268
|
+
delete model.deprecatedAt;
|
|
269
|
+
result.push(model);
|
|
270
|
+
}
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Append grace-period deprecated models the list does not already have (live data wins).
|
|
275
|
+
function withDeprecated(models: JsonModel[]): JsonModel[] {
|
|
276
|
+
const seen = new Set(models.map((m) => m.id));
|
|
277
|
+
const extras = activeDeprecatedModels().filter((m) => !seen.has(m.id));
|
|
278
|
+
return extras.length > 0 ? [...models, ...extras] : models;
|
|
279
|
+
}
|
|
280
|
+
|
|
248
281
|
function loadStaleModels(embeddedModels: JsonModel[]): JsonModel[] {
|
|
249
282
|
const cached = loadCachedModels();
|
|
250
283
|
if (!cached || cached.length === 0) return embeddedModels;
|
|
@@ -371,7 +404,7 @@ type PreserveMode = boolean; // true = inject reasoning_history:"preserved"; fal
|
|
|
371
404
|
|
|
372
405
|
interface ServiceTierConfig {
|
|
373
406
|
default: ServiceTier;
|
|
374
|
-
keybinding:
|
|
407
|
+
keybinding: KeyId;
|
|
375
408
|
display: "statusbar" | "off";
|
|
376
409
|
}
|
|
377
410
|
|
|
@@ -425,7 +458,7 @@ function isValidTier(v: unknown): v is ServiceTier {
|
|
|
425
458
|
return v === "standard" || v === "priority";
|
|
426
459
|
}
|
|
427
460
|
|
|
428
|
-
function isValidKeybinding(v: unknown): v is
|
|
461
|
+
function isValidKeybinding(v: unknown): v is KeyId {
|
|
429
462
|
return typeof v === "string" && v.length > 0;
|
|
430
463
|
}
|
|
431
464
|
|
package/models.json
CHANGED
|
@@ -191,6 +191,23 @@
|
|
|
191
191
|
"contextWindow": 131072,
|
|
192
192
|
"maxTokens": 0
|
|
193
193
|
},
|
|
194
|
+
{
|
|
195
|
+
"id": "accounts/fireworks/models/inkling",
|
|
196
|
+
"name": "Inkling",
|
|
197
|
+
"reasoning": false,
|
|
198
|
+
"input": [
|
|
199
|
+
"text",
|
|
200
|
+
"image"
|
|
201
|
+
],
|
|
202
|
+
"cost": {
|
|
203
|
+
"input": 0,
|
|
204
|
+
"output": 0,
|
|
205
|
+
"cacheRead": 0,
|
|
206
|
+
"cacheWrite": 0
|
|
207
|
+
},
|
|
208
|
+
"contextWindow": 1048576,
|
|
209
|
+
"maxTokens": 0
|
|
210
|
+
},
|
|
194
211
|
{
|
|
195
212
|
"id": "accounts/fireworks/models/kimi-k2-instruct",
|
|
196
213
|
"name": "Kimi K2 Instruct",
|
|
@@ -274,6 +291,23 @@
|
|
|
274
291
|
"contextWindow": 262144,
|
|
275
292
|
"maxTokens": 0
|
|
276
293
|
},
|
|
294
|
+
{
|
|
295
|
+
"id": "accounts/fireworks/models/kimi-k3",
|
|
296
|
+
"name": "Kimi K3",
|
|
297
|
+
"reasoning": false,
|
|
298
|
+
"input": [
|
|
299
|
+
"text",
|
|
300
|
+
"image"
|
|
301
|
+
],
|
|
302
|
+
"cost": {
|
|
303
|
+
"input": 0,
|
|
304
|
+
"output": 0,
|
|
305
|
+
"cacheRead": 0,
|
|
306
|
+
"cacheWrite": 0
|
|
307
|
+
},
|
|
308
|
+
"contextWindow": 1048576,
|
|
309
|
+
"maxTokens": 0
|
|
310
|
+
},
|
|
277
311
|
{
|
|
278
312
|
"id": "accounts/fireworks/models/llama-v3p3-70b-instruct",
|
|
279
313
|
"name": "Llama 3.3 70B Instruct",
|
|
@@ -343,8 +377,7 @@
|
|
|
343
377
|
"name": "Minimax M3",
|
|
344
378
|
"reasoning": false,
|
|
345
379
|
"input": [
|
|
346
|
-
"text"
|
|
347
|
-
"image"
|
|
380
|
+
"text"
|
|
348
381
|
],
|
|
349
382
|
"cost": {
|
|
350
383
|
"input": 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-fireworks-provider",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Fireworks AI provider extension for pi - Access Kimi, MiniMax, GLM, DeepSeek, and GPT-OSS models through the Fireworks AI API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"index.ts",
|
|
24
24
|
"models.json",
|
|
25
|
+
"deprecated-models.json",
|
|
25
26
|
"custom-models.json",
|
|
26
27
|
"patch.json",
|
|
27
28
|
"README.md",
|