pi-fireworks-provider 1.7.2 → 1.7.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
@@ -15,7 +15,7 @@ _Kimi, MiniMax, GLM, DeepSeek, GPT-OSS — via Fireworks AI's Anthropic Messages
15
15
 
16
16
  ## Features
17
17
 
18
- - **52+ 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
18
+ - **53+ 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. Applied only on models whose documented support includes `"preserved"` (Kimi K2.6/K2.7, GLM 5.2/4.7, …); interleaved-only models like DeepSeek V4 and MiniMax M2 keep their default. Matches neuralwatt/makora's settings-only UX, adapted to Fireworks' global `reasoning_history` knob
@@ -81,6 +81,7 @@ pi
81
81
  | DeepSeek V4 Pro (router) | Text | 1.0M | 384K | $1.74 | $3.48 |
82
82
  | DeepSeek V4 Pro 0813 | Text | 1.0M | 384K | $1.32 | $3.96 |
83
83
  | DeepSeek V4.1 Flash | Text + Image | 1.0M | 384K | $0.22 | $0.66 |
84
+ | Ember-1 | Text + Image | 1.0M | 0 | — | — |
84
85
  | Gemma 4 26B A4B IT | Text + Image | 262K | 33K | — | — |
85
86
  | Gemma 4 31B IT | Text + Image | 262K | 33K | — | — |
86
87
  | GLM 4.5 | Text | 131K | 131K | $0.55 | $2.19 |
package/index.ts CHANGED
@@ -147,7 +147,15 @@ function buildModels(base: JsonModel[], custom: JsonModel[], patch: PatchData):
147
147
  }
148
148
  }
149
149
 
150
- return Array.from(modelMap.values());
150
+ return Array.from(modelMap.values()).map((model) => {
151
+ // The catalog uses zero for unknown limits. Treat that as missing metadata,
152
+ // using Pi's model defaults rather than sending an unusable zero-token cap.
153
+ const contextWindow = Number.isFinite(model.contextWindow) && model.contextWindow > 0
154
+ ? model.contextWindow : 128000;
155
+ const maxTokens = Number.isFinite(model.maxTokens) && model.maxTokens > 0
156
+ ? model.maxTokens : Math.min(contextWindow, 16384);
157
+ return { ...model, contextWindow, maxTokens };
158
+ });
151
159
  }
152
160
 
153
161
  // ─── Stale-While-Revalidate Model Sync ────────────────────────────────────────
package/models.json CHANGED
@@ -129,6 +129,23 @@
129
129
  "contextWindow": 1048576,
130
130
  "maxTokens": 0
131
131
  },
132
+ {
133
+ "id": "accounts/fireworks/models/ember-1",
134
+ "name": "Ember-1",
135
+ "reasoning": false,
136
+ "input": [
137
+ "text",
138
+ "image"
139
+ ],
140
+ "cost": {
141
+ "input": 0,
142
+ "output": 0,
143
+ "cacheRead": 0,
144
+ "cacheWrite": 0
145
+ },
146
+ "contextWindow": 1048576,
147
+ "maxTokens": 0
148
+ },
132
149
  {
133
150
  "id": "accounts/fireworks/models/glm-4p5",
134
151
  "name": "GLM-4.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-fireworks-provider",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
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",
@@ -11,7 +11,8 @@
11
11
  "lint:dead": "knip --no-gitignore",
12
12
  "test": "vitest run",
13
13
  "test:watch": "vitest",
14
- "update-models": "node scripts/update-models.js"
14
+ "update-models": "node scripts/update-models.js",
15
+ "test:pi": "node scripts/test-pi-compat.mjs"
15
16
  },
16
17
  "keywords": [
17
18
  "pi",
@@ -42,11 +43,16 @@
42
43
  "knip": "6.14.1",
43
44
  "typescript": "6.0.3",
44
45
  "vitest": "4.1.7",
45
- "@earendil-works/pi-coding-agent": "0.87.0"
46
+ "@earendil-works/pi-coding-agent": "0.99.0",
47
+ "@earendil-works/pi-tui": "0.99.0"
46
48
  },
47
49
  "pi": {
48
50
  "extensions": [
49
51
  "./index.ts"
50
52
  ]
53
+ },
54
+ "peerDependencies": {
55
+ "@earendil-works/pi-coding-agent": "*",
56
+ "@earendil-works/pi-tui": "*"
51
57
  }
52
58
  }