pi-fireworks-provider 1.7.3 → 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/index.ts +9 -1
- package/package.json +17 -11
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/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-fireworks-provider",
|
|
3
|
-
"version": "1.7.
|
|
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",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "echo 'nothing to clean'",
|
|
9
|
+
"build": "echo 'nothing to build'",
|
|
10
|
+
"check": "tsc --noEmit && vitest run && knip --no-gitignore",
|
|
11
|
+
"lint:dead": "knip --no-gitignore",
|
|
12
|
+
"test": "vitest run",
|
|
13
|
+
"test:watch": "vitest",
|
|
14
|
+
"update-models": "node scripts/update-models.js",
|
|
15
|
+
"test:pi": "node scripts/test-pi-compat.mjs"
|
|
16
|
+
},
|
|
7
17
|
"keywords": [
|
|
8
18
|
"pi",
|
|
9
19
|
"extension",
|
|
@@ -33,20 +43,16 @@
|
|
|
33
43
|
"knip": "6.14.1",
|
|
34
44
|
"typescript": "6.0.3",
|
|
35
45
|
"vitest": "4.1.7",
|
|
36
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
46
|
+
"@earendil-works/pi-coding-agent": "0.99.0",
|
|
47
|
+
"@earendil-works/pi-tui": "0.99.0"
|
|
37
48
|
},
|
|
38
49
|
"pi": {
|
|
39
50
|
"extensions": [
|
|
40
51
|
"./index.ts"
|
|
41
52
|
]
|
|
42
53
|
},
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"check": "tsc --noEmit && vitest run && knip --no-gitignore",
|
|
47
|
-
"lint:dead": "knip --no-gitignore",
|
|
48
|
-
"test": "vitest run",
|
|
49
|
-
"test:watch": "vitest",
|
|
50
|
-
"update-models": "node scripts/update-models.js"
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
56
|
+
"@earendil-works/pi-tui": "*"
|
|
51
57
|
}
|
|
52
|
-
}
|
|
58
|
+
}
|