@juspay/neurolink 12.2.0 → 12.2.1
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 +3 -3
- package/dist/browser/neurolink.min.js +3 -3
- package/dist/constants/enums.d.ts +7 -11
- package/dist/constants/enums.js +6 -10
- package/dist/factories/providerDescriptors.js +1 -1
- package/dist/providers/openaiChatCompletionsClient.js +6 -1
- package/dist/providers/openaiCompatCatalog.js +4 -9
- package/dist/utils/modelChoices.js +4 -9
- package/package.json +1 -1
|
@@ -756,19 +756,15 @@ export declare enum GroqModels {
|
|
|
756
756
|
* Cerebras inference models (wafer-scale, OpenAI-compatible API).
|
|
757
757
|
* @see https://inference-docs.cerebras.ai/introduction
|
|
758
758
|
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
759
|
+
* Roster verified against a live authenticated `/v1/models` on 2026-08-27:
|
|
760
|
+
* only these two ids are served. The llama/qwen models the vendor docs
|
|
761
|
+
* once listed are retired and now 404.
|
|
762
762
|
*/
|
|
763
763
|
export declare enum CerebrasModels {
|
|
764
|
-
/**
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
|
|
768
|
-
/** Qwen 3 32B */
|
|
769
|
-
QWEN_3_32B = "qwen-3-32b",
|
|
770
|
-
/** OpenAI GPT-OSS 120B (open-weight) */
|
|
771
|
-
GPT_OSS_120B = "gpt-oss-120b"
|
|
764
|
+
/** OpenAI GPT-OSS 120B (open-weight) — production default */
|
|
765
|
+
GPT_OSS_120B = "gpt-oss-120b",
|
|
766
|
+
/** Google Gemma 4 31B */
|
|
767
|
+
GEMMA_4_31B = "gemma-4-31b"
|
|
772
768
|
}
|
|
773
769
|
/**
|
|
774
770
|
* Cohere Command + Embed models.
|
package/dist/constants/enums.js
CHANGED
|
@@ -1009,20 +1009,16 @@ export var GroqModels;
|
|
|
1009
1009
|
* Cerebras inference models (wafer-scale, OpenAI-compatible API).
|
|
1010
1010
|
* @see https://inference-docs.cerebras.ai/introduction
|
|
1011
1011
|
*
|
|
1012
|
-
*
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1012
|
+
* Roster verified against a live authenticated `/v1/models` on 2026-08-27:
|
|
1013
|
+
* only these two ids are served. The llama/qwen models the vendor docs
|
|
1014
|
+
* once listed are retired and now 404.
|
|
1015
1015
|
*/
|
|
1016
1016
|
export var CerebrasModels;
|
|
1017
1017
|
(function (CerebrasModels) {
|
|
1018
|
-
/**
|
|
1019
|
-
CerebrasModels["LLAMA_3_3_70B"] = "llama-3.3-70b";
|
|
1020
|
-
/** Llama 3.1 8B — low-latency tier (vendor id has no dash after "llama") */
|
|
1021
|
-
CerebrasModels["LLAMA_3_1_8B"] = "llama3.1-8b";
|
|
1022
|
-
/** Qwen 3 32B */
|
|
1023
|
-
CerebrasModels["QWEN_3_32B"] = "qwen-3-32b";
|
|
1024
|
-
/** OpenAI GPT-OSS 120B (open-weight) */
|
|
1018
|
+
/** OpenAI GPT-OSS 120B (open-weight) — production default */
|
|
1025
1019
|
CerebrasModels["GPT_OSS_120B"] = "gpt-oss-120b";
|
|
1020
|
+
/** Google Gemma 4 31B */
|
|
1021
|
+
CerebrasModels["GEMMA_4_31B"] = "gemma-4-31b";
|
|
1026
1022
|
})(CerebrasModels || (CerebrasModels = {}));
|
|
1027
1023
|
/**
|
|
1028
1024
|
* Cohere Command + Embed models.
|
|
@@ -377,7 +377,7 @@ export const PROVIDER_DESCRIPTORS = [
|
|
|
377
377
|
baseURL: "CEREBRAS_BASE_URL",
|
|
378
378
|
model: "CEREBRAS_MODEL",
|
|
379
379
|
},
|
|
380
|
-
defaultModel: CerebrasModels.
|
|
380
|
+
defaultModel: CerebrasModels.GPT_OSS_120B,
|
|
381
381
|
toolSupport: "native",
|
|
382
382
|
localRuntime: false,
|
|
383
383
|
healthCheck: "env-only",
|
|
@@ -490,7 +490,12 @@ export const buildBody = (args) => {
|
|
|
490
490
|
if (tools) {
|
|
491
491
|
body.tools = tools;
|
|
492
492
|
}
|
|
493
|
-
|
|
493
|
+
// tool_choice is only meaningful alongside a non-empty tools array, and
|
|
494
|
+
// strict OpenAI-compatible backends (probed live on Cerebras 2026-08-27)
|
|
495
|
+
// reject it outright with 400 wrong_api_format when tools are absent:
|
|
496
|
+
// "'tool_choice' is only allowed when 'tools' are specified". Omitting it
|
|
497
|
+
// is behavior-identical on lenient backends.
|
|
498
|
+
if (toolChoice !== undefined && tools && tools.length > 0) {
|
|
494
499
|
body.tool_choice = toolChoice;
|
|
495
500
|
}
|
|
496
501
|
if (responseFormat) {
|
|
@@ -37,16 +37,11 @@ export const OPENAI_COMPAT_CATALOG = [
|
|
|
37
37
|
defaultBaseURL: "https://api.cerebras.ai/v1",
|
|
38
38
|
configOptions: createCerebrasConfig(),
|
|
39
39
|
modelEnvVar: "CEREBRAS_MODEL",
|
|
40
|
-
defaultModel: CerebrasModels.
|
|
41
|
-
registryDefaultModel: CerebrasModels.
|
|
40
|
+
defaultModel: CerebrasModels.GPT_OSS_120B,
|
|
41
|
+
registryDefaultModel: CerebrasModels.GPT_OSS_120B,
|
|
42
42
|
registryDefaultModelChecksEnvVar: true,
|
|
43
|
-
fallbackModelName: CerebrasModels.
|
|
44
|
-
fallbackModels: [
|
|
45
|
-
CerebrasModels.LLAMA_3_3_70B,
|
|
46
|
-
CerebrasModels.LLAMA_3_1_8B,
|
|
47
|
-
CerebrasModels.QWEN_3_32B,
|
|
48
|
-
CerebrasModels.GPT_OSS_120B,
|
|
49
|
-
],
|
|
43
|
+
fallbackModelName: CerebrasModels.GEMMA_4_31B,
|
|
44
|
+
fallbackModels: [CerebrasModels.GPT_OSS_120B, CerebrasModels.GEMMA_4_31B],
|
|
50
45
|
errorRules: [
|
|
51
46
|
{
|
|
52
47
|
// Probed live 2026-08-26: a bad key gets HTTP 401 with body
|
|
@@ -304,17 +304,12 @@ const TOP_MODELS_CONFIG = {
|
|
|
304
304
|
],
|
|
305
305
|
[AIProviderName.CEREBRAS]: [
|
|
306
306
|
{
|
|
307
|
-
model: CerebrasModels.
|
|
308
|
-
description: "Recommended -
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
model: CerebrasModels.LLAMA_3_1_8B,
|
|
312
|
-
description: "Lowest latency tier",
|
|
307
|
+
model: CerebrasModels.GPT_OSS_120B,
|
|
308
|
+
description: "Recommended - OpenAI GPT-OSS 120B (open-weight); wafer-scale speed",
|
|
313
309
|
},
|
|
314
|
-
{ model: CerebrasModels.QWEN_3_32B, description: "Qwen 3 32B" },
|
|
315
310
|
{
|
|
316
|
-
model: CerebrasModels.
|
|
317
|
-
description: "
|
|
311
|
+
model: CerebrasModels.GEMMA_4_31B,
|
|
312
|
+
description: "Google Gemma 4 31B",
|
|
318
313
|
},
|
|
319
314
|
],
|
|
320
315
|
[AIProviderName.COHERE]: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.1",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
|
|
6
6
|
"author": {
|