@juspay/neurolink 12.32.3 → 12.34.0
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/CHANGELOG.md +6 -2
- package/dist/adapters/providerImageAdapter.js +13 -0
- package/dist/browser/neurolink.min.js +19 -19
- package/dist/constants/contextWindows.js +28 -0
- package/dist/constants/enums.d.ts +21 -0
- package/dist/constants/enums.js +30 -0
- package/dist/constants/tokens.d.ts +3 -0
- package/dist/constants/tokens.js +3 -0
- package/dist/evaluation/EvaluatorFactory.js +3 -3
- package/dist/evaluation/EvaluatorRegistry.js +1 -1
- package/dist/evaluation/ragasEvaluator.js +1 -1
- package/dist/middleware/utils/guardrailsUtils.js +1 -1
- package/dist/models/manifests/anthropic.js +33 -1
- package/dist/providers/catalog/api-route.json +2 -2
- package/dist/providers/catalog/loader.js +5 -0
- package/dist/providers/catalog/mistral.json +2 -2
- package/dist/providers/catalog/xai.json +17 -3
- package/dist/providers/configuredOpenAICompat.d.ts +20 -2
- package/dist/providers/configuredOpenAICompat.js +22 -2
- package/dist/providers/googleVertex/client.js +0 -2
- package/dist/providers/litellm/client.js +2 -2
- package/dist/providers/openAI/client.js +1 -1
- package/dist/providers/openRouter/client.js +1 -1
- package/dist/types/providerCatalog.d.ts +10 -0
- package/dist/types/providers.d.ts +20 -0
- package/dist/utils/modelChoices.js +0 -9
- package/dist/utils/pricing.js +5 -0
- package/dist/utils/providerHealth.js +7 -9
- package/dist/utils/tokenLimits.js +9 -0
- package/dist/workflow/workflows/multiJudgeWorkflow.js +2 -2
- package/docs-site/static/search-index.json +16 -16
- package/package.json +3 -2
|
@@ -83,6 +83,10 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
83
83
|
voyage: {
|
|
84
84
|
// Voyage embeddings: max input tokens vary 16K-32K per model
|
|
85
85
|
_default: 32_000,
|
|
86
|
+
"voyage-4": 32_000,
|
|
87
|
+
"voyage-4-large": 32_000,
|
|
88
|
+
"voyage-4-lite": 32_000,
|
|
89
|
+
"voyage-code-4": 32_000,
|
|
86
90
|
"voyage-3.5": 32_000,
|
|
87
91
|
"voyage-3.5-lite": 32_000,
|
|
88
92
|
"voyage-3-large": 32_000,
|
|
@@ -111,6 +115,10 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
111
115
|
},
|
|
112
116
|
anthropic: {
|
|
113
117
|
_default: 200_000,
|
|
118
|
+
// Claude 5.5 / 5.1 (Sep 2026) — 1M context window, confirmed on
|
|
119
|
+
// platform.claude.com/docs/en/about-claude/models/overview
|
|
120
|
+
"claude-opus-5-5": 1_000_000,
|
|
121
|
+
"claude-fable-5-1": 1_000_000,
|
|
114
122
|
// Claude 5 (mid 2026) — 1M context window
|
|
115
123
|
"claude-sonnet-5": 1_000_000,
|
|
116
124
|
// Claude 4.6 (Feb 2026) — 1M context window
|
|
@@ -134,6 +142,11 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
134
142
|
},
|
|
135
143
|
openai: {
|
|
136
144
|
_default: 128_000,
|
|
145
|
+
// GPT-6 family (Sep 2026) — 1.05M context, per
|
|
146
|
+
// developers.openai.com/api/docs/models
|
|
147
|
+
"gpt-6-astra": 1_050_000,
|
|
148
|
+
"gpt-6-sol": 1_050_000,
|
|
149
|
+
"gpt-6-luna": 1_050_000,
|
|
137
150
|
// GPT-5.4 family — 1.05M context
|
|
138
151
|
"gpt-5.4": 1_050_000,
|
|
139
152
|
"gpt-5.4-mini": 400_000,
|
|
@@ -202,6 +215,8 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
202
215
|
vertex: {
|
|
203
216
|
_default: 1_048_576,
|
|
204
217
|
// Claude on Vertex
|
|
218
|
+
"claude-opus-5-5": 1_000_000,
|
|
219
|
+
"claude-fable-5-1": 1_000_000,
|
|
205
220
|
"claude-sonnet-5": 1_000_000,
|
|
206
221
|
"claude-opus-4-6": 1_000_000,
|
|
207
222
|
"claude-sonnet-4-6": 1_000_000,
|
|
@@ -238,6 +253,9 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
238
253
|
},
|
|
239
254
|
bedrock: {
|
|
240
255
|
_default: 200_000,
|
|
256
|
+
// Claude 5.5 / 5.1 (Sep 2026)
|
|
257
|
+
"anthropic.claude-opus-5-5": 1_000_000,
|
|
258
|
+
"anthropic.claude-fable-5-1": 1_000_000,
|
|
241
259
|
// Claude 4.6
|
|
242
260
|
"anthropic.claude-opus-4-6-v1": 1_000_000,
|
|
243
261
|
"anthropic.claude-sonnet-4-6": 1_000_000,
|
|
@@ -263,6 +281,16 @@ export const MODEL_CONTEXT_WINDOWS = {
|
|
|
263
281
|
},
|
|
264
282
|
azure: {
|
|
265
283
|
_default: 128_000,
|
|
284
|
+
// GPT-6 family (Sep 2026) — 1.05M context, per
|
|
285
|
+
// learn.microsoft.com/azure/ai-foundry/openai/concepts/models
|
|
286
|
+
"gpt-6-astra": 1_050_000,
|
|
287
|
+
"gpt-6-sol": 1_050_000,
|
|
288
|
+
"gpt-6-luna": 1_050_000,
|
|
289
|
+
// GPT-5.6 / GPT-5.5 — Azure-only as of Sep 2026, same 1.05M context
|
|
290
|
+
"gpt-5.6-sol": 1_050_000,
|
|
291
|
+
"gpt-5.6-terra": 1_050_000,
|
|
292
|
+
"gpt-5.6-luna": 1_050_000,
|
|
293
|
+
"gpt-5.5": 1_050_000,
|
|
266
294
|
// GPT-5.4
|
|
267
295
|
"gpt-5.4": 1_050_000,
|
|
268
296
|
"gpt-5.4-mini": 400_000,
|
|
@@ -180,6 +180,9 @@ export declare enum BedrockModels {
|
|
|
180
180
|
* Supported Models for OpenAI
|
|
181
181
|
*/
|
|
182
182
|
export declare enum OpenAIModels {
|
|
183
|
+
GPT_6_ASTRA = "gpt-6-astra",
|
|
184
|
+
GPT_6_SOL = "gpt-6-sol",
|
|
185
|
+
GPT_6_LUNA = "gpt-6-luna",
|
|
183
186
|
GPT_5_3_CODEX = "gpt-5.3-codex",
|
|
184
187
|
GPT_5_4 = "gpt-5.4",
|
|
185
188
|
GPT_5_4_MINI = "gpt-5.4-mini",
|
|
@@ -228,6 +231,13 @@ export declare enum OpenAIModels {
|
|
|
228
231
|
* Note: Azure uses deployment names, these are model identifiers
|
|
229
232
|
*/
|
|
230
233
|
export declare enum AzureOpenAIModels {
|
|
234
|
+
GPT_6_ASTRA = "gpt-6-astra",
|
|
235
|
+
GPT_6_SOL = "gpt-6-sol",
|
|
236
|
+
GPT_6_LUNA = "gpt-6-luna",
|
|
237
|
+
GPT_5_6_SOL = "gpt-5.6-sol",
|
|
238
|
+
GPT_5_6_TERRA = "gpt-5.6-terra",
|
|
239
|
+
GPT_5_6_LUNA = "gpt-5.6-luna",
|
|
240
|
+
GPT_5_5 = "gpt-5.5",
|
|
231
241
|
GPT_5_2 = "gpt-5.2",
|
|
232
242
|
GPT_5_2_CHAT = "gpt-5.2-chat",
|
|
233
243
|
GPT_5_2_PRO = "gpt-5.2-pro",
|
|
@@ -355,6 +365,8 @@ export declare enum AnthropicModels {
|
|
|
355
365
|
CLAUDE_OPUS_5 = "claude-opus-5",
|
|
356
366
|
CLAUDE_SONNET_5 = "claude-sonnet-5",
|
|
357
367
|
CLAUDE_FABLE_5 = "claude-fable-5",
|
|
368
|
+
CLAUDE_OPUS_5_5 = "claude-opus-5-5",
|
|
369
|
+
CLAUDE_FABLE_5_1 = "claude-fable-5-1",
|
|
358
370
|
CLAUDE_OPUS_4_8 = "claude-opus-4-8",
|
|
359
371
|
CLAUDE_OPUS_4_7 = "claude-opus-4-7",
|
|
360
372
|
CLAUDE_OPUS_4_6 = "claude-opus-4-6",
|
|
@@ -650,6 +662,14 @@ export declare enum CohereModels {
|
|
|
650
662
|
* @see https://docs.voyageai.com/docs/embeddings
|
|
651
663
|
*/
|
|
652
664
|
export declare enum VoyageModels {
|
|
665
|
+
/** Voyage 4 — latest general-purpose flagship */
|
|
666
|
+
VOYAGE_4 = "voyage-4",
|
|
667
|
+
/** Voyage 4 Large — largest / highest quality */
|
|
668
|
+
VOYAGE_4_LARGE = "voyage-4-large",
|
|
669
|
+
/** Voyage 4 Lite — smaller / cheaper */
|
|
670
|
+
VOYAGE_4_LITE = "voyage-4-lite",
|
|
671
|
+
/** Voyage Code 4 — code-tuned */
|
|
672
|
+
VOYAGE_CODE_4 = "voyage-code-4",
|
|
653
673
|
/** Voyage 3.5 — latest general-purpose (default) */
|
|
654
674
|
VOYAGE_3_5 = "voyage-3.5",
|
|
655
675
|
/** Voyage 3.5 Lite — smaller / cheaper */
|
|
@@ -1042,6 +1062,7 @@ export declare enum UpstageModels {
|
|
|
1042
1062
|
SYN_PRO_251021 = "syn-pro-251021"
|
|
1043
1063
|
}
|
|
1044
1064
|
export declare enum XaiModels {
|
|
1065
|
+
GROK_4_7 = "grok-4.7",
|
|
1045
1066
|
GROK_4_6 = "grok-4.6",
|
|
1046
1067
|
GROK_4_5 = "grok-4.5",
|
|
1047
1068
|
GROK_4_3 = "grok-4.3",
|
package/dist/constants/enums.js
CHANGED
|
@@ -257,6 +257,11 @@ export var BedrockModels;
|
|
|
257
257
|
*/
|
|
258
258
|
export var OpenAIModels;
|
|
259
259
|
(function (OpenAIModels) {
|
|
260
|
+
// GPT-6 Series (Released September 2026) - current flagship family, per
|
|
261
|
+
// developers.openai.com/api/docs/models
|
|
262
|
+
OpenAIModels["GPT_6_ASTRA"] = "gpt-6-astra";
|
|
263
|
+
OpenAIModels["GPT_6_SOL"] = "gpt-6-sol";
|
|
264
|
+
OpenAIModels["GPT_6_LUNA"] = "gpt-6-luna";
|
|
260
265
|
// GPT-5.3 Series (Released February 2026) - Latest coding models
|
|
261
266
|
OpenAIModels["GPT_5_3_CODEX"] = "gpt-5.3-codex";
|
|
262
267
|
// GPT-5.4 Series (Released March 2026) - Latest flagship models
|
|
@@ -318,6 +323,18 @@ export var OpenAIModels;
|
|
|
318
323
|
*/
|
|
319
324
|
export var AzureOpenAIModels;
|
|
320
325
|
(function (AzureOpenAIModels) {
|
|
326
|
+
// GPT-6 Series (September 2026) - current flagship family, confirmed on
|
|
327
|
+
// Azure OpenAI (learn.microsoft.com/azure/ai-foundry/openai/concepts/models)
|
|
328
|
+
AzureOpenAIModels["GPT_6_ASTRA"] = "gpt-6-astra";
|
|
329
|
+
AzureOpenAIModels["GPT_6_SOL"] = "gpt-6-sol";
|
|
330
|
+
AzureOpenAIModels["GPT_6_LUNA"] = "gpt-6-luna";
|
|
331
|
+
// GPT-5.6 Series (Azure-only as of Sep 2026 — retired from the OpenAI-direct
|
|
332
|
+
// catalog, still documented on Azure OpenAI)
|
|
333
|
+
AzureOpenAIModels["GPT_5_6_SOL"] = "gpt-5.6-sol";
|
|
334
|
+
AzureOpenAIModels["GPT_5_6_TERRA"] = "gpt-5.6-terra";
|
|
335
|
+
AzureOpenAIModels["GPT_5_6_LUNA"] = "gpt-5.6-luna";
|
|
336
|
+
// GPT-5.5 (Azure-only as of Sep 2026 — same situation as GPT-5.6 above)
|
|
337
|
+
AzureOpenAIModels["GPT_5_5"] = "gpt-5.5";
|
|
321
338
|
// GPT-5.2 Series (Latest - December 2025)
|
|
322
339
|
AzureOpenAIModels["GPT_5_2"] = "gpt-5.2";
|
|
323
340
|
AzureOpenAIModels["GPT_5_2_CHAT"] = "gpt-5.2-chat";
|
|
@@ -482,6 +499,10 @@ export var AnthropicModels;
|
|
|
482
499
|
AnthropicModels["CLAUDE_OPUS_5"] = "claude-opus-5";
|
|
483
500
|
AnthropicModels["CLAUDE_SONNET_5"] = "claude-sonnet-5";
|
|
484
501
|
AnthropicModels["CLAUDE_FABLE_5"] = "claude-fable-5";
|
|
502
|
+
// Claude 5.5 / 5.1 Series (September 2026) — confirmed on
|
|
503
|
+
// platform.claude.com/docs/en/about-claude/models/overview
|
|
504
|
+
AnthropicModels["CLAUDE_OPUS_5_5"] = "claude-opus-5-5";
|
|
505
|
+
AnthropicModels["CLAUDE_FABLE_5_1"] = "claude-fable-5-1";
|
|
485
506
|
// Claude 4.7 / 4.8 Series
|
|
486
507
|
AnthropicModels["CLAUDE_OPUS_4_8"] = "claude-opus-4-8";
|
|
487
508
|
AnthropicModels["CLAUDE_OPUS_4_7"] = "claude-opus-4-7";
|
|
@@ -868,6 +889,14 @@ export var CohereModels;
|
|
|
868
889
|
*/
|
|
869
890
|
export var VoyageModels;
|
|
870
891
|
(function (VoyageModels) {
|
|
892
|
+
/** Voyage 4 — latest general-purpose flagship */
|
|
893
|
+
VoyageModels["VOYAGE_4"] = "voyage-4";
|
|
894
|
+
/** Voyage 4 Large — largest / highest quality */
|
|
895
|
+
VoyageModels["VOYAGE_4_LARGE"] = "voyage-4-large";
|
|
896
|
+
/** Voyage 4 Lite — smaller / cheaper */
|
|
897
|
+
VoyageModels["VOYAGE_4_LITE"] = "voyage-4-lite";
|
|
898
|
+
/** Voyage Code 4 — code-tuned */
|
|
899
|
+
VoyageModels["VOYAGE_CODE_4"] = "voyage-code-4";
|
|
871
900
|
/** Voyage 3.5 — latest general-purpose (default) */
|
|
872
901
|
VoyageModels["VOYAGE_3_5"] = "voyage-3.5";
|
|
873
902
|
/** Voyage 3.5 Lite — smaller / cheaper */
|
|
@@ -1290,6 +1319,7 @@ export var UpstageModels;
|
|
|
1290
1319
|
})(UpstageModels || (UpstageModels = {}));
|
|
1291
1320
|
export var XaiModels;
|
|
1292
1321
|
(function (XaiModels) {
|
|
1322
|
+
XaiModels["GROK_4_7"] = "grok-4.7";
|
|
1293
1323
|
XaiModels["GROK_4_6"] = "grok-4.6";
|
|
1294
1324
|
XaiModels["GROK_4_5"] = "grok-4.5";
|
|
1295
1325
|
XaiModels["GROK_4_3"] = "grok-4.3";
|
|
@@ -71,6 +71,9 @@ export declare const PROVIDER_TOKEN_LIMITS: {
|
|
|
71
71
|
};
|
|
72
72
|
/** OpenAI model limits */
|
|
73
73
|
readonly OPENAI: {
|
|
74
|
+
readonly "gpt-6-astra": 128000;
|
|
75
|
+
readonly "gpt-6-sol": 128000;
|
|
76
|
+
readonly "gpt-6-luna": 128000;
|
|
74
77
|
readonly "gpt-5.4": 128000;
|
|
75
78
|
readonly "gpt-5.4-mini": 128000;
|
|
76
79
|
readonly "gpt-5.4-nano": 128000;
|
package/dist/constants/tokens.js
CHANGED
|
@@ -57,7 +57,7 @@ export class EvaluatorFactory extends BaseFactory {
|
|
|
57
57
|
const mergedConfig = {
|
|
58
58
|
threshold: 7,
|
|
59
59
|
evaluationStrategy: "ragas",
|
|
60
|
-
evaluationModel: process.env.NEUROLINK_RAGAS_EVALUATION_MODEL || "gemini-
|
|
60
|
+
evaluationModel: process.env.NEUROLINK_RAGAS_EVALUATION_MODEL || "gemini-2.5-flash",
|
|
61
61
|
provider: process.env.NEUROLINK_RAGAS_EVALUATION_PROVIDER || "vertex",
|
|
62
62
|
...config,
|
|
63
63
|
};
|
|
@@ -95,7 +95,7 @@ export class EvaluatorFactory extends BaseFactory {
|
|
|
95
95
|
const mergedConfig = {
|
|
96
96
|
threshold: 5,
|
|
97
97
|
evaluationStrategy: "ragas",
|
|
98
|
-
evaluationModel: process.env.NEUROLINK_RAGAS_EVALUATION_MODEL || "gemini-
|
|
98
|
+
evaluationModel: process.env.NEUROLINK_RAGAS_EVALUATION_MODEL || "gemini-2.5-flash",
|
|
99
99
|
provider: process.env.NEUROLINK_RAGAS_EVALUATION_PROVIDER || "vertex",
|
|
100
100
|
...config,
|
|
101
101
|
};
|
|
@@ -114,7 +114,7 @@ export class EvaluatorFactory extends BaseFactory {
|
|
|
114
114
|
const mergedConfig = {
|
|
115
115
|
threshold: 6,
|
|
116
116
|
evaluationStrategy: "ragas",
|
|
117
|
-
evaluationModel: "gemini-
|
|
117
|
+
evaluationModel: "gemini-2.5-flash",
|
|
118
118
|
provider: "vertex",
|
|
119
119
|
...config,
|
|
120
120
|
};
|
|
@@ -73,7 +73,7 @@ export class EvaluatorRegistry extends BaseRegistry {
|
|
|
73
73
|
name: "RAGAS Evaluator",
|
|
74
74
|
description: "RAGAS-style LLM-as-judge evaluation with relevance, accuracy, and completeness metrics",
|
|
75
75
|
requiresLLM: true,
|
|
76
|
-
defaultModel: "gemini-
|
|
76
|
+
defaultModel: "gemini-2.5-flash",
|
|
77
77
|
defaultProvider: "vertex",
|
|
78
78
|
version: "1.0.0",
|
|
79
79
|
features: [
|
|
@@ -18,7 +18,7 @@ export class RAGASEvaluator {
|
|
|
18
18
|
this.evaluationModel =
|
|
19
19
|
evaluationModel ||
|
|
20
20
|
process.env.NEUROLINK_RAGAS_EVALUATION_MODEL ||
|
|
21
|
-
"gemini-
|
|
21
|
+
"gemini-2.5-flash";
|
|
22
22
|
this.providerName =
|
|
23
23
|
providerName ||
|
|
24
24
|
process.env.NEUROLINK_RAGAS_EVALUATION_PROVIDER ||
|
|
@@ -113,7 +113,7 @@ params, config) {
|
|
|
113
113
|
*/
|
|
114
114
|
export async function performPrecallEvaluation(config, userInput) {
|
|
115
115
|
try {
|
|
116
|
-
const provider = await AIProviderFactory.createProvider(config.provider || "google-ai", config.evaluationModel || "gemini-
|
|
116
|
+
const provider = await AIProviderFactory.createProvider(config.provider || "google-ai", config.evaluationModel || "gemini-2.5-flash");
|
|
117
117
|
const evaluationPrompt = config.evaluationPrompt || DEFAULT_EVALUATION_PROMPT;
|
|
118
118
|
const prompt = evaluationPrompt.replace("{USER_INPUT}", userInput);
|
|
119
119
|
const result = await provider.generate({
|
|
@@ -23,11 +23,43 @@ export const anthropicManifest = {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
models: {
|
|
26
|
+
"claude-opus-5-5": {
|
|
27
|
+
aliases: ["opus-5.5"],
|
|
28
|
+
displayName: "Claude Opus 5.5",
|
|
29
|
+
contextWindow: 1_000_000,
|
|
30
|
+
maxOutputTokens: 128_000,
|
|
31
|
+
// No pricingPerMTok DELIBERATELY: PRICING.anthropic already carries
|
|
32
|
+
// real rates for this id (input 4.0/output 20.0 per MTok) — see the
|
|
33
|
+
// claude-sonnet-5 comment below for why this defers to that table.
|
|
34
|
+
vision: true,
|
|
35
|
+
functionCalling: true,
|
|
36
|
+
reasoning: true,
|
|
37
|
+
jsonMode: true,
|
|
38
|
+
samplingParams: false, // matches SAMPLING_PARAM_REJECTING_FAMILIES /opus[-_.]?5(?![0-9])/i
|
|
39
|
+
},
|
|
40
|
+
"claude-fable-5-1": {
|
|
41
|
+
aliases: ["fable-5.1"],
|
|
42
|
+
displayName: "Claude Fable 5.1",
|
|
43
|
+
contextWindow: 1_000_000,
|
|
44
|
+
maxOutputTokens: 128_000,
|
|
45
|
+
// No pricingPerMTok DELIBERATELY: PRICING.anthropic already carries
|
|
46
|
+
// real rates for this id (input 10.0/output 50.0 per MTok) — see the
|
|
47
|
+
// claude-sonnet-5 comment below for why this defers to that table.
|
|
48
|
+
vision: true,
|
|
49
|
+
functionCalling: true,
|
|
50
|
+
reasoning: true,
|
|
51
|
+
jsonMode: true,
|
|
52
|
+
samplingParams: false, // matches SAMPLING_PARAM_REJECTING_FAMILIES /fable/i
|
|
53
|
+
},
|
|
26
54
|
"claude-sonnet-5": {
|
|
27
55
|
aliases: ["sonnet-5", "claude-sonnet"],
|
|
28
56
|
displayName: "Claude Sonnet 5",
|
|
29
57
|
contextWindow: 1_000_000,
|
|
30
|
-
|
|
58
|
+
// Was 64_000; corrected to 128_000 to match the official spec
|
|
59
|
+
// (platform.claude.com/docs/en/about-claude/models/overview) and the
|
|
60
|
+
// matching fix in getClaudeMaxOutputTokens (tokenLimits.ts), which this
|
|
61
|
+
// manifest's own header comment names as the authoritative source.
|
|
62
|
+
maxOutputTokens: 128_000,
|
|
31
63
|
// No pricingPerMTok DELIBERATELY: PRICING.anthropic carries real
|
|
32
64
|
// rates for this id, and findRates() is manifest-first with a legacy
|
|
33
65
|
// fallback — omitting the rate here defers to that table instead of
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"tools": true,
|
|
86
86
|
"toolsWithStreaming": true,
|
|
87
87
|
"structuredOutput": true,
|
|
88
|
-
"structuredOutputWithTools":
|
|
88
|
+
"structuredOutputWithTools": false,
|
|
89
89
|
"embeddings": false,
|
|
90
90
|
"thinking": false
|
|
91
91
|
},
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
"liveMatrix": {
|
|
125
125
|
"date": "2026-09-17",
|
|
126
|
-
"result": "Verified live against https://global.api-route.com/v1: GET /v1/models returned 70 models. Chat completions, streaming, function calling, streamed function calling, and structured JSON output (json_object and json_schema) verified. Multimodal vision verified on claude-sonnet-4-6, claude-haiku-4-5, and gemini-3.8-flash. Invalid API key returns 401 (无效的令牌) and invalid model returns 503 (model_not_found)."
|
|
126
|
+
"result": "Verified live against https://global.api-route.com/v1: GET /v1/models returned 70 models. Chat completions, streaming, function calling, streamed function calling, and structured JSON output (json_object and json_schema) verified. Multimodal vision verified on claude-sonnet-4-6, claude-haiku-4-5, and gemini-3.8-flash. Invalid API key returns 401 (无效的令牌) and invalid model returns 503 (model_not_found). Tools and response_format were only probed SEPARATELY, never together in one request, so structuredOutputWithTools is corrected to false here pending a dedicated tools_plus_schema probe — the individual passes do not demonstrate the combined capability."
|
|
127
127
|
},
|
|
128
128
|
"addedInPR": "pending"
|
|
129
129
|
}
|
|
@@ -131,6 +131,11 @@ export function buildCatalogEntries() {
|
|
|
131
131
|
...(typeof entry.capabilities.tools === "boolean"
|
|
132
132
|
? { supportsTools: entry.capabilities.tools }
|
|
133
133
|
: {}),
|
|
134
|
+
// Unlike `tools`, `capabilities.structuredOutputWithTools` is a plain
|
|
135
|
+
// required boolean in the schema (no "model-dependent" member), so this
|
|
136
|
+
// is a direct passthrough — `false` and `true` both carry meaning to
|
|
137
|
+
// ConfiguredOpenAICompatProvider.suppressResponseFormatWithTools().
|
|
138
|
+
supportsStructuredOutputWithTools: entry.capabilities.structuredOutputWithTools,
|
|
134
139
|
};
|
|
135
140
|
const { baseURLTemplate } = entry.wire;
|
|
136
141
|
if (baseURLTemplate) {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"tools": true,
|
|
209
209
|
"toolsWithStreaming": true,
|
|
210
210
|
"structuredOutput": true,
|
|
211
|
-
"structuredOutputWithTools":
|
|
211
|
+
"structuredOutputWithTools": false,
|
|
212
212
|
"embeddings": false,
|
|
213
213
|
"thinking": false
|
|
214
214
|
},
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
},
|
|
246
246
|
"liveMatrix": {
|
|
247
247
|
"date": "2026-08-30",
|
|
248
|
-
"result": "17 ids answer normally. A chat probe alone was not enough to judge the rest, because Mistral rejects every non-chat model with the same generic 'Invalid model' text: cross-referencing the roster shows mistral-embed, codestral-embed, mistral-ocr-latest, mistral-ocr-2512, voxtral-mini-latest and voxtral-mini-2602 are all still listed and alive — they are embedding, OCR and audio models that a chat endpoint is right to refuse — so they keep production status. An id is marked retired only when BOTH signals agree: absent from the roster AND rejected by a live chat call. pixtral-12b is the one id where they disagree — the roster omits it but a real call returns 200, so it was moved back to production, on the rule that a live 200 outranks a roster omission. mistral-large-latest and mistral-large-2512 answer 403 'not available in your subscription tier': a plan limit on this account, not a retirement, so they stay production. visionModel is pinned to mistral-medium-latest because the otherwise-first vision id, mistral-large-latest, is behind that plan gate."
|
|
248
|
+
"result": "17 ids answer normally. A chat probe alone was not enough to judge the rest, because Mistral rejects every non-chat model with the same generic 'Invalid model' text: cross-referencing the roster shows mistral-embed, codestral-embed, mistral-ocr-latest, mistral-ocr-2512, voxtral-mini-latest and voxtral-mini-2602 are all still listed and alive — they are embedding, OCR and audio models that a chat endpoint is right to refuse — so they keep production status. An id is marked retired only when BOTH signals agree: absent from the roster AND rejected by a live chat call. pixtral-12b is the one id where they disagree — the roster omits it but a real call returns 200, so it was moved back to production, on the rule that a live 200 outranks a roster omission. mistral-large-latest and mistral-large-2512 answer 403 'not available in your subscription tier': a plan limit on this account, not a retirement, so they stay production. visionModel is pinned to mistral-medium-latest because the otherwise-first vision id, mistral-large-latest, is behind that plan gate. Combined tools plus response_format probes returned 429 twice, which is not successful capability evidence, so structuredOutputWithTools remains false pending a successful combined-request probe."
|
|
249
249
|
},
|
|
250
250
|
"addedInPR": "https://github.com/juspay/neurolink/pull/1587"
|
|
251
251
|
}
|
|
@@ -9,10 +9,24 @@
|
|
|
9
9
|
},
|
|
10
10
|
"models": {
|
|
11
11
|
"default": "grok-4.6",
|
|
12
|
-
"fallbacks": [
|
|
12
|
+
"fallbacks": [
|
|
13
|
+
"grok-4.6",
|
|
14
|
+
"grok-4.5",
|
|
15
|
+
"grok-4.3",
|
|
16
|
+
"grok-3",
|
|
17
|
+
"grok-3-mini",
|
|
18
|
+
"grok-4.7"
|
|
19
|
+
],
|
|
13
20
|
"defaultContextWindow": 131072,
|
|
14
21
|
"defaultMaxOutputTokens": 4096,
|
|
15
22
|
"catalog": {
|
|
23
|
+
"grok-4.7": {
|
|
24
|
+
"enumMember": "GROK_4_7",
|
|
25
|
+
"contextWindow": 500000,
|
|
26
|
+
"vision": true,
|
|
27
|
+
"status": "production",
|
|
28
|
+
"description": "Grok 4.7 — xAI's newest flagship as of 2026-09-27 (text + image input); not yet the SDK default, see docs.x.ai/developers/grok-4-7"
|
|
29
|
+
},
|
|
16
30
|
"grok-4.6": {
|
|
17
31
|
"enumMember": "GROK_4_6",
|
|
18
32
|
"contextWindow": 131072,
|
|
@@ -71,7 +85,7 @@
|
|
|
71
85
|
}
|
|
72
86
|
},
|
|
73
87
|
"visionModel": "grok-4.6",
|
|
74
|
-
"topModels": ["grok-4.6", "grok-4.5", "grok-4.3", "grok-3"]
|
|
88
|
+
"topModels": ["grok-4.6", "grok-4.5", "grok-4.3", "grok-3", "grok-4.7"]
|
|
75
89
|
},
|
|
76
90
|
"capabilities": {
|
|
77
91
|
"text": true,
|
|
@@ -114,7 +128,7 @@
|
|
|
114
128
|
},
|
|
115
129
|
"liveMatrix": {
|
|
116
130
|
"date": "2026-08-30",
|
|
117
|
-
"result": "grok-2-latest, grok-2-vision-latest and grok-beta are rejected as invalid models. The grok-4.x line replaces them: 4.3/4.5/4.6 all answer, and all three read a 64x64 PNG correctly, so vision moved there from the retired grok-2-vision-latest. An earlier probe with an 8x8 PNG reported no vision — that was xAI answering 'Invalid PNG image', a complaint about the file rather than the capability. grok-3 and grok-3-mini are kept because they still serve, even though xAI's /models roster omits them: roster absence is not evidence of death here."
|
|
131
|
+
"result": "grok-2-latest, grok-2-vision-latest and grok-beta are rejected as invalid models. The grok-4.x line replaces them: 4.3/4.5/4.6 all answer, and all three read a 64x64 PNG correctly, so vision moved there from the retired grok-2-vision-latest. An earlier probe with an 8x8 PNG reported no vision — that was xAI answering 'Invalid PNG image', a complaint about the file rather than the capability. grok-3 and grok-3-mini are kept because they still serve, even though xAI's /models roster omits them: roster absence is not evidence of death here. grok-4.7 added 2026-09-27 from docs.x.ai/developers/grok-4-7 and docs.x.ai/developers/pricing (official docs review only — no xAI API key was available in this environment, so unlike the rest of this file it has not been roster/chat-probed live; context 500,000 tokens and text+image input are as published, and it is deliberately left with no pricingPerMTok, matching grok-4.6/4.5/4.3, because its real rate is tiered by prompt length ($2/$0.50/$6 per 1M below 200k tokens, $4/$1/$12 at or above) and the schema's pricingPerMTok field can only hold one flat rate)."
|
|
118
132
|
},
|
|
119
133
|
"addedInPR": "https://github.com/juspay/neurolink/pull/1587"
|
|
120
134
|
}
|
|
@@ -9,8 +9,10 @@ import { OpenAIChatCompletionsProvider } from "./openaiChatCompletionsBase.js";
|
|
|
9
9
|
* OPENAI_COMPAT_CATALOG in openaiCompatCatalog.ts for the entries.
|
|
10
10
|
*
|
|
11
11
|
* If a provider needs a real hook override (adjustRequestBody,
|
|
12
|
-
* adjustBodyAfter400, getChatCompletionsURL, getAuthHeaders,
|
|
13
|
-
*
|
|
12
|
+
* adjustBodyAfter400, getChatCompletionsURL, getAuthHeaders, ...) that isn't
|
|
13
|
+
* expressible as one of the catalog's data-driven quirks (messageContentFormat,
|
|
14
|
+
* responseFormatDowngrade, replayReasoningContent,
|
|
15
|
+
* supportsStructuredOutputWithTools, ...) it does NOT belong in the catalog —
|
|
14
16
|
* write a dedicated subclass instead (see azureOpenai.ts).
|
|
15
17
|
*
|
|
16
18
|
* The exception is a WIRE DIALECT: a vendor that speaks OpenAI for ordinary
|
|
@@ -55,6 +57,22 @@ export declare class ConfiguredOpenAICompatProvider extends OpenAIChatCompletion
|
|
|
55
57
|
* construction: BaseProvider merely closes over it.
|
|
56
58
|
*/
|
|
57
59
|
supportsTools(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The base class drops `response_format` from any request carrying tools,
|
|
62
|
+
* because a generic OpenAI-compatible backend may honour it over tool
|
|
63
|
+
* calling and answer with final-shape JSON on step one instead of running
|
|
64
|
+
* the agentic loop. For a catalog entry that is not a guess — the flag
|
|
65
|
+
* comes from a live wire probe (`capabilities.structuredOutputWithTools`)
|
|
66
|
+
* — so an entry that declares the combination supported sends both and
|
|
67
|
+
* gets the object from the vendor's own constrained decoding in ONE
|
|
68
|
+
* request, instead of falling back to a tool-free re-ask.
|
|
69
|
+
*
|
|
70
|
+
* Conservative by default: only an explicit `true` opts in. A vendor that
|
|
71
|
+
* declares support but rejects the combination at runtime is still caught
|
|
72
|
+
* by `isToolsSchemaConflictError` and retried without structured output,
|
|
73
|
+
* so a stale flag costs one request rather than the turn.
|
|
74
|
+
*/
|
|
75
|
+
protected suppressResponseFormatWithTools(): boolean;
|
|
58
76
|
protected adjustRequestBody(body: OpenAICompatChatRequest, modelId: string): OpenAICompatChatRequest;
|
|
59
77
|
protected adjustResponseFormat(rf: OpenAICompatResponseFormat | undefined, modelId: string): OpenAICompatResponseFormat | undefined;
|
|
60
78
|
protected replayReasoningContent(): boolean;
|
|
@@ -31,8 +31,10 @@ const flattenMessageContent = (content) => {
|
|
|
31
31
|
* OPENAI_COMPAT_CATALOG in openaiCompatCatalog.ts for the entries.
|
|
32
32
|
*
|
|
33
33
|
* If a provider needs a real hook override (adjustRequestBody,
|
|
34
|
-
* adjustBodyAfter400, getChatCompletionsURL, getAuthHeaders,
|
|
35
|
-
*
|
|
34
|
+
* adjustBodyAfter400, getChatCompletionsURL, getAuthHeaders, ...) that isn't
|
|
35
|
+
* expressible as one of the catalog's data-driven quirks (messageContentFormat,
|
|
36
|
+
* responseFormatDowngrade, replayReasoningContent,
|
|
37
|
+
* supportsStructuredOutputWithTools, ...) it does NOT belong in the catalog —
|
|
36
38
|
* write a dedicated subclass instead (see azureOpenai.ts).
|
|
37
39
|
*
|
|
38
40
|
* The exception is a WIRE DIALECT: a vendor that speaks OpenAI for ordinary
|
|
@@ -110,6 +112,24 @@ export class ConfiguredOpenAICompatProvider extends OpenAIChatCompletionsProvide
|
|
|
110
112
|
}
|
|
111
113
|
return super.supportsTools();
|
|
112
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* The base class drops `response_format` from any request carrying tools,
|
|
117
|
+
* because a generic OpenAI-compatible backend may honour it over tool
|
|
118
|
+
* calling and answer with final-shape JSON on step one instead of running
|
|
119
|
+
* the agentic loop. For a catalog entry that is not a guess — the flag
|
|
120
|
+
* comes from a live wire probe (`capabilities.structuredOutputWithTools`)
|
|
121
|
+
* — so an entry that declares the combination supported sends both and
|
|
122
|
+
* gets the object from the vendor's own constrained decoding in ONE
|
|
123
|
+
* request, instead of falling back to a tool-free re-ask.
|
|
124
|
+
*
|
|
125
|
+
* Conservative by default: only an explicit `true` opts in. A vendor that
|
|
126
|
+
* declares support but rejects the combination at runtime is still caught
|
|
127
|
+
* by `isToolsSchemaConflictError` and retried without structured output,
|
|
128
|
+
* so a stale flag costs one request rather than the turn.
|
|
129
|
+
*/
|
|
130
|
+
suppressResponseFormatWithTools() {
|
|
131
|
+
return this.entry.supportsStructuredOutputWithTools !== true;
|
|
132
|
+
}
|
|
113
133
|
adjustRequestBody(body, modelId) {
|
|
114
134
|
const adjusted = super.adjustRequestBody(body, modelId);
|
|
115
135
|
if (this.entry.messageContentFormat !== "string") {
|
|
@@ -6480,8 +6480,6 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
6480
6480
|
"gemini-2.5-flash-lite",
|
|
6481
6481
|
"gemini-2.0-flash-001",
|
|
6482
6482
|
"gemini-2.0-flash-lite",
|
|
6483
|
-
"gemini-1.5-pro",
|
|
6484
|
-
"gemini-1.5-flash",
|
|
6485
6483
|
],
|
|
6486
6484
|
claude: [
|
|
6487
6485
|
"claude-sonnet-4-5@20250929",
|
|
@@ -13,7 +13,7 @@ import { createTimeoutController } from "../../utils/timeout.js";
|
|
|
13
13
|
import { stripTrailingSlash } from "../openaiChatCompletionsClient.js";
|
|
14
14
|
import { OpenAIChatCompletionsProvider } from "../openaiChatCompletionsBase.js";
|
|
15
15
|
const streamTracer = trace.getTracer("neurolink.provider.litellm");
|
|
16
|
-
const FALLBACK_LITELLM_MODEL = "openai/gpt-
|
|
16
|
+
const FALLBACK_LITELLM_MODEL = "openai/gpt-5.4-mini";
|
|
17
17
|
const getLiteLLMConfig = () => ({
|
|
18
18
|
baseURL: process.env.LITELLM_BASE_URL || "http://localhost:4000",
|
|
19
19
|
apiKey: process.env.LITELLM_API_KEY || "sk-anything",
|
|
@@ -243,7 +243,7 @@ export class LiteLLMProvider extends OpenAIChatCompletionsProvider {
|
|
|
243
243
|
.map((m) => m.trim())
|
|
244
244
|
.filter((m) => m.length > 0) || [
|
|
245
245
|
"openai/gpt-4o",
|
|
246
|
-
"anthropic/claude-
|
|
246
|
+
"anthropic/claude-haiku-4-5-20251001",
|
|
247
247
|
"meta-llama/llama-3.1-8b-instruct",
|
|
248
248
|
"google/gemini-2.5-flash",
|
|
249
249
|
]);
|
|
@@ -44,7 +44,7 @@ const resolveOpenAIBaseURL = (credentialBaseURL, envBaseURL) => {
|
|
|
44
44
|
return resolved;
|
|
45
45
|
};
|
|
46
46
|
const getOpenAIApiKey = () => validateApiKey(createOpenAIConfig());
|
|
47
|
-
const getOpenAIModel = () => getProviderModel("OPENAI_MODEL", "gpt-
|
|
47
|
+
const getOpenAIModel = () => getProviderModel("OPENAI_MODEL", "gpt-5.4");
|
|
48
48
|
const streamTracer = trace.getTracer("neurolink.provider.openai");
|
|
49
49
|
/**
|
|
50
50
|
* OpenAI Provider — direct HTTP, no AI SDK.
|
|
@@ -278,7 +278,7 @@ export class OpenRouterProvider extends OpenAIChatCompletionsProvider {
|
|
|
278
278
|
"openai/gpt-4-turbo",
|
|
279
279
|
// Google models
|
|
280
280
|
"google/gemini-2.0-flash",
|
|
281
|
-
"google/gemini-
|
|
281
|
+
"google/gemini-2.5-pro",
|
|
282
282
|
// Meta Llama models
|
|
283
283
|
"meta-llama/llama-3.1-70b-instruct",
|
|
284
284
|
"meta-llama/llama-3.1-8b-instruct",
|
|
@@ -122,6 +122,16 @@ export type CatalogCapabilities = {
|
|
|
122
122
|
tools: boolean | "model-dependent";
|
|
123
123
|
toolsWithStreaming: boolean;
|
|
124
124
|
structuredOutput: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Whether a live wire probe proved the vendor accepts native tool
|
|
127
|
+
* definitions and `response_format` in the SAME request (a 200, not a
|
|
128
|
+
* schema/tools conflict error). Maps to
|
|
129
|
+
* OpenAICompatCatalogEntry.supportsStructuredOutputWithTools; `true` lets
|
|
130
|
+
* ConfiguredOpenAICompatProvider send both instead of suppressing
|
|
131
|
+
* `response_format` on any request carrying tools (the conservative
|
|
132
|
+
* default for an unknown endpoint). Only an explicit `true` opts in —
|
|
133
|
+
* `false` is the same conservative behavior as leaving it unset.
|
|
134
|
+
*/
|
|
125
135
|
structuredOutputWithTools: boolean;
|
|
126
136
|
embeddings: boolean;
|
|
127
137
|
thinking: boolean;
|
|
@@ -749,6 +749,26 @@ export type OpenAICompatCatalogEntry = {
|
|
|
749
749
|
* same default every hand-written provider uses.
|
|
750
750
|
*/
|
|
751
751
|
supportsTools?: boolean;
|
|
752
|
+
/**
|
|
753
|
+
* Whether the vendor accepts native tool definitions and `response_format`
|
|
754
|
+
* in the SAME request, from the catalog's
|
|
755
|
+
* `capabilities.structuredOutputWithTools`.
|
|
756
|
+
*
|
|
757
|
+
* The base class (`suppressResponseFormatWithTools`) suppresses
|
|
758
|
+
* `response_format` whenever tools are attached, because a generic
|
|
759
|
+
* OpenAI-compatible backend may honour it over tool calling and answer
|
|
760
|
+
* with final-shape JSON on step 1 instead of running the agentic loop.
|
|
761
|
+
* That is the right default for an unknown endpoint, but for a catalog
|
|
762
|
+
* entry it is not a guess: the flag is set from a live wire probe. `true`
|
|
763
|
+
* lets the request carry both, so the object comes back from the vendor's
|
|
764
|
+
* own constrained decoding in ONE request instead of a tool-free re-ask.
|
|
765
|
+
*
|
|
766
|
+
* Omitted or false keeps the conservative default. A vendor that turns
|
|
767
|
+
* out to reject the combination anyway is still caught by
|
|
768
|
+
* `isToolsSchemaConflictError` and retried without structured output, so
|
|
769
|
+
* a stale `true` costs one request, not the turn.
|
|
770
|
+
*/
|
|
771
|
+
supportsStructuredOutputWithTools?: boolean;
|
|
752
772
|
/**
|
|
753
773
|
* The literal passed as ProviderFactory.registerProvider()'s defaultModel
|
|
754
774
|
* argument (resolved before the provider is constructed). Preserves each
|
|
@@ -103,14 +103,6 @@ const TOP_MODELS_CONFIG = {
|
|
|
103
103
|
model: GoogleAIModels.GEMINI_3_PRO_PREVIEW,
|
|
104
104
|
description: "Latest preview",
|
|
105
105
|
},
|
|
106
|
-
{
|
|
107
|
-
model: GoogleAIModels.GEMINI_1_5_PRO,
|
|
108
|
-
description: "Previous generation",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
model: GoogleAIModels.GEMINI_1_5_FLASH,
|
|
112
|
-
description: "Legacy fast model",
|
|
113
|
-
},
|
|
114
106
|
],
|
|
115
107
|
[AIProviderName.VERTEX]: [
|
|
116
108
|
{
|
|
@@ -126,7 +118,6 @@ const TOP_MODELS_CONFIG = {
|
|
|
126
118
|
model: VertexModels.GEMINI_2_0_FLASH,
|
|
127
119
|
description: "Stable production model",
|
|
128
120
|
},
|
|
129
|
-
{ model: VertexModels.GEMINI_1_5_PRO, description: "Previous generation" },
|
|
130
121
|
{
|
|
131
122
|
model: VertexModels.CLAUDE_3_5_SONNET,
|
|
132
123
|
description: "Claude 3.5 on Vertex",
|
package/dist/utils/pricing.js
CHANGED
|
@@ -685,6 +685,11 @@ const PRICING = {
|
|
|
685
685
|
// Voyage bills per million input tokens — output dimension is the
|
|
686
686
|
// embedding vector, not generated tokens. We charge to input only.
|
|
687
687
|
_default: { input: 0.18 / 1_000_000, output: 0 },
|
|
688
|
+
// Voyage 4 family — docs.voyageai.com/docs/embeddings pricing table
|
|
689
|
+
"voyage-4": { input: 0.06 / 1_000_000, output: 0 },
|
|
690
|
+
"voyage-4-large": { input: 0.12 / 1_000_000, output: 0 },
|
|
691
|
+
"voyage-4-lite": { input: 0.02 / 1_000_000, output: 0 },
|
|
692
|
+
"voyage-code-4": { input: 0.12 / 1_000_000, output: 0 },
|
|
688
693
|
"voyage-3.5": { input: 0.06 / 1_000_000, output: 0 },
|
|
689
694
|
"voyage-3.5-lite": { input: 0.02 / 1_000_000, output: 0 },
|
|
690
695
|
"voyage-3-large": { input: 0.18 / 1_000_000, output: 0 },
|