@aliou/pi-neuralwatt 0.9.0 → 0.10.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.
|
@@ -3,6 +3,11 @@ import { fetchNeuralwattModels } from "../../../src/lib/neuralwatt-api";
|
|
|
3
3
|
import type { NeuralwattApiModel } from "../../../src/types/models-api";
|
|
4
4
|
import { NEURALWATT_MODELS } from "./public-models";
|
|
5
5
|
|
|
6
|
+
// Hidden aliases that work for authorized accounts but are omitted from the
|
|
7
|
+
// authenticated /v1/models response. Keep these gated by includeHiddenModels.
|
|
8
|
+
// Move an entry to public-models.ts once Neuralwatt advertises it publicly.
|
|
9
|
+
export const HIDDEN_NEURALWATT_MODELS: ProviderModelConfig[] = [];
|
|
10
|
+
|
|
6
11
|
// Per-ID overrides for known hidden models. The authenticated /v1/models endpoint
|
|
7
12
|
// exposes pricing and capabilities, but some Pi-specific behavior (thinking levels,
|
|
8
13
|
// compat flags) has to be supplied by hand.
|
|
@@ -2,7 +2,7 @@ import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
|
2
2
|
import { buildLegacyNeuralwattModels } from "./legacy";
|
|
3
3
|
import { NEURALWATT_MODELS } from "./public-models";
|
|
4
4
|
|
|
5
|
-
export { loadHiddenModels } from "./hidden";
|
|
5
|
+
export { HIDDEN_NEURALWATT_MODELS, loadHiddenModels } from "./hidden";
|
|
6
6
|
export {
|
|
7
7
|
buildLegacyNeuralwattModels,
|
|
8
8
|
LEGACY_MODEL_ALIAS_MAP,
|
|
@@ -3,7 +3,29 @@ import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
|
3
3
|
// Public models returned by https://api.neuralwatt.com/v1/models (unauthenticated view).
|
|
4
4
|
// Pricing, capabilities, and limits are sourced from the API metadata fields.
|
|
5
5
|
export const NEURALWATT_MODELS: ProviderModelConfig[] = [
|
|
6
|
+
// Gemma 4 31B - Google, served from NVIDIA's NVFP4 checkpoint
|
|
7
|
+
{
|
|
8
|
+
id: "gemma-4-31b",
|
|
9
|
+
name: "Gemma 4 31B",
|
|
10
|
+
reasoning: false,
|
|
11
|
+
input: ["text", "image"],
|
|
12
|
+
cost: {
|
|
13
|
+
input: 0.144,
|
|
14
|
+
output: 0.42,
|
|
15
|
+
cacheRead: 0.036,
|
|
16
|
+
cacheWrite: 0,
|
|
17
|
+
},
|
|
18
|
+
contextWindow: 262128,
|
|
19
|
+
maxTokens: 16384,
|
|
20
|
+
compat: {
|
|
21
|
+
supportsDeveloperRole: false,
|
|
22
|
+
maxTokensField: "max_tokens",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
6
25
|
// GLM-5.2 - ZhipuAI
|
|
26
|
+
// Native reasoning tiers: off (none), high, max. Exposes Pi's `max` level
|
|
27
|
+
// (introduced in Pi 0.80.6) for GLM's top tier; `xhigh` is an unsupported
|
|
28
|
+
// hole between `high` and `max`.
|
|
7
29
|
{
|
|
8
30
|
id: "glm-5.2",
|
|
9
31
|
name: "GLM-5.2",
|
|
@@ -23,7 +45,8 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
|
|
|
23
45
|
low: null,
|
|
24
46
|
medium: null,
|
|
25
47
|
high: "high",
|
|
26
|
-
xhigh:
|
|
48
|
+
xhigh: null,
|
|
49
|
+
max: "max",
|
|
27
50
|
},
|
|
28
51
|
compat: {
|
|
29
52
|
supportsDeveloperRole: false,
|
|
@@ -70,7 +93,8 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
|
|
|
70
93
|
low: null,
|
|
71
94
|
medium: null,
|
|
72
95
|
high: "high",
|
|
73
|
-
xhigh:
|
|
96
|
+
xhigh: null,
|
|
97
|
+
max: "max",
|
|
74
98
|
},
|
|
75
99
|
compat: {
|
|
76
100
|
supportsDeveloperRole: false,
|
|
@@ -283,7 +307,8 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
|
|
|
283
307
|
low: null,
|
|
284
308
|
medium: null,
|
|
285
309
|
high: "high",
|
|
286
|
-
xhigh:
|
|
310
|
+
xhigh: null,
|
|
311
|
+
max: "max",
|
|
287
312
|
},
|
|
288
313
|
compat: {
|
|
289
314
|
supportsDeveloperRole: false,
|
|
@@ -366,7 +391,8 @@ export const NEURALWATT_MODELS: ProviderModelConfig[] = [
|
|
|
366
391
|
low: null,
|
|
367
392
|
medium: null,
|
|
368
393
|
high: "high",
|
|
369
|
-
xhigh:
|
|
394
|
+
xhigh: null,
|
|
395
|
+
max: "max",
|
|
370
396
|
},
|
|
371
397
|
compat: {
|
|
372
398
|
supportsDeveloperRole: false,
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
RefreshModelsContext,
|
|
6
6
|
} from "@earendil-works/pi-ai";
|
|
7
7
|
import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
8
|
-
import { loadHiddenModels } from "./hidden";
|
|
8
|
+
import { HIDDEN_NEURALWATT_MODELS, loadHiddenModels } from "./hidden";
|
|
9
9
|
import { buildLegacyNeuralwattModels } from "./legacy";
|
|
10
10
|
import { NEURALWATT_MODELS } from "./public-models";
|
|
11
11
|
|
|
@@ -67,6 +67,22 @@ function dedupeHiddenModels(
|
|
|
67
67
|
return hiddenModels.filter((model) => !baselineIds.has(model.id));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
function configuredHiddenModels(
|
|
71
|
+
discoveredModels: ProviderModelConfig[],
|
|
72
|
+
baselineModels: ProviderModelConfig[],
|
|
73
|
+
): ProviderModelConfig[] {
|
|
74
|
+
const hardcodedIds = new Set(
|
|
75
|
+
HIDDEN_NEURALWATT_MODELS.map((model) => model.id),
|
|
76
|
+
);
|
|
77
|
+
return dedupeHiddenModels(
|
|
78
|
+
[
|
|
79
|
+
...HIDDEN_NEURALWATT_MODELS,
|
|
80
|
+
...discoveredModels.filter((model) => !hardcodedIds.has(model.id)),
|
|
81
|
+
],
|
|
82
|
+
baselineModels,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
70
86
|
function cachedHiddenModels(
|
|
71
87
|
stored: ModelsStoreEntry | undefined,
|
|
72
88
|
): ProviderModelConfig[] {
|
|
@@ -104,7 +120,10 @@ export async function refreshNeuralwattModels(
|
|
|
104
120
|
return baseline;
|
|
105
121
|
}
|
|
106
122
|
|
|
107
|
-
const cachedHidden =
|
|
123
|
+
const cachedHidden = configuredHiddenModels(
|
|
124
|
+
cachedHiddenModels(stored),
|
|
125
|
+
baseline,
|
|
126
|
+
);
|
|
108
127
|
const cachedCatalog = [...baseline, ...cachedHidden];
|
|
109
128
|
|
|
110
129
|
if (!context.allowNetwork || context.signal?.aborted) {
|
|
@@ -124,7 +143,7 @@ export async function refreshNeuralwattModels(
|
|
|
124
143
|
throw new Error("Neuralwatt model catalog refresh failed");
|
|
125
144
|
}
|
|
126
145
|
|
|
127
|
-
const catalog = [...baseline, ...
|
|
146
|
+
const catalog = [...baseline, ...configuredHiddenModels(hidden, baseline)];
|
|
128
147
|
await persistModels(context, catalog);
|
|
129
148
|
return catalog;
|
|
130
149
|
}
|