@juspay/neurolink 12.12.11 → 12.12.12
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 +2 -2
- package/dist/browser/neurolink.min.js +156 -156
- package/dist/constants/contextWindows.js +1 -0
- package/dist/constants/enums.d.ts +1 -0
- package/dist/constants/enums.js +7 -0
- package/dist/factories/providerDescriptors.js +1 -1
- package/dist/factories/providerRegistry.js +4 -1
- package/dist/providers/nvidiaNim/client.js +11 -1
- package/dist/utils/modelChoices.js +1 -1
- package/dist/utils/pricing.js +8 -0
- package/package.json +1 -1
|
@@ -644,6 +644,7 @@ export declare enum DeepSeekModels {
|
|
|
644
644
|
* Note: NIM hosts hundreds of models; pass arbitrary IDs via --model.
|
|
645
645
|
*/
|
|
646
646
|
export declare enum NvidiaNimModels {
|
|
647
|
+
GPT_OSS_20B = "openai/gpt-oss-20b",
|
|
647
648
|
LLAMA_3_3_70B_INSTRUCT = "meta/llama-3.3-70b-instruct",
|
|
648
649
|
LLAMA_3_1_405B_INSTRUCT = "meta/llama-3.1-405b-instruct",
|
|
649
650
|
LLAMA_3_1_70B_INSTRUCT = "meta/llama-3.1-70b-instruct",
|
package/dist/constants/enums.js
CHANGED
|
@@ -872,6 +872,13 @@ export var DeepSeekModels;
|
|
|
872
872
|
*/
|
|
873
873
|
export var NvidiaNimModels;
|
|
874
874
|
(function (NvidiaNimModels) {
|
|
875
|
+
// NVIDIA retired a large part of this list upstream on 2026-08-26 —
|
|
876
|
+
// llama-3.3-70b, llama-3.1-70b, llama-3.2-90b-vision, the deepseek-r1
|
|
877
|
+
// distill and gemma-3-27b all answer "no longer available" now. The members
|
|
878
|
+
// are kept so existing callers still compile, but the provider default
|
|
879
|
+
// below must point at something live: gpt-oss-20b is on the current roster
|
|
880
|
+
// and was probed for text, streaming, tool calling and structured output.
|
|
881
|
+
NvidiaNimModels["GPT_OSS_20B"] = "openai/gpt-oss-20b";
|
|
875
882
|
// Meta Llama
|
|
876
883
|
NvidiaNimModels["LLAMA_3_3_70B_INSTRUCT"] = "meta/llama-3.3-70b-instruct";
|
|
877
884
|
NvidiaNimModels["LLAMA_3_1_405B_INSTRUCT"] = "meta/llama-3.1-405b-instruct";
|
|
@@ -321,7 +321,7 @@ const HAND_DESCRIPTORS = [
|
|
|
321
321
|
baseURL: "NVIDIA_NIM_BASE_URL",
|
|
322
322
|
model: "NVIDIA_NIM_MODEL",
|
|
323
323
|
},
|
|
324
|
-
defaultModel: NvidiaNimModels.
|
|
324
|
+
defaultModel: NvidiaNimModels.GPT_OSS_20B,
|
|
325
325
|
toolSupport: "native",
|
|
326
326
|
localRuntime: false,
|
|
327
327
|
healthCheck: "env-only",
|
|
@@ -174,7 +174,10 @@ export class ProviderRegistry {
|
|
|
174
174
|
const nimCreds = credentials;
|
|
175
175
|
const { NvidiaNimProvider } = await import("../providers/nvidiaNim/index.js");
|
|
176
176
|
return new NvidiaNimProvider(modelName, sdk, undefined, nimCreds);
|
|
177
|
-
}, process.env.NVIDIA_NIM_MODEL ||
|
|
177
|
+
}, process.env.NVIDIA_NIM_MODEL ||
|
|
178
|
+
PROVIDER_DESCRIPTORS_BY_NAME.get(AIProviderName.NVIDIA_NIM)
|
|
179
|
+
?.defaultModel ||
|
|
180
|
+
NvidiaNimModels.GPT_OSS_20B, ["nvidia", "nim", "nvidia-nim"], PROVIDER_DESCRIPTORS_BY_NAME.get(AIProviderName.NVIDIA_NIM));
|
|
178
181
|
// Register LM Studio provider (local)
|
|
179
182
|
ProviderFactory.registerProvider(AIProviderName.LM_STUDIO, async (modelName, _providerName, sdk, _region, credentials) => {
|
|
180
183
|
const lmStudioCreds = credentials;
|
|
@@ -5,6 +5,7 @@ import { logger } from "../../utils/logger.js";
|
|
|
5
5
|
import { redactUrlCredentials } from "../../utils/logSanitize.js";
|
|
6
6
|
import { createNvidiaNimConfig, getProviderModel, validateApiKey, } from "../../utils/providerConfig.js";
|
|
7
7
|
import { OpenAIChatCompletionsProvider } from "../openaiChatCompletionsBase.js";
|
|
8
|
+
import { PROVIDER_DESCRIPTORS_BY_NAME } from "../../factories/providerDescriptors.js";
|
|
8
9
|
/**
|
|
9
10
|
* Decide whether a NIM 400 response body is a rejection of the named
|
|
10
11
|
* field (as opposed to an unrelated 400 that happens to mention the
|
|
@@ -136,7 +137,16 @@ const getNimApiKey = () => {
|
|
|
136
137
|
return validateApiKey(createNvidiaNimConfig());
|
|
137
138
|
};
|
|
138
139
|
const getDefaultNimModel = () => {
|
|
139
|
-
|
|
140
|
+
// NVIDIA retired meta/llama-3.3-70b-instruct upstream on 2026-08-26, so this
|
|
141
|
+
// fallback answered "no longer available" for anyone who selected nvidia-nim
|
|
142
|
+
// without naming a model. gpt-oss-20b is on the current roster and was
|
|
143
|
+
// probed for text, streaming, tool calling and structured output.
|
|
144
|
+
// Read the descriptor rather than repeating the literal. Review on this PR
|
|
145
|
+
// pointed out the default lived in four places and that changing only some
|
|
146
|
+
// of them is a no-op — which happened twice while tracking this down. The
|
|
147
|
+
// descriptor is the Factory+Registry convention's source of truth.
|
|
148
|
+
return getProviderModel("NVIDIA_NIM_MODEL", PROVIDER_DESCRIPTORS_BY_NAME.get("nvidia-nim")
|
|
149
|
+
?.defaultModel ?? NvidiaNimModels.GPT_OSS_20B);
|
|
140
150
|
};
|
|
141
151
|
/**
|
|
142
152
|
* NVIDIA NIM Provider — native HTTP+SSE, no AI SDK.
|
|
@@ -420,7 +420,7 @@ export const DEFAULT_MODELS = {
|
|
|
420
420
|
[AIProviderName.OPENROUTER]: OpenRouterModels.CLAUDE_SONNET_4_5,
|
|
421
421
|
[AIProviderName.OPENAI_COMPATIBLE]: "gpt-4o",
|
|
422
422
|
[AIProviderName.DEEPSEEK]: DeepSeekModels.DEEPSEEK_CHAT,
|
|
423
|
-
[AIProviderName.NVIDIA_NIM]: NvidiaNimModels.
|
|
423
|
+
[AIProviderName.NVIDIA_NIM]: NvidiaNimModels.GPT_OSS_20B,
|
|
424
424
|
// LM Studio + llama.cpp auto-discover their loaded model from /v1/models;
|
|
425
425
|
// an empty default is the documented signal to use that path.
|
|
426
426
|
[AIProviderName.LM_STUDIO]: "",
|
package/dist/utils/pricing.js
CHANGED
|
@@ -500,6 +500,14 @@ const PRICING = {
|
|
|
500
500
|
},
|
|
501
501
|
},
|
|
502
502
|
"nvidia-nim": {
|
|
503
|
+
// Source: NVIDIA build.nvidia.com listed rates for openai/gpt-oss-20b,
|
|
504
|
+
// read 2026-09-06. NIM prices and models both rot — this PR exists
|
|
505
|
+
// because the default model was decommissioned — so re-check against
|
|
506
|
+
// https://build.nvidia.com/openai/gpt-oss-20b rather than trusting this.
|
|
507
|
+
"openai/gpt-oss-20b": {
|
|
508
|
+
input: 0.05 / 1_000_000,
|
|
509
|
+
output: 0.2 / 1_000_000,
|
|
510
|
+
},
|
|
503
511
|
"meta/llama-3.3-70b-instruct": {
|
|
504
512
|
input: 0.4 / 1_000_000,
|
|
505
513
|
output: 0.4 / 1_000_000,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.12.
|
|
3
|
+
"version": "12.12.12",
|
|
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": {
|