@aliou/pi-neuralwatt 0.5.1 → 0.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliou/pi-neuralwatt",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -51,12 +51,10 @@
51
51
  "typescript": "^5.9.3",
52
52
  "vitest": "^4.0.18"
53
53
  },
54
- "peerDependenciesMeta": {
55
- "@earendil-works/pi-coding-agent": {
56
- "optional": true
57
- },
58
- "@earendil-works/pi-tui": {
59
- "optional": true
54
+ "pnpm": {
55
+ "overrides": {
56
+ "@earendil-works/pi-ai": "$@earendil-works/pi-coding-agent",
57
+ "@earendil-works/pi-tui": "$@earendil-works/pi-coding-agent"
60
58
  }
61
59
  },
62
60
  "scripts": {
@@ -68,8 +66,18 @@
68
66
  "gen:schema": "ts-json-schema-generator --path src/config.ts --type NeuralwattConfig --no-type-check -o schema.json",
69
67
  "check:schema": "ts-json-schema-generator --path src/config.ts --type NeuralwattConfig --no-type-check -o /tmp/schema-check.json && diff -q schema.json /tmp/schema-check.json",
70
68
  "check:lockfile": "pnpm install --frozen-lockfile --ignore-scripts",
69
+ "prepare": "[ -d .git ] && husky || true",
71
70
  "changeset": "changeset",
72
71
  "version": "changeset version",
73
72
  "release": "pnpm changeset publish"
73
+ },
74
+ "packageManager": "pnpm@10.26.1",
75
+ "peerDependenciesMeta": {
76
+ "@earendil-works/pi-coding-agent": {
77
+ "optional": true
78
+ },
79
+ "@earendil-works/pi-tui": {
80
+ "optional": true
81
+ }
74
82
  }
75
- }
83
+ }
@@ -4,26 +4,7 @@
4
4
 
5
5
  import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
6
6
 
7
- export const NEURALWATT_MODELS: ProviderModelConfig[] = [
8
- // Devstral Small 2 - Mistral
9
- {
10
- id: "mistralai/Devstral-Small-2-24B-Instruct-2512",
11
- name: "Devstral Small 2",
12
- reasoning: false,
13
- input: ["text", "image"],
14
- cost: {
15
- input: 0.12,
16
- output: 0.35,
17
- cacheRead: 0,
18
- cacheWrite: 0,
19
- },
20
- contextWindow: 262128,
21
- maxTokens: 32768,
22
- compat: {
23
- supportsDeveloperRole: false,
24
- maxTokensField: "max_tokens",
25
- },
26
- },
7
+ const CANONICAL_NEURALWATT_MODELS: ProviderModelConfig[] = [
27
8
  // GLM-5 Fast - ZhipuAI
28
9
  {
29
10
  id: "glm-5-fast",
@@ -37,7 +18,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
37
18
  cacheWrite: 0,
38
19
  },
39
20
  contextWindow: 202736,
40
- maxTokens: 32768,
21
+ maxTokens: 65536,
41
22
  compat: {
42
23
  supportsDeveloperRole: false,
43
24
  maxTokensField: "max_tokens",
@@ -45,7 +26,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
45
26
  },
46
27
  // GLM-5.1 - ZhipuAI
47
28
  {
48
- id: "zai-org/GLM-5.1-FP8",
29
+ id: "glm-5.1",
49
30
  name: "GLM-5.1",
50
31
  reasoning: true,
51
32
  input: ["text"],
@@ -56,7 +37,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
56
37
  cacheWrite: 0,
57
38
  },
58
39
  contextWindow: 202736,
59
- maxTokens: 32768,
40
+ maxTokens: 65536,
60
41
  thinkingLevelMap: {
61
42
  minimal: null,
62
43
  low: null,
@@ -83,39 +64,12 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
83
64
  cacheWrite: 0,
84
65
  },
85
66
  contextWindow: 202736,
86
- maxTokens: 32768,
67
+ maxTokens: 65536,
87
68
  compat: {
88
69
  supportsDeveloperRole: false,
89
70
  maxTokensField: "max_tokens",
90
71
  },
91
72
  },
92
- // GPT-OSS 20B - OpenAI
93
- {
94
- id: "openai/gpt-oss-20b",
95
- name: "GPT-OSS 20B",
96
- reasoning: true,
97
- input: ["text"],
98
- cost: {
99
- input: 0.03,
100
- output: 0.16,
101
- cacheRead: 0,
102
- cacheWrite: 0,
103
- },
104
- contextWindow: 16368,
105
- maxTokens: 4096,
106
- thinkingLevelMap: {
107
- minimal: "low",
108
- low: "low",
109
- medium: "medium",
110
- high: "high",
111
- xhigh: null,
112
- },
113
- compat: {
114
- supportsDeveloperRole: false,
115
- maxTokensField: "max_tokens",
116
- requiresReasoningContentOnAssistantMessages: true,
117
- },
118
- },
119
73
  // Kimi K2.5 - MoonshotAI
120
74
  {
121
75
  id: "moonshotai/Kimi-K2.5",
@@ -164,7 +118,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
164
118
  },
165
119
  // Kimi K2.6 - MoonshotAI
166
120
  {
167
- id: "moonshotai/Kimi-K2.6",
121
+ id: "kimi-k2.6",
168
122
  name: "Kimi K2.6",
169
123
  reasoning: true,
170
124
  input: ["text", "image"],
@@ -208,36 +162,9 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
208
162
  maxTokensField: "max_tokens",
209
163
  },
210
164
  },
211
- // MiniMax M2.5 - MiniMax
212
- {
213
- id: "MiniMaxAI/MiniMax-M2.5",
214
- name: "MiniMax M2.5",
215
- reasoning: true,
216
- input: ["text"],
217
- cost: {
218
- input: 0.35,
219
- output: 1.38,
220
- cacheRead: 0,
221
- cacheWrite: 0,
222
- },
223
- contextWindow: 196592,
224
- maxTokens: 65536,
225
- thinkingLevelMap: {
226
- minimal: null,
227
- low: null,
228
- medium: "medium",
229
- high: null,
230
- xhigh: null,
231
- },
232
- compat: {
233
- supportsDeveloperRole: false,
234
- maxTokensField: "max_tokens",
235
- requiresReasoningContentOnAssistantMessages: true,
236
- },
237
- },
238
165
  // Qwen3.5 397B - Qwen
239
166
  {
240
- id: "Qwen/Qwen3.5-397B-A17B-FP8",
167
+ id: "qwen3.5-397b",
241
168
  name: "Qwen3.5 397B",
242
169
  reasoning: true,
243
170
  input: ["text"],
@@ -283,7 +210,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
283
210
  },
284
211
  // Qwen3.6 35B - Qwen
285
212
  {
286
- id: "Qwen/Qwen3.6-35B-A3B",
213
+ id: "qwen3.6-35b",
287
214
  name: "Qwen3.6 35B",
288
215
  reasoning: true,
289
216
  input: ["text", "image"],
@@ -294,7 +221,7 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
294
221
  cacheWrite: 0,
295
222
  },
296
223
  contextWindow: 131056,
297
- maxTokens: 32768,
224
+ maxTokens: 65536,
298
225
  thinkingLevelMap: {
299
226
  minimal: null,
300
227
  low: null,
@@ -321,10 +248,44 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
321
248
  cacheWrite: 0,
322
249
  },
323
250
  contextWindow: 131056,
324
- maxTokens: 32768,
251
+ maxTokens: 65536,
325
252
  compat: {
326
253
  supportsDeveloperRole: false,
327
254
  maxTokensField: "max_tokens",
328
255
  },
329
256
  },
330
257
  ];
258
+
259
+ const LEGACY_MODEL_ALIAS_MAP = {
260
+ "zai-org/GLM-5.1-FP8": "glm-5.1",
261
+ "moonshotai/Kimi-K2.6": "kimi-k2.6",
262
+ "Qwen/Qwen3.5-397B-A17B-FP8": "qwen3.5-397b",
263
+ "Qwen/Qwen3.6-35B-A3B": "qwen3.6-35b",
264
+ } as const;
265
+
266
+ export const LEGACY_NEURALWATT_MODEL_IDS = new Set<string>(
267
+ Object.keys(LEGACY_MODEL_ALIAS_MAP),
268
+ );
269
+
270
+ const LEGACY_NEURALWATT_MODELS: ProviderModelConfig[] = Object.entries(
271
+ LEGACY_MODEL_ALIAS_MAP,
272
+ ).map(([legacyId, canonicalId]) => {
273
+ const canonical = CANONICAL_NEURALWATT_MODELS.find(
274
+ (model) => model.id === canonicalId,
275
+ );
276
+
277
+ if (!canonical) {
278
+ throw new Error(`Missing canonical model for legacy alias ${legacyId}`);
279
+ }
280
+
281
+ return {
282
+ ...canonical,
283
+ id: legacyId,
284
+ name: `${canonical.name} (legacy ID)`,
285
+ };
286
+ });
287
+
288
+ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
289
+ ...CANONICAL_NEURALWATT_MODELS,
290
+ ...LEGACY_NEURALWATT_MODELS,
291
+ ];