@juspay/neurolink 13.8.12 → 13.8.14
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.
|
@@ -24,7 +24,7 @@ import { loadAccountQuotas, saveAccountQuota, } from "../../proxy/accountQuota.j
|
|
|
24
24
|
import { createCodexUsageTap } from "../../proxy/codexUsage.js";
|
|
25
25
|
import { CODEX_ACCOUNT_PREFIX, parseCodexRateLimitHeaders, } from "../../proxy/codexAccountUsage.js";
|
|
26
26
|
import { buildClientAttribution } from "../../proxy/clientAttribution.js";
|
|
27
|
-
import { getProxyUpstreamFailure } from "../../proxy/proxyFailureDetails.js";
|
|
27
|
+
import { classifyProxyFailureCode, getProxyUpstreamFailure, } from "../../proxy/proxyFailureDetails.js";
|
|
28
28
|
import { registerProxyResponseObserver, isProxyRequestFinalized, registerInternalProxyRequest, getProxyBridgeResult, releaseProxyRequestAccounting, } from "../../proxy/proxyActivity.js";
|
|
29
29
|
import { parseCodexNativeRequest, translateCodexRequestToClaude, classifyCodexOutboundFailure, buildSystemBlocksFromDeveloperMessages, } from "../../proxy/codexOutboundFallback.js";
|
|
30
30
|
import { createAnthropicFallbackStream } from "../../proxy/codexToAnthropicFallback.js";
|
|
@@ -77,6 +77,32 @@ function codexTransportScope(error) {
|
|
|
77
77
|
function summarizeCodexUpstreamError(errorText, fallback) {
|
|
78
78
|
return sanitizeForLog(errorText).slice(0, 200) || fallback;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Whether a pre-stream 401/403 refuses the REQUEST rather than the credential.
|
|
82
|
+
*
|
|
83
|
+
* Only the body can tell: a content-policy 403 and an expired-token 403 share a
|
|
84
|
+
* status. `classifyProxyFailureCode` is the verdict the outbound fallback stops
|
|
85
|
+
* on, so the pool and the fallback read one code the same way. Anything it does
|
|
86
|
+
* not call non-retryable, including a body with no code at all, stays an
|
|
87
|
+
* authentication failure.
|
|
88
|
+
*/
|
|
89
|
+
function readCodexRequestRefusal(status, errorText) {
|
|
90
|
+
if (status !== 401 && status !== 403) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
const failure = getProxyUpstreamFailure({ responseBody: errorText });
|
|
94
|
+
if (failure?.code === undefined) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const known = classifyProxyFailureCode(failure.code);
|
|
98
|
+
return known.retryable === false
|
|
99
|
+
? {
|
|
100
|
+
code: failure.code,
|
|
101
|
+
status: known.status ?? status,
|
|
102
|
+
message: failure.message,
|
|
103
|
+
}
|
|
104
|
+
: undefined;
|
|
105
|
+
}
|
|
80
106
|
/**
|
|
81
107
|
* In-flight proactive refreshes, keyed by account.
|
|
82
108
|
*
|
|
@@ -1389,6 +1415,32 @@ async function handleCodexUpstreamFailure(rt, args) {
|
|
|
1389
1415
|
const { writeAttempt } = rt;
|
|
1390
1416
|
const { account, attempt, attemptStartedAt, upstream, authRetried } = args;
|
|
1391
1417
|
const errText = await upstream.text().catch(() => "");
|
|
1418
|
+
// A refusal of the request itself says nothing about the account: a refresh
|
|
1419
|
+
// would rotate its refresh token for nothing, a cooldown would park a healthy
|
|
1420
|
+
// account, and every other account would be refused the same way.
|
|
1421
|
+
const refusal = readCodexRequestRefusal(upstream.status, errText);
|
|
1422
|
+
if (refusal) {
|
|
1423
|
+
const errorMessage = refusal.message ??
|
|
1424
|
+
summarizeCodexUpstreamError(errText, "Codex refused the request");
|
|
1425
|
+
recordAttemptError(account.label, CODEX_ACCOUNT_TYPE, upstream.status);
|
|
1426
|
+
writeAttempt(account, attempt, attemptStartedAt, upstream.status, {
|
|
1427
|
+
errorType: "invalid_request_error",
|
|
1428
|
+
errorCode: refusal.code,
|
|
1429
|
+
errorMessage,
|
|
1430
|
+
retryable: false,
|
|
1431
|
+
});
|
|
1432
|
+
return {
|
|
1433
|
+
lastFailure: {
|
|
1434
|
+
errorType: "invalid_request_error",
|
|
1435
|
+
errorCode: refusal.code,
|
|
1436
|
+
retryable: false,
|
|
1437
|
+
},
|
|
1438
|
+
lastErrorStatus: refusal.status,
|
|
1439
|
+
lastErrorCode: refusal.code,
|
|
1440
|
+
lastErrorMessage: errorMessage,
|
|
1441
|
+
refusedRequest: true,
|
|
1442
|
+
};
|
|
1443
|
+
}
|
|
1392
1444
|
// 401/403 → try a forced token refresh once, then rotate.
|
|
1393
1445
|
if ((upstream.status === 401 || upstream.status === 403) &&
|
|
1394
1446
|
!authRetried &&
|
|
@@ -1486,9 +1538,10 @@ async function handleCodexUpstreamFailure(rt, args) {
|
|
|
1486
1538
|
}
|
|
1487
1539
|
// Other non-ok → record and rotate.
|
|
1488
1540
|
if (upstream.status === 401 || upstream.status === 403) {
|
|
1489
|
-
// Reached
|
|
1490
|
-
//
|
|
1491
|
-
//
|
|
1541
|
+
// Reached when the account has no refresh token to retry with, or when
|
|
1542
|
+
// the retry after a refresh was rejected again. Either way it will fail
|
|
1543
|
+
// identically on the next request, so park it briefly instead of letting
|
|
1544
|
+
// it stay first in line with unknown quota.
|
|
1492
1545
|
await saveAccountCooldown(account.key, Date.now() + CODEX_AUTH_COOLDOWN_MS, "auth").catch(() => undefined);
|
|
1493
1546
|
}
|
|
1494
1547
|
const errorMessage = summarizeCodexUpstreamError(errText, "Codex error");
|
|
@@ -1733,7 +1786,8 @@ loopbackPort, internalDispatch) {
|
|
|
1733
1786
|
let lastErrorCode;
|
|
1734
1787
|
let lastFailure = { errorType: "all_accounts_failed" };
|
|
1735
1788
|
let lastAttemptedAccount;
|
|
1736
|
-
|
|
1789
|
+
let requestRefused = false;
|
|
1790
|
+
accountLoop: for (const account of eligible) {
|
|
1737
1791
|
try {
|
|
1738
1792
|
tracer?.setAccountSelection({
|
|
1739
1793
|
strategy: "codex-quota-order",
|
|
@@ -1859,6 +1913,11 @@ loopbackPort, internalDispatch) {
|
|
|
1859
1913
|
}
|
|
1860
1914
|
({ lastFailure, lastErrorStatus, lastErrorCode, lastErrorMessage } =
|
|
1861
1915
|
failure);
|
|
1916
|
+
if (failure.refusedRequest) {
|
|
1917
|
+
// Every other account would be refused the same way.
|
|
1918
|
+
requestRefused = true;
|
|
1919
|
+
break accountLoop;
|
|
1920
|
+
}
|
|
1862
1921
|
break;
|
|
1863
1922
|
}
|
|
1864
1923
|
}
|
|
@@ -1874,7 +1933,7 @@ loopbackPort, internalDispatch) {
|
|
|
1874
1933
|
...lastFailure,
|
|
1875
1934
|
errorMessage: lastFailure.errorMessage ?? lastErrorMessage,
|
|
1876
1935
|
});
|
|
1877
|
-
return buildCodexErrorResponse(lastErrorStatus, lastErrorMessage);
|
|
1936
|
+
return buildCodexErrorResponse(lastErrorStatus, lastErrorMessage, requestRefused ? lastErrorCode : undefined);
|
|
1878
1937
|
};
|
|
1879
1938
|
try {
|
|
1880
1939
|
return await dispatch();
|
package/dist/types/proxy.d.ts
CHANGED
|
@@ -1068,6 +1068,10 @@ export type CodexRotationFailure = {
|
|
|
1068
1068
|
lastErrorStatus: number;
|
|
1069
1069
|
lastErrorCode: string | undefined;
|
|
1070
1070
|
lastErrorMessage: string;
|
|
1071
|
+
/** The upstream refused the request itself (a policy or invalid-request
|
|
1072
|
+
* code), not the account: no other account would answer differently, so the
|
|
1073
|
+
* pool ends the request here instead of rotating. */
|
|
1074
|
+
refusedRequest?: boolean;
|
|
1071
1075
|
};
|
|
1072
1076
|
/** Minimal persistence contract needed by Codex rotating-token refreshes. */
|
|
1073
1077
|
export type CodexRefreshTokenStore = {
|
|
@@ -228,24 +228,16 @@ const TOP_MODELS_CONFIG = {
|
|
|
228
228
|
],
|
|
229
229
|
[AIProviderName.NVIDIA_NIM]: [
|
|
230
230
|
{
|
|
231
|
-
model:
|
|
232
|
-
description: "Recommended -
|
|
231
|
+
model: NvidiaNimModels.GPT_OSS_20B,
|
|
232
|
+
description: "Recommended - gpt-oss 20B (default)",
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
model:
|
|
236
|
-
description: "
|
|
235
|
+
model: NvidiaNimModels.LLAMA_3_2_11B_VISION,
|
|
236
|
+
description: "Llama 3.2 11B vision",
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
model:
|
|
240
|
-
description: "
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
model: "meta/llama-3.2-90b-vision-instruct",
|
|
244
|
-
description: "Llama 3.2 vision",
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
model: "mistralai/mixtral-8x22b-instruct-v0.1",
|
|
248
|
-
description: "Mixtral 8x22B",
|
|
239
|
+
model: NvidiaNimModels.LLAMA_3_2_90B_VISION,
|
|
240
|
+
description: "Llama 3.2 90B vision",
|
|
249
241
|
},
|
|
250
242
|
],
|
|
251
243
|
[AIProviderName.LM_STUDIO]: [
|
|
@@ -2672,13 +2672,13 @@
|
|
|
2672
2672
|
{"objectID":"2c1717347ebf0ec18b9aa2738c5628682d4318c893427fdc5267caed3fe54845","title":"3. Client auto-configuration","url":"/docs/features/codex-proxy-support#3-client-auto-configuration","content":"When neurolink proxy start runs (non-dev), it configures the Codex CLI the same way it configures Claude Code and OpenCode. It appends a marker-delimited block to ~/.codex/config.toml:\n\nYour original model_provider value is snapshotted to ~/.neurolink/codex-proxy-snapshot.json and restored on shutdown, so the edit is fully reversible even if the proxy crashes. The managed block is delimited by markers and removed cleanly on clear. If ~/.codex/config.toml doesn't exist, the step is skipped silently.\n\nRestart Codex after starting the proxy for it to pick up the new provider.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"3. Client auto-configuration","lvl3":""}},
|
|
2673
2673
|
{"objectID":"404cd8f6d8542fc84651326cf0b252e7c3c3098678409fecaf8c2ff1559906fd","title":"4. Quota and routing","url":"/docs/features/codex-proxy-support#4-quota-and-routing","content":"Codex reports two rate-limit windows — primary (short) and secondary (weekly) — which map onto the shared AccountQuota model as the session and weekly fields respectively. That means Codex reuses the existing cooldown, persistence, and display code rather than duplicating it.\n\nAccount ordering is fill-first and quota-aware:\nAccounts on cooldown sort last.\nWithin the same cooldown state, accounts with a rejected unified quota sort after accounts without known rejection, even when their session usage is low or unknown.\nWithin each group, accounts with no session quota measurement sort first — they get probed so they become comparable, rather than being starved.\nOtherwise, least session utilization first. Rejected accounts remain eligible after preferred accounts so stale rejection evidence cannot permanently prevent a recovery probe.\n\nCooldown reasons map to the shared vocabulary: a rejected weekly window cools until its real reset (weekly), a rejected primary window until its reset (session), and a plain burst limit gets a bounded transient cooldown (60 s floor, 15 min ceiling).\n\nQuota and cooldown state are keyed by the full codex: account key, so a Codex account and an Anthropic account that share a bare label never collide.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"4. Quota and routing","lvl3":""}},
|
|
2674
2674
|
{"objectID":"acb592d28fcb90659fa175ac4f0d1e73cfb535d0aac2b63a101f0722e538eff7","title":"5. Response headers","url":"/docs/features/codex-proxy-support#5-response-headers","content":"A response served by the Codex pool carries these attribution headers. A\nresponse served by the outbound fallback\ncarries only x-neurolink-served-by: the account, attempt and quota headers\ndescribe a Codex account, and none served that turn.\n\n| Header | Meaning |\n| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| x-neurolink-account | Which pooled account served the request |\n| x-neurolink-account-type | Always codex-oauth |\n| x-neurolink-served-by | codex, or codex-outbound-fallback:anthropic / codex-outbound-fallback:vertex when the outbound fallback served the turn |\n| x-neurolink-attempt | Which attempt succeeded (1 = first account tried) |\n| x-neurolink-quota-source | live when the backend reported quota, else none |\n| x-neurolink-quota-session-left-pct | Remaining primary-window headroom |\n| x-neurolink-quota-weekly-left-pct | Canonical remaining","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"5. Response headers","lvl3":""}},
|
|
2675
|
-
{"objectID":"2b17d62c4d9cb65067100d6a90003bee2dce2bc06ede425f25f0b761aade359a","title":"6. Error handling","url":"/docs/features/codex-proxy-support#6-error-handling","content":"| Condition
|
|
2675
|
+
{"objectID":"2b17d62c4d9cb65067100d6a90003bee2dce2bc06ede425f25f0b761aade359a","title":"6. Error handling","url":"/docs/features/codex-proxy-support#6-error-handling","content":"| Condition | Behaviour |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| No Codex accounts configured | 401 with a message pointing at neurolink auth login codex |\n| All accounts cooling | Terminal response.failed SSE event (200, retry-after computed from the soonest recovery) instead of a bare 429, so the CLI shows a real error instead of \"Reconnecting...\" |\n| All accounts auth-cooling | The same terminal event with code server_error instead of insufficient_quota (every account is parked by an auth failure), so it is not reported as spent quota |\n| 401 / 403 from upstream | One forced token refresh and a retry; a second rejection parks the account for 60 s and rotates; a failed refresh disables the account until re-login |\n| 401 / 403 with a request-refusal code | The request ends on that account with no refresh, cooldown or rotation: a policy code answers 403, an invalid-request code keeps the upstream status (see below) |\n| 429 | Cool the account per its reported window, then rotate |\n| 5xx / network | Rotate to the next account |","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"6. Error handling","lvl3":""}},
|
|
2676
2676
|
{"objectID":"9b1627d0fcff6a9e292b7f794fb47e62eb3da6b9c633e308da2b1de08a83368d","title":"7. Implementation map","url":"/docs/features/codex-proxy-support#7-implementation-map","content":"| File | Role |\n| ------------------------------------------- | ----------------------------------------------------------------------------------------- |\n| src/lib/types/codex.ts | Codex auth-file, token, and rate-limit types |\n| src/lib/auth/codexOAuth.ts | Endpoints/constants, auth.json import, token refresh, JWT decode, account-id resolution |\n| src/lib/proxy/codexAccountUsage.ts | Account enumeration, usage fetch, quota normalisation, header parsing |\n| src/lib/server/routes/codexProxyRoutes.ts | The pool engine: load → order → forward → rotate |\n| src/cli/commands/auth.ts | auth login codex, Codex rows in auth list --refresh |\n| src/cli/commands/proxy.ts | Route registration, /backend-api/* request tracking, ~/.codex/config.toml management |\n\nThe Anthropic engine in claudeProxyRoutes.ts is untouched. The Codex engine is deliberately leaner: it does pre-commit rotation but not the full transient-retry-budget or admission-lease machinery.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"7. Implementation map","lvl3":""}},
|
|
2677
2677
|
{"objectID":"c90a5222434bc717385c13b9e9f9cb865d3ce71ed7a58c077a7b5241def7d086","title":"8. Caveats","url":"/docs/features/codex-proxy-support#8-caveats","content":"Model ids matter. The ChatGPT backend rejects models that aren't available to Codex-with-a-ChatGPT-account (e.g. gpt-5-codex returns a 400). Use the model your Codex config already uses.\nTerms of service. Pooling multiple personal ChatGPT subscriptions through one client fingerprint is the kind of pattern subscription anti-abuse systems are built to detect. The originator, installation_id, user-agent, and turn-metadata headers are all correlatable. Pooling your own accounts is materially different from sharing across people — weigh the account-ban risk accordingly.\nNative browser login is not implemented. The verified path is importing an existing codex login credential. The OAuth constants (authorize URL, PKCE, scopes) are present in codexOAuth.ts for a future native flow.\nQuota-aware ordering is unverified against the live backend. The usage endpoint and the rate-limit header shape were reconstructed from a capture, not confirmed end to end. If either is wrong, fetchCodexAccountUsage returns no quota, x-neurolink-quota-source reads none, and ordering degenerates to insertion order while every 429 falls back to the 15-minute transient cooldown. Rotation still works; it is simply not quota-aware. Verify with neurolink auth list --refresh — a codex usage … error line per account means the quota path is not live.\nSSE usage-limit signals are not acted on. Only an HTTP 429 triggers a cooldown and rotation. A 200 response whose SSE stream carries usage_limit_reached (or the workspace-credit variants) is relayed to the client untouched, so the account is neither cooled nor rotated away from. HTTP-level exhaustion is handled; in-stream exhaustion is not.\nClient fingerprint is forwarded verbatim. The proxy replaces the caller's credentials but does not regenerate originator, installation_id, session-id, or turn metadata per account, so every pooled account shares the client's fingerprint. This is what makes the terms-of-service point above concrete.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"8. Caveats","lvl3":""}},
|
|
2678
2678
|
{"objectID":"607b92eb2c3b89a57438267a92b6212e616ad0dd106cb1c1a6bd0514c3446cd2","title":"Model discovery","url":"/docs/features/codex-proxy-support#model-discovery","content":"The Codex CLI refreshes its model list on every invocation:\n\nThe proxy relays that upstream to chatgpt.com/backend-api/codex/models using a\npooled account, forwarding the CLI's own query parameters.\n\nIt relays rather than synthesises, unlike the Claude and OpenAI /v1/models\nroutes, which build their lists locally from the model router. Which Codex\nmodels an account can reach is a property of that account — plan tier, rollout\nstate — not something this proxy knows, so a locally-built list would be a guess\nthat reads as authoritative.\n\nTwo details matter to anyone touching it:\nclient_version is required upstream. Omit it and ChatGPT answers 400\n with a pydantic Field required on ('query', 'client_version'). The query\n is rebuilt from ctx.query; ctx.path carries no query string, and reading it\n from there drops the parameter silently.\nDiscovery is side-effect free. No cooldown is recorded and no quota is\n consumed, so the once-per-invocation refresh cannot influence routing for real\n traffic. A cooling account is still allowed to answer it — being rate-limited\n for completions does not make an account unable to say which models exist.\n\nBefore this route existed the request 404'd, and the CLI printed\nfailed to refresh available models: unexpected status 404 Not Found on every\nrun before silently falling back to a default model — quietly ignoring the model\nthe user had configured.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"Model discovery","lvl3":""}},
|
|
2679
2679
|
{"objectID":"6d2395f1bb843928fffc947203d5d331fb549bb7d9403adfa777e676578b4d18","title":"Status: implemented, default OFF, request-shape verified only — see \"Live validation\" below","url":"/docs/features/codex-proxy-support#status-implemented-default-off-request-shape-verified-only-see-live-validation-below","content":"Sections 1-8 above cover the inbound direction: a Codex CLI request served\nby the Codex/ChatGPT pool engine. This section covers the opposite direction —\na native Codex /backend-api/codex/responses request that, when every Codex\naccount is exhausted or otherwise ineligible, is translated into an\nAnthropic Messages request and served by either the Anthropic OAuth pool (via\nan in-process loopback, no extra network hop to this same proxy) or a\nVertex-Claude passthrough account, then translated back into the Codex\nResponses wire shape the CLI expects. It is a third direction alongside the\ntwo-engine matrix in the rest of this document, not a replacement for either.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"Status: implemented, default OFF, request-shape verified only — see \"Live validation\" below","lvl3":""}},
|
|
2680
2680
|
{"objectID":"3c2f324de0830846bbdce959aabe14903475260a2adfabf478b669fef52ac726","title":"9.1 Enabling it","url":"/docs/features/codex-proxy-support#91-enabling-it","content":"The kill switch defaults to off. Nothing changes for an existing Codex\npool setup until you opt in:\n\nor via environment variable, which overrides the YAML key:\n\ncodex-outbound-fallback-targets is required (non-empty) for the fallback to\never fire — the kill switch alone is not enough. provider must be anthropic\nor vertex; up to 8 targets are accepted and validated at config-load time.\nWith the flag off, or with no targets configured, an exhausted Codex request\nbehaves exactly as it did before this feature existed: the same terminal\nresponse.failed SSE / 401 behaviour documented in section 6 above, byte-\nfor-byte.\n\nThe anthropic target needs the CLI proxy's in-process loopback. Dispatch\nto an anthropic target goes through an in-process loopback\n(127.0.0.1:<loopbackPort> plus an unforgeable internalDispatch marker, see\n§9.3) rather than a second network hop, and only neurolink proxy start (the\nCLI proxy command) wires that loopback through today. createAllRoutes /\nregisterAllRoutes — the generic SDK route surface in\nsrc/lib/server/routes/index.ts, used when embedding the proxy routes in your\nown server — does not thread loopbackPort/internalDispatch into\ncreateCodexProxyRoutes, so enabling this feature there with an anthropic\ntarget configured cannot actually dispatch: route creation logs one warning\nand every such request falls through to the normal Codex-exhaustion behaviour\nin section 6, indistinguishable on the wire from the feature being off. A\nvertex target has no such gap — it dispatches over executeVertexAnthropicFallback\nregardless of which route surface created the routes. If you need the\nanthropic target from the SDK route surface, run the CLI proxy alongside\nyour server, or wait for loopbackPort/internalDispatch to be threaded\nthrough CreateRoutesOptions (not yet implemented — see the doc comments on\ncreateAllRoutes and CreateRoutesOptions.runtimeConfigProvider).","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.1 Enabling it","lvl3":""}},
|
|
2681
|
-
{"objectID":"d20a853143464660ecb4669832c8c0d5e24292564bc7ea9161354afda9a39223","title":"9.2 When it triggers","url":"/docs/features/codex-proxy-support#92-when-it-triggers","content":"attemptCodexOutboundFallback (module-private in codexProxyRoutes.ts) is\nconsulted only after every Codex account has been tried and failed, and only\nwhen all of the following hold, in this order — any one failing gate means\n\"not attempted\", and the request falls through to the normal Codex-exhaustion\nbehaviour in section 6:\nThe inbound request is not itself already a fallback leg (see loop\n prevention below).\nruntimeConfigProvider is configured (the proxy is running with the\n runtime-config feature enabled at all).\nclassifyCodexOutboundFailure judges the failure itself eligible — a total\n function, not a heuristic guess, over the terminal Codex failure class.\nThe kill switch (codexOutboundFallbackEnabled) is on.\ncodexOutboundFallbackTargets is non-empty.\nThe native Codex request body parses (parseCodexNativeRequest) — a\n request the translator cannot even parse is never a candidate.\n\nWhen the account loop runs out, the last attempt decides eligibility. A\n401/403 across the whole pool is a Codex credential failure and falls back, as\ndo 429 and 5xx. A content-policy or invalid-request error code\n(classifyProxyFailureCode), or any other 4xx, rejects the request itself and\nis returned unchanged.\n\nThe Anthropic loopback has a 5-minute timeout that covers the connection until\nits response headers arrive. After that the stream runs as long as the turn\ndoes; a client disconnect still ends it.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.2 When it triggers","lvl3":""}},
|
|
2681
|
+
{"objectID":"d20a853143464660ecb4669832c8c0d5e24292564bc7ea9161354afda9a39223","title":"9.2 When it triggers","url":"/docs/features/codex-proxy-support#92-when-it-triggers","content":"attemptCodexOutboundFallback (module-private in codexProxyRoutes.ts) is\nconsulted only after every Codex account has been tried and failed, and only\nwhen all of the following hold, in this order — any one failing gate means\n\"not attempted\", and the request falls through to the normal Codex-exhaustion\nbehaviour in section 6:\nThe inbound request is not itself already a fallback leg (see loop\n prevention below).\nruntimeConfigProvider is configured (the proxy is running with the\n runtime-config feature enabled at all).\nclassifyCodexOutboundFailure judges the failure itself eligible — a total\n function, not a heuristic guess, over the terminal Codex failure class.\nThe kill switch (codexOutboundFallbackEnabled) is on.\ncodexOutboundFallbackTargets is non-empty.\nThe native Codex request body parses (parseCodexNativeRequest) — a\n request the translator cannot even parse is never a candidate.\n\nWhen the account loop runs out, the last attempt decides eligibility. A\n401/403 across the whole pool is a Codex credential failure and falls back, as\ndo 429 and 5xx. A content-policy or invalid-request error code\n(classifyProxyFailureCode), or any other 4xx, rejects the request itself and\nis returned unchanged. A pre-stream 401/403 carrying such a code never reaches\nthis point: the pool ends the request on the account that received it (see\nsection 6).\n\nThe Anthropic loopback has a 5-minute timeout that covers the connection until\nits response headers arrive. After that the stream runs as long as the turn\ndoes; a client disconnect still ends it.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.2 When it triggers","lvl3":""}},
|
|
2682
2682
|
{"objectID":"63d9622db4658e47ba8122e511162860b322d42d2b741a5c76611250fe670550","title":"9.3 Loop prevention","url":"/docs/features/codex-proxy-support#93-loop-prevention","content":"Two independent guards, so a defect in one does not remove the bound:\nMarker guard. The moment every gate above has passed and a real\n dispatch attempt is about to begin, codexProxyRoutes.ts sets\n ctx.metadata[\"neurolink.codexOutboundFallbackAttempted\"] = true on the\n request context. Gate 1 above checks this same key, so a request that has\n already crossed engines once can never be offered a second outbound-fallback\n attempt within the same client request. This is a single flag, not a\n per-target counter, because at most one crossing is ever allowed regardless\n of how many of the internal dispatch call sites reach this function.\nDepth counter (defense-in-depth). ctx.metadata[\"neurolink.fallbackHopDepth\"]\n is incremented on every engine crossing (never on a same-engine account\n rotation) and checked against MAX_ENGINE_CROSSINGS = 1, independent of the\n marker check above. The invariant this enforces: the ordered sequence of\n engines serving any one client request has length ≤ 2 with no repeat — only\n [codex], [anthropic], [codex,anthropic], [anthropic,codex] are\n possible. A leg that is itself already an inner fallback of the other engine\n can never itself fall outbound again.\n\nA request that reaches this point already carrying a forged\ncodexOutboundFallbackAttempted-shaped marker from outside is not trusted —\nthe key lives on the server-side request context (ctx.metadata), not on\nanything the client can set on the wire, so there is no client-controlled way\nto spoof past gate 1.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.3 Loop prevention","lvl3":""}},
|
|
2683
2683
|
{"objectID":"21189de88d4ffef1c2a4bbd0420442de71fe8d9fd6b9f6278867e39602e075c6","title":"9.4 What gets translated","url":"/docs/features/codex-proxy-support#94-what-gets-translated","content":"Request translation (src/lib/proxy/codexOutboundFallback.ts):\nCodex additional_tools namespaces (functions, collaboration, …) are\n flattened into one Claude tools array, preserving declaration order —\n namespace order, then tool order within each namespace — never regrouped or\n resorted by tool kind.\nA tool's kind (function vs custom) is read from the tool declaration's\n own type field, never inferred from which namespace it was declared under.\nFunction-tool JSON Schemas are dereferenced with inlineJsonSchema: plain,\n resolvable $ref/$defs (draft-07 definitions and 2020-12 $defs) are\n flattened into the inline schema and the pointer keys stripped entirely.\n A genuinely circular $ref degrades to {type: \"object\"} and is counted\n under the circular_ref_flattened degrade reason (see metrics below); a\n plain non-circular $ref is not.\nGrammar/custom tools (Lark grammar, regex format) have no JSON Schema\n equivalent, so they are wrapped as a single {input: string} parameter, with\n the response mapped back to a custom_tool_call item. This is lossy and\n explicitly flagged in code, and is the shipped behavior — see \"Sign-off\n status\" below.\nReasoning effort (minimal/low/medium/high/xhigh/max on the Codex\n side) maps to an Anthropic thinking budget via mapCodexReasoningToThinking:\n low→4096, medium→8192, high→16384, xhigh→24576, max→32768, clamped to\n [1024, max_tokens - 1024]. Thinking is left off when tool_choice is\n forced, or when the immediately preceding assistant turn called a tool.\nA non-object function_call_output/custom_tool_call_output argument falls\n back to {input: raw} in the translated history rather than failing the\n translation.\n\nResponse translation (codexResponsesFormat.ts / codexToAnthropicFallback.ts)\nconverts the Claude response — including SSE streaming — back into the Codex\nResponses wire shape the CLI expects, so a client cannot tell, from the wire\nalone, that its request was served by a different engine underneath.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.4 What gets translated","lvl3":""}},
|
|
2684
2684
|
{"objectID":"4a8c83d10dbaa054203c48c374f7aed2688cb58670135943b0b2c6cd358cf129","title":"9.5 Accounting","url":"/docs/features/codex-proxy-support#95-accounting","content":"A translated request is billed and recorded exactly like any other proxied\nrequest on the serving engine — the same OTel usage record, cache/reasoning\nbuckets, and cost estimate described in Usage accounting\n(section 1) apply, attributed to the Anthropic or Vertex account that actually\nserved it, not to a Codex account. There is no separate \"fallback\" ledger; look\nat the served-by account's own usage.\n\nThe Codex route's final record names what served the turn: provider,\nmodel, account and accountType are the Claude target's, and\nrequestedModel stays the Codex model the client asked for. With the Anthropic\ntarget, the loopback's own /v1/messages record owns the usage, and the Codex\nrecord points to it through usageOwnerRequestId, so the call is counted once.\nWith Vertex there is no child record, so the Codex record carries the usage and\nis priced from the Vertex table.\n\nThe translated request marks its stable prefix with a 1-hour cache TTL. 1-hour\nwrites (usage.cache_creation.ephemeral_1h_input_tokens) are recorded as\ncacheCreation1hTokens, a subset of the cache-write total, and priced at 2x\nbase input, Anthropic's 1-hour rate on every Claude model. The rest of the\ncache writes keep the 5-minute rate (1.25x).\n\nThe token/cost metrics carry an origin attribute (ProxyRequestOrigin:\n\"native\" | \"codex-fallback\"), but only when it is not \"native\" — a\nplain Codex or Claude request emits the exact same label set it always has,\nwith no origin key at all, so existing dashboards and alerts over these\nmetrics are unaffected. Only a request actually served by this outbound-fallback\npath carries origin=\"codex-fallback\", set via\ntracer.setRequestOrigin(\"codex-fallback\") once a target has been dispatched\nand will serve the turn (both the Anthropic-loopback and Vertex targets); a\nrequest whose every target fails keeps \"native\".","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"9.5 Accounting","lvl3":""}},
|
|
@@ -4408,7 +4408,7 @@
|
|
|
4408
4408
|
{"objectID":"f7ec45d333ef30219c7a1569e33dc05b0b489f8dced84c264c18e9fb9fe2458d","title":"Optional Variables","url":"/docs/getting-started/environment-variables#optional-variables-13","content":"Optional Variables","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Optional Variables","lvl3":""}},
|
|
4409
4409
|
{"objectID":"bc288fb117658972a30a2ba66e55e1dcd187c9d1da8ae1b35f52e5d645e41344","title":"NIM-Specific Extras (rarely needed)","url":"/docs/getting-started/environment-variables#nim-specific-extras-rarely-needed","content":"NIM-Specific Extras (rarely needed)","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"NIM-Specific Extras (rarely needed)","lvl3":""}},
|
|
4410
4410
|
{"objectID":"c331d4617737a5cfad44f0f398c430267deb83896fbef84b4cda5c56ebaeef0e","title":"How to Get NVIDIA NIM API Key","url":"/docs/getting-started/environment-variables#how-to-get-nvidia-nim-api-key","content":"Visit NVIDIA Build\nSign in with your NVIDIA developer account\nOpen Settings → API Keys\nGenerate a new API key (Bearer token)","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"How to Get NVIDIA NIM API Key","lvl3":""}},
|
|
4411
|
-
{"objectID":"abbfcedf11a5293f784a6021af47a1967d14526ce324a2fbaaf6ac00adafc58d","title":"Supported Models","url":"/docs/getting-started/environment-variables#supported-models-11","content":"
|
|
4411
|
+
{"objectID":"abbfcedf11a5293f784a6021af47a1967d14526ce324a2fbaaf6ac00adafc58d","title":"Supported Models","url":"/docs/getting-started/environment-variables#supported-models-11","content":"openai/gpt-oss-20b (default) - OpenAI gpt-oss 20B, 128K context, tool calling\nAny model listed at build.nvidia.com/models","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Supported Models","lvl3":""}},
|
|
4412
4412
|
{"objectID":"8f65b0307933689fcf5717a2ddab1b3fe48b44a25993beaefc0c203716cf1894","title":"14. LM Studio (Local)","url":"/docs/getting-started/environment-variables#14-lm-studio-local","content":"LM Studio is a local provider — no API key is required for standard installations.","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"14. LM Studio (Local)","lvl3":""}},
|
|
4413
4413
|
{"objectID":"be426d22afb7ec4c8d630b72b6a1db679d001843a82df2143197d88811cbb12a","title":"Optional Variables","url":"/docs/getting-started/environment-variables#optional-variables-14","content":"Optional Variables","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Optional Variables","lvl3":""}},
|
|
4414
4414
|
{"objectID":"caa673ab6f5de21d611dd1eef67dd4e07afecf10d8cb0201102b839e96995bca","title":"How to Set Up LM Studio","url":"/docs/getting-started/environment-variables#how-to-set-up-lm-studio","content":"Install LM Studio from lmstudio.ai\nOpen LM Studio and download a model (e.g., Llama 3.2 3B Instruct)\nClick Local Server → Start Server\nThe server starts at http://localhost:1234/v1 by default\nNeuroLink auto-discovers the loaded model; no LM_STUDIO_MODEL needed\n\nNote: LM_STUDIO_API_KEY is only needed if you run LM Studio behind an authenticating reverse-proxy. Vanilla local installs do not require an API key.","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"How to Set Up LM Studio","lvl3":""}},
|
|
@@ -4622,12 +4622,12 @@
|
|
|
4622
4622
|
{"objectID":"d82f8c3a0407aac56f55f222e4c0095b9fad1925db7a1dd2fbec190f55f331dc","title":"Basic Setup","url":"/docs/getting-started/provider-setup#basic-setup-10","content":"Basic Setup","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Basic Setup","lvl3":""}},
|
|
4623
4623
|
{"objectID":"e7666199cf52c152bbd2e935e2d51ca0df577da915eaa38aac807a227a4c181d","title":"Optional Configuration","url":"/docs/getting-started/provider-setup#optional-configuration-9","content":"Optional Configuration","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Optional Configuration","lvl3":""}},
|
|
4624
4624
|
{"objectID":"18321846566326d1547ba20c35f8190c7ae9c6fb3d6fb0fa9d807cdd7e32e1e0","title":"NIM-Specific Extras (Advanced)","url":"/docs/getting-started/provider-setup#nim-specific-extras-advanced","content":"These environment variables pass NIM-specific request body extensions. Leave them unset unless you have a specific need:","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"NIM-Specific Extras (Advanced)","lvl3":""}},
|
|
4625
|
-
{"objectID":"06fd92c3629ac0be9484c9214a7cfb3e40336689fdd7a7196b5adabb520e43ac","title":"Supported Models","url":"/docs/getting-started/provider-setup#supported-models-7","content":"
|
|
4625
|
+
{"objectID":"06fd92c3629ac0be9484c9214a7cfb3e40336689fdd7a7196b5adabb520e43ac","title":"Supported Models","url":"/docs/getting-started/provider-setup#supported-models-7","content":"openai/gpt-oss-20b (default) - OpenAI gpt-oss 20B, 128K context, tool calling\nAny model from the NVIDIA NIM catalog","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Supported Models","lvl3":""}},
|
|
4626
4626
|
{"objectID":"e6822aacc3d662745a63786eb8d1399f45bb6bcac22898feda9b93b7b5a55c6d","title":"Usage Example","url":"/docs/getting-started/provider-setup#usage-example-14","content":"Usage Example","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Usage Example","lvl3":""}},
|
|
4627
4627
|
{"objectID":"b23f6c751e3a8b2b4bfece3ba129b68e25f6e00204058cadf954d3eb8a36b82a","title":"CLI Usage","url":"/docs/getting-started/provider-setup#cli-usage-1","content":"CLI Usage","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"CLI Usage","lvl3":""}},
|
|
4628
4628
|
{"objectID":"ec23735e5a15302451c7946e68ac107725e3f606c15810eead6bc36995b53af5","title":"Self-Hosted NIM Endpoints","url":"/docs/getting-started/provider-setup#self-hosted-nim-endpoints","content":"Override the base URL to point at your own NIM deployment:","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Self-Hosted NIM Endpoints","lvl3":""}},
|
|
4629
4629
|
{"objectID":"01e42c60deafa5c50f53dd6572412b847c871735a4014652a0480cac5a5608ee","title":"Getting Started with NVIDIA NIM","url":"/docs/getting-started/provider-setup#getting-started-with-nvidia-nim","content":"Create Account: Visit build.nvidia.com\nOpen Settings: Navigate to Settings → API Keys\nGenerate Key: Create a new Bearer token API key\nBrowse Models: Explore the catalog at build.nvidia.com/models\nSet Environment: Export NVIDIA_NIM_API_KEY","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Getting Started with NVIDIA NIM","lvl3":""}},
|
|
4630
|
-
{"objectID":"2d33feba1ccdb840a4e9dbf01aaa90979c0c1335ef47a1a81b5d19e0e282dc46","title":"Environment Variables Reference","url":"/docs/getting-started/provider-setup#environment-variables-reference-3","content":"| Variable | Required | Default | Description |\n| ------------------------------- | -------- | ------------------------------------- | --------------------------------------- |\n| NVIDIA_NIM_API_KEY | ✅ | - | NVIDIA NIM API key (Bearer token) |\n| NVIDIA_NIM_MODEL | ❌ |
|
|
4630
|
+
{"objectID":"2d33feba1ccdb840a4e9dbf01aaa90979c0c1335ef47a1a81b5d19e0e282dc46","title":"Environment Variables Reference","url":"/docs/getting-started/provider-setup#environment-variables-reference-3","content":"| Variable | Required | Default | Description |\n| ------------------------------- | -------- | ------------------------------------- | --------------------------------------- |\n| NVIDIA_NIM_API_KEY | ✅ | - | NVIDIA NIM API key (Bearer token) |\n| NVIDIA_NIM_MODEL | ❌ | openai/gpt-oss-20b | Default model |\n| NVIDIA_NIM_BASE_URL | ❌ | https://integrate.api.nvidia.com/v1 | Override for self-hosted NIM |\n| NVIDIA_NIM_TOP_K | ❌ | - | Top-K sampling parameter |\n| NVIDIA_NIM_MIN_P | ❌ | - | Min-P sampling parameter |\n| NVIDIA_NIM_REPETITION_PENALTY | ❌ | - | Repetition penalty |\n| NVIDIA_NIM_MIN_TOKENS | ❌ | - | Minimum tokens to generate |\n| NVIDIA_NIM_CHAT_TEMPLATE | ❌ | - | Override model chat template (advanced) |","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Environment Variables Reference","lvl3":""}},
|
|
4631
4631
|
{"objectID":"109acc4b5c1417599beb44840e21a88619106838727981fb5e0feae447a57038","title":"Provider ID and Aliases","url":"/docs/getting-started/provider-setup#provider-id-and-aliases-1","content":"Provider ID: nvidia-nim\nAliases: nim, nvidia","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Provider ID and Aliases","lvl3":""}},
|
|
4632
4632
|
{"objectID":"0de45c35b35d239ea38353c402bc07233b46803a89df62d4d0aecf8fd0a53e53","title":"LM Studio Configuration","url":"/docs/getting-started/provider-setup#lm-studio","content":"LM Studio is a local AI provider — it runs models entirely on your machine with no data sent to any external service. No API key is required for standard (non-proxied) installations.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"LM Studio Configuration","lvl3":""}},
|
|
4633
4633
|
{"objectID":"51046d75613781b1d2770a64f2dbba80729a2e607c4aa529d60f2b53ca6676c4","title":"Prerequisites","url":"/docs/getting-started/provider-setup#prerequisites-2","content":"Install LM Studio from lmstudio.ai\nOpen LM Studio and download a model from the Discover tab\nGo to Local Server and click Start Server\n\nThe server starts at http://localhost:1234/v1 by default. NeuroLink auto-discovers the currently loaded model via /v1/models — you do not need to specify a model name.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Prerequisites","lvl3":""}},
|
|
@@ -6053,7 +6053,7 @@
|
|
|
6053
6053
|
{"objectID":"1637c68ac1e9cbfce5f16fd46aaa8835701c2f1430482c8fa9910e486a7bb625","title":"Verification status","url":"/docs/getting-started/providers/novita#verification-status","content":"Tier-2 onboarding requires evidence before a provider is accepted, and\npnpm run verify:provider-onboarding gates it in CI. This is what the\ncatalog records for Novita AI:\n\n| Probe | Result |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Roster | authenticated GET /openai/v1/models, HTTP 200, 2026-09-05 |\n| Auth rejection | HTTP 401 (FAILED_TO_AUTH), 2026-09-05 |\n| Live capability sweep | 2026-09-05, probed against the default model. Chat, streaming, and a real structured tool call all passed. response_format: json_object succeeded both alone and combined with tools in the same request — confirmed at the SDK level, which is why structuredOutputWithTools is true for this provider, unlike Friendli or Morph. |","hierarchy":{"lvl0":"Getting Started","lvl1":"Novita AI Provider Guide","lvl2":"Verification status","lvl3":""}},
|
|
6054
6054
|
{"objectID":"a28a46f2a803a788421fbf99c39dcb97d33871e99a7dc45807a98ddce3e15589","title":"Troubleshooting","url":"/docs/getting-started/providers/novita#troubleshooting","content":"| Symptom | Cause | Fix |\n| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |\n| FAILED_TO_AUTH | NOVITA_API_KEY unset, wrong, or not sk_-prefixed | Rotate the key at https://novita.ai/settings/key-management |\n| MODEL_NOT_FOUND | The roster changed since 2026-09-05 | Pick a current id from https://novita.ai/models or the authenticated /openai/v1/models roster |\n| Truncated or empty content on the default model | zai-org/glm-5.3-flash is a reasoning model and the catalog default max output is only 4,096 tokens | Raise maxTokens for longer or reasoning-heavy completions |","hierarchy":{"lvl0":"Getting Started","lvl1":"Novita AI Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
|
|
6055
6055
|
{"objectID":"7ce1eb2bda1d99489069643ba7316d9d1e893babf249024cf111547fbe952f66","title":"See also","url":"/docs/getting-started/providers/novita#see-also","content":"Provider setup overview\nAll providers\nTier-2 onboarding\nProvider feature compatibility","hierarchy":{"lvl0":"Getting Started","lvl1":"Novita AI Provider Guide","lvl2":"See also","lvl3":""}},
|
|
6056
|
-
{"objectID":"c4d6bc20fbe9d189291d36b241fffab77fac1dcbe5ff66e1df5248840997c55d","title":"NVIDIA NIM Provider Guide","url":"/docs/getting-started/providers/nvidia-nim","content":"NVIDIA NIM Provider Guide\n\nHundreds of optimised AI models on NVIDIA's GPU-accelerated inference platform — or your own self-hosted NIM deployment\n\nOverview\n\nNVIDIA NIM (NVIDIA Inference Microservices) is a managed inference platform that hosts a large catalog of open-weight models — Meta Llama, DeepSeek, Mistral, Microsoft Phi, Google Gemma, and more — all GPU-optimised and served through an OpenAI-compatible API. You can also point NeuroLink at a self-hosted NIM cluster by overriding the base URL.\n\nKey Facts\nHosted base URL: https://integrate.api.nvidia.com/v1\nProtocol: OpenAI-compatible (/v1/chat/completions)\nVision: Yes, on supported models (Llama 3.2 Vision, etc.)\nReasoning: Yes, on Nemotron and DeepSeek-R1 variants\nStreaming: Supported\nTool calling: Supported on most models\nSelf-hosting: Override NVIDIA_NIM_BASE_URL to point at a private NIM cluster\n\nNIM-Specific Extras\n\nNIM supports additional generation parameters beyond the standard OpenAI surface: top_k, min_p, repetition_penalty, min_tokens, and per-model chat_template overrides. The NeuroLink provider automatically passes these via the providerOptions.openai.body mechanism. If a model rejects an unsupported parameter with HTTP 400, the provider retries the request with that parameter stripped.\n\nQuick Start\nGet an API Key\n\nSign up at https://build.nvidia.com and create an API key under API Keys.\nConfigure Environment\n\nAdd to your .env file:\nInstall NeuroLink\nGenerate Your First Response\n\nSupported Models\n\nNIM hosts hundreds of models. NeuroLink ships with these popular models pre-enumerated:\n\nOpenAI gpt-oss (default)\n\n| Model ID | Context | Vision | Reasoning |\n| -------------------- | ------- | ------ | --------- |\n| openai/gpt-oss-20b | 128K | No | No |\n\nMeta Llama\n\n| Model ID | Context | Vision | Reasoning |\n| ------------------------------------ | ------- | ------ | --------- |\n| meta/llama-3.3-70b-instruct | 128K | No | No |\n| meta/llama-3.1-405b-instruct | 128K | No | No |\n| meta/llama-3.1-70b-instruct | 128K | No | No |\n| meta/llama-3.2-90b-vision-instruct | 128K | Yes | No |\n| meta/llama-3.2-11b-vision-instruct | 128K | Yes | No |\n\nNVIDIA Nemotron (Reasoning)\n\n| Model ID | Context | Vision | Reasoning |\n| ---------------------------------------- | ------- | ------ | --------- |\n| nvidia/llama-3.3-nemotron-super-49b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-nano-8b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-70b-instruct | 128K | No | Yes |\n\nDeepSeek (Hosted on NIM)\n\n| Model ID | Context | Vision | Reasoning |\n| ------------------------------------------- | ------- | ------ | --------- |\n| deepseek-ai/deepseek-r1 | 128K | No | Yes |\n| deepseek-ai/deepseek-r1-distill-llama-70b | 128K | No | Yes |\n\nOther Models\n\n| Model ID | Context | Notes |\n| --------------------------------------- | ------- | ---------------- |\n| mistralai/mixtral-8x22b-instruct-v0.1 | 64K | Large MoE |\n| mistralai/mixtral-8x7b-instruct-v0.1 | 32K | Efficient MoE |\n| microsoft/phi-4 | 16K | Compact, capable |\n| google/gemma-3-27b-it | 128K | Google Gemma |\n\nAvailability, checked 2026-10-
|
|
6056
|
+
{"objectID":"c4d6bc20fbe9d189291d36b241fffab77fac1dcbe5ff66e1df5248840997c55d","title":"NVIDIA NIM Provider Guide","url":"/docs/getting-started/providers/nvidia-nim","content":"NVIDIA NIM Provider Guide\n\nHundreds of optimised AI models on NVIDIA's GPU-accelerated inference platform — or your own self-hosted NIM deployment\n\nOverview\n\nNVIDIA NIM (NVIDIA Inference Microservices) is a managed inference platform that hosts a large catalog of open-weight models — Meta Llama, DeepSeek, Mistral, Microsoft Phi, Google Gemma, and more — all GPU-optimised and served through an OpenAI-compatible API. You can also point NeuroLink at a self-hosted NIM cluster by overriding the base URL.\n\nKey Facts\nHosted base URL: https://integrate.api.nvidia.com/v1\nProtocol: OpenAI-compatible (/v1/chat/completions)\nVision: Yes, on supported models (Llama 3.2 Vision, etc.)\nReasoning: Yes, on Nemotron and DeepSeek-R1 variants\nStreaming: Supported\nTool calling: Supported on most models\nSelf-hosting: Override NVIDIA_NIM_BASE_URL to point at a private NIM cluster\n\nNIM-Specific Extras\n\nNIM supports additional generation parameters beyond the standard OpenAI surface: top_k, min_p, repetition_penalty, min_tokens, and per-model chat_template overrides. The NeuroLink provider automatically passes these via the providerOptions.openai.body mechanism. If a model rejects an unsupported parameter with HTTP 400, the provider retries the request with that parameter stripped.\n\nQuick Start\nGet an API Key\n\nSign up at https://build.nvidia.com and create an API key under API Keys.\nConfigure Environment\n\nAdd to your .env file:\nInstall NeuroLink\nGenerate Your First Response\n\nSupported Models\n\nNIM hosts hundreds of models. NeuroLink ships with these popular models pre-enumerated:\n\nOpenAI gpt-oss (default)\n\n| Model ID | Context | Vision | Reasoning |\n| -------------------- | ------- | ------ | --------- |\n| openai/gpt-oss-20b | 128K | No | No |\n\nMeta Llama\n\n| Model ID | Context | Vision | Reasoning |\n| ------------------------------------ | ------- | ------ | --------- |\n| meta/llama-3.3-70b-instruct | 128K | No | No |\n| meta/llama-3.1-405b-instruct | 128K | No | No |\n| meta/llama-3.1-70b-instruct | 128K | No | No |\n| meta/llama-3.2-90b-vision-instruct | 128K | Yes | No |\n| meta/llama-3.2-11b-vision-instruct | 128K | Yes | No |\n\nNVIDIA Nemotron (Reasoning)\n\n| Model ID | Context | Vision | Reasoning |\n| ---------------------------------------- | ------- | ------ | --------- |\n| nvidia/llama-3.3-nemotron-super-49b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-nano-8b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-70b-instruct | 128K | No | Yes |\n\nDeepSeek (Hosted on NIM)\n\n| Model ID | Context | Vision | Reasoning |\n| ------------------------------------------- | ------- | ------ | --------- |\n| deepseek-ai/deepseek-r1 | 128K | No | Yes |\n| deepseek-ai/deepseek-r1-distill-llama-70b | 128K | No | Yes |\n\nOther Models\n\n| Model ID | Context | Notes |\n| --------------------------------------- | ------- | ---------------- |\n| mistralai/mixtral-8x22b-instruct-v0.1 | 64K | Large MoE |\n| mistralai/mixtral-8x7b-instruct-v0.1 | 32K | Efficient MoE |\n| microsoft/phi-4 | 16K | Compact, capable |\n| google/gemma-3-27b-it | 128K | Google Gemma |\n\nAvailability, checked 2026-10-24. NVIDIA's GET https://integrate.api.nvidia.com/v1/models lists openai/gpt-oss-20b, meta/llama-3.2-90b-vision-instruct, meta/llama-3.2-11b-vision-instruct and nvidia/llama-3.1-nemotron-70b-instruct from the tables above, and none of the others. A chat request to meta/llama-3.3-70b-instruct or meta/llama-3.1-70b-instruct answers HTTP 410, \"has reached its end of life on 2026-08-26T09:00:00Z and is no longer available\"; nvidia/llama-3.3-nemotron-super-49b-v1 and mistralai/mixtral-8x22b-instruct-v0.1 also answer 410, and deepseek-ai/deepseek-r1 and meta/llama-3.1-405b-instruct answer 404. nvidia/llama-3.1-nemotron-70b-instruct is listed but answered 404 (\"not found for account\") to the key used for the check. openai/gpt-oss-20b and meta/llama-3.2-11b-vision-instruct each answered a plain request and a tool-calling request. The NvidiaNimModels enum keeps the retired members so existing code compiles.\n\nBrowse the full catalog at https://build.nvidia.com/models. You can pass any model ID via --model or model: — NIM returns 404 for IDs that are not in the catalog.\n\nSDK Usage\n\nBasic Generation\n\nUsing a Specific Model\n\nReasoning with thinkingLevel\n\nReasoning-capable models (Nemotron, DeepSeek-R1) accept a thinking flag via NIM's chat_template_kwargs. Pass thinkingLevel to activate it:\n\nLevels: minimal (no thinking) | low | medium | high\n\nIf the model does not support chat_template_kwargs.thinking, the provider automatically retries without it.\n\nStreaming\n\nPer-Call Credential Override\n","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"","lvl3":""}},
|
|
6057
6057
|
{"objectID":"b3c7e6b9de265c001fb3ea1118f2467719f7d5d7b47d0d1219803161adaa97f3","title":"NVIDIA NIM Provider Guide","url":"/docs/getting-started/providers/nvidia-nim#nvidia-nim-provider-guide","content":"Hundreds of optimised AI models on NVIDIA's GPU-accelerated inference platform — or your own self-hosted NIM deployment","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"NVIDIA NIM Provider Guide","lvl3":""}},
|
|
6058
6058
|
{"objectID":"bdd47b6d8dc71c8c6e099e6aaf6d4b1322ee018e437203f0f8213316ead4bc6a","title":"Overview","url":"/docs/getting-started/providers/nvidia-nim#overview","content":"NVIDIA NIM (NVIDIA Inference Microservices) is a managed inference platform that hosts a large catalog of open-weight models — Meta Llama, DeepSeek, Mistral, Microsoft Phi, Google Gemma, and more — all GPU-optimised and served through an OpenAI-compatible API. You can also point NeuroLink at a self-hosted NIM cluster by overriding the base URL.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Overview","lvl3":""}},
|
|
6059
6059
|
{"objectID":"70e960324b4417bd885aed19e36a44abbedba28c263ff2bf2e6024c995e0915d","title":"Key Facts","url":"/docs/getting-started/providers/nvidia-nim#key-facts","content":"Hosted base URL: https://integrate.api.nvidia.com/v1\nProtocol: OpenAI-compatible (/v1/chat/completions)\nVision: Yes, on supported models (Llama 3.2 Vision, etc.)\nReasoning: Yes, on Nemotron and DeepSeek-R1 variants\nStreaming: Supported\nTool calling: Supported on most models\nSelf-hosting: Override NVIDIA_NIM_BASE_URL to point at a private NIM cluster","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Key Facts","lvl3":""}},
|
|
@@ -6067,7 +6067,7 @@
|
|
|
6067
6067
|
{"objectID":"041d61fa62afb3ac253f977f945401de38379d0f20f40075103a0fa368137747","title":"Meta Llama","url":"/docs/getting-started/providers/nvidia-nim#meta-llama","content":"| Model ID | Context | Vision | Reasoning |\n| ------------------------------------ | ------- | ------ | --------- |\n| meta/llama-3.3-70b-instruct | 128K | No | No |\n| meta/llama-3.1-405b-instruct | 128K | No | No |\n| meta/llama-3.1-70b-instruct | 128K | No | No |\n| meta/llama-3.2-90b-vision-instruct | 128K | Yes | No |\n| meta/llama-3.2-11b-vision-instruct | 128K | Yes | No |","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Meta Llama","lvl3":""}},
|
|
6068
6068
|
{"objectID":"3c188653cca3eebd5cc90f43252ad42029a4fa888bfb2b470139e4e0db08e26a","title":"NVIDIA Nemotron (Reasoning)","url":"/docs/getting-started/providers/nvidia-nim#nvidia-nemotron-reasoning","content":"| Model ID | Context | Vision | Reasoning |\n| ---------------------------------------- | ------- | ------ | --------- |\n| nvidia/llama-3.3-nemotron-super-49b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-nano-8b-v1 | 128K | No | Yes |\n| nvidia/llama-3.1-nemotron-70b-instruct | 128K | No | Yes |","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"NVIDIA Nemotron (Reasoning)","lvl3":""}},
|
|
6069
6069
|
{"objectID":"4d9aca0894a65a52648a73478e1c73b487411326cf63e05eb8159fd8fef0c5aa","title":"DeepSeek (Hosted on NIM)","url":"/docs/getting-started/providers/nvidia-nim#deepseek-hosted-on-nim","content":"| Model ID | Context | Vision | Reasoning |\n| ------------------------------------------- | ------- | ------ | --------- |\n| deepseek-ai/deepseek-r1 | 128K | No | Yes |\n| deepseek-ai/deepseek-r1-distill-llama-70b | 128K | No | Yes |","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"DeepSeek (Hosted on NIM)","lvl3":""}},
|
|
6070
|
-
{"objectID":"8eccc475db8aa2e29bd49cd7c0ecb93be5b813979af07749f0c218abe7a71bd8","title":"Other Models","url":"/docs/getting-started/providers/nvidia-nim#other-models","content":"| Model ID | Context | Notes |\n| --------------------------------------- | ------- | ---------------- |\n| mistralai/mixtral-8x22b-instruct-v0.1 | 64K | Large MoE |\n| mistralai/mixtral-8x7b-instruct-v0.1 | 32K | Efficient MoE |\n| microsoft/phi-4 | 16K | Compact, capable |\n| google/gemma-3-27b-it | 128K | Google Gemma |\n\nAvailability, checked 2026-10-
|
|
6070
|
+
{"objectID":"8eccc475db8aa2e29bd49cd7c0ecb93be5b813979af07749f0c218abe7a71bd8","title":"Other Models","url":"/docs/getting-started/providers/nvidia-nim#other-models","content":"| Model ID | Context | Notes |\n| --------------------------------------- | ------- | ---------------- |\n| mistralai/mixtral-8x22b-instruct-v0.1 | 64K | Large MoE |\n| mistralai/mixtral-8x7b-instruct-v0.1 | 32K | Efficient MoE |\n| microsoft/phi-4 | 16K | Compact, capable |\n| google/gemma-3-27b-it | 128K | Google Gemma |\n\nAvailability, checked 2026-10-24. NVIDIA's GET https://integrate.api.nvidia.com/v1/models lists openai/gpt-oss-20b, meta/llama-3.2-90b-vision-instruct, meta/llama-3.2-11b-vision-instruct and nvidia/llama-3.1-nemotron-70b-instruct from the tables above, and none of the others. A chat request to meta/llama-3.3-70b-instruct or meta/llama-3.1-70b-instruct answers HTTP 410, \"has reached its end of life on 2026-08-26T09:00:00Z and is no longer available\"; nvidia/llama-3.3-nemotron-super-49b-v1 and mistralai/mixtral-8x22b-instruct-v0.1 also answer 410, and deepseek-ai/deepseek-r1 and meta/llama-3.1-405b-instruct answer 404. nvidia/llama-3.1-nemotron-70b-instruct is listed but answered 404 (\"not found for account\") to the key used for the check. openai/gpt-oss-20b and meta/llama-3.2-11b-vision-instruct each answered a plain request and a tool-calling request. The NvidiaNimModels enum keeps the retired members so existing code compiles.\n\nBrowse the full catalog at https://build.nvidia.com/models. You can pass any model ID via --model or model: — NIM returns 404 for IDs that are not in the catalog.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Other Models","lvl3":""}},
|
|
6071
6071
|
{"objectID":"13a92a3d0f9f1c15c2bb97769daa214d7a883699f08b4789ce05ba89f0b1724b","title":"Basic Generation","url":"/docs/getting-started/providers/nvidia-nim#basic-generation","content":"Basic Generation","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Basic Generation","lvl3":""}},
|
|
6072
6072
|
{"objectID":"3bc7919c7e5bb6f759acdf2b78470d89c4ec5fc0d637553c2c123240b504a105","title":"Using a Specific Model","url":"/docs/getting-started/providers/nvidia-nim#using-a-specific-model","content":"Using a Specific Model","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Using a Specific Model","lvl3":""}},
|
|
6073
6073
|
{"objectID":"def6f89a4845940b499d11b73fb1b4c4aee4bf4315cfbf3828168d4b874c3f39","title":"Reasoning with thinkingLevel","url":"/docs/getting-started/providers/nvidia-nim#reasoning-with-thinkinglevel","content":"Reasoning-capable models (Nemotron, DeepSeek-R1) accept a thinking flag via NIM's chat_template_kwargs. Pass thinkingLevel to activate it:\n\nLevels: minimal (no thinking) | low | medium | high\n\nIf the model does not support chat_template_kwargs.thinking, the provider automatically retries without it.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Reasoning with thinkingLevel","lvl3":""}},
|
|
@@ -6081,6 +6081,7 @@
|
|
|
6081
6081
|
{"objectID":"e113acee1e904cde2e3295ebbb99df56e1d4d712cf149f774c8fbaad6ada6770","title":"\"Invalid NVIDIA NIM API key\"","url":"/docs/getting-started/providers/nvidia-nim#invalid-nvidia-nim-api-key","content":"The NVIDIA_NIM_API_KEY is missing, expired, or incorrect.\n\nGet or rotate keys at https://build.nvidia.com/settings/api-keys.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"\"Invalid NVIDIA NIM API key\"","lvl3":""}},
|
|
6082
6082
|
{"objectID":"25669258e3b272543a86496e295868082d0146aff134a84ead2bdf65fccb3ffb","title":"\"NVIDIA NIM rate limit exceeded\"","url":"/docs/getting-started/providers/nvidia-nim#nvidia-nim-rate-limit-exceeded","content":"Your account has hit its request-per-minute or token-per-day limit. Upgrade your account, reduce request frequency, or implement backoff. Check your current usage at https://build.nvidia.com/usage.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"\"NVIDIA NIM rate limit exceeded\"","lvl3":""}},
|
|
6083
6083
|
{"objectID":"8fa05f7794655a8b226d68b36d26031af67d19af32b9435a02357b7f8e719862","title":"\"NVIDIA NIM model not available\"","url":"/docs/getting-started/providers/nvidia-nim#nvidia-nim-model-not-available","content":"The model ID is not in the NIM catalog, or your account tier does not have access.\n\nUse the exact model ID shown on the model's page (e.g., openai/gpt-oss-20b).","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"\"NVIDIA NIM model not available\"","lvl3":""}},
|
|
6084
|
+
{"objectID":"6bc455b9dba112ad4d4cb452dc286e558ef9098ae2c16dd0048d985ed1edad6f","title":"HTTP 410 \"has reached its end of life\"","url":"/docs/getting-started/providers/nvidia-nim#http-410-has-reached-its-end-of-life","content":"The request named a model NVIDIA has retired, for example meta/llama-3.1-70b-instruct or meta/llama-3.3-70b-instruct (retired 2026-08-26). If you did not pass model:, look for a stale NVIDIA_NIM_MODEL in your .env or shell: it takes precedence over the built-in default (openai/gpt-oss-20b). Remove it or set it to a model from the current catalog.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"HTTP 410 \"has reached its end of life\"","lvl3":""}},
|
|
6084
6085
|
{"objectID":"34d171d7ade8a31dfc31588bfccef6e920cd37a662a53089aabb5983a7d2694c","title":"\"NVIDIA NIM quota exceeded\"","url":"/docs/getting-started/providers/nvidia-nim#nvidia-nim-quota-exceeded","content":"Account-level token or compute quota reached. Check your NIM dashboard.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"\"NVIDIA NIM quota exceeded\"","lvl3":""}},
|
|
6085
6086
|
{"objectID":"0697a2c79b09552d2abfdc5d788f32dfeec83add6b8a40e67389ef43b6f77ac9","title":"HTTP 400 with reasoning_budget or chat_template in the error","url":"/docs/getting-started/providers/nvidia-nim#http-400-with-reasoning_budget-or-chat_template-in-the-error","content":"The model does not support one of the NIM-specific extras. The provider automatically retries without the rejected parameter. If you see this error surfaced, it means the second attempt also failed — check the rest of the error message for the root cause.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"HTTP 400 with reasoning_budget or chat_template in the error","lvl3":""}},
|
|
6086
6087
|
{"objectID":"403e25d3806bf5242a71a8e510fac16e068f907380e7f22d15d2393cbf3f28f4","title":"Thinking level has no visible effect","url":"/docs/getting-started/providers/nvidia-nim#thinking-level-has-no-visible-effect","content":"Not all models support chat_template_kwargs.thinking. If the model rejects the parameter, the provider retries the request without it and produces a normal (non-reasoning) response. Use a Nemotron or DeepSeek-R1 model for guaranteed reasoning support.","hierarchy":{"lvl0":"Getting Started","lvl1":"NVIDIA NIM Provider Guide","lvl2":"Thinking level has no visible effect","lvl3":""}},
|
|
@@ -9765,7 +9766,7 @@
|
|
|
9765
9766
|
{"objectID":"5850b5e6ab599e2c9e2952653e0db0616ccd777c908edd1b43dd4381d0d1eab7","title":"12. OpenAI Compatible","url":"/docs/reference/provider-comparison#12-openai-compatible","content":"Provider ID: openai-compatible\nDefault Model: Auto-discovered\n\nStrengths:\nWorks with any OpenAI-compatible endpoint\nvLLM, FastChat, LocalAI support\nCustom deployment flexibility\nAuto-discovers available models\n\nWeaknesses:\nCapabilities entirely backend-dependent\nNo standardized capability detection\nConfiguration varies by provider\nAuthentication varies\n\nBest For:\nCustom deployments (vLLM, FastChat)\nInternal model serving\nPrivate cloud deployments\nWhen you control the backend\n\nPricing:\nDepends entirely on backend provider\nSelf-hosted: Infrastructure costs only\nCloud-hosted: Provider-specific pricing","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"12. OpenAI Compatible","lvl3":""}},
|
|
9766
9767
|
{"objectID":"260fb153eca401bd1ca6ed426b7f594aba2907dd9389b79d0bfe62380fc8a7be","title":"13. OpenRouter","url":"/docs/reference/provider-comparison#13-openrouter","content":"Provider ID: openrouter\nDefault Model: anthropic/claude-3-5-sonnet\n\nStrengths:\nAccess to 300+ models from 60+ providers\nMany FREE models available\nAutomatic failover\nUnified API for all models\nCost tracking\n\nWeaknesses:\nTool support varies by model\nVision support varies by model\nCredit-based pricing system\nModel availability can change\n\nBest For:\nAccess to many providers via one API\nCost optimization (free models available)\nRapid prototyping\nWhen you want provider flexibility\n\nPricing:\nFree models available:\nGoogle Gemini 2.0 Flash: FREE\nMeta Llama 3.3 70B: FREE\nQwen models: FREE\nPaid models:\nClaude 3.5 Sonnet: $3.00/$15.00 per 1M tokens\nGPT-4o: $2.50/$10.00 per 1M tokens","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"13. OpenRouter","lvl3":""}},
|
|
9767
9768
|
{"objectID":"e3aa53a228f2eb44916ad3d765c881b2565668588e1c94e1df543232a78413f6","title":"14. DeepSeek","url":"/docs/reference/provider-comparison#14-deepseek","content":"Provider ID: deepseek\nDefault Model: deepseek-chat\nAliases: ds\n\nStrengths:\nVery competitive pricing (among the cheapest frontier-quality models)\ndeepseek-reasoner (R1) — strong open-weight reasoning model\nOpenAI-compatible API — minimal integration overhead\nTool calling supported on both models\n\nWeaknesses:\nNo vision / multimodal support\nCloud-only (data sent to DeepSeek servers in China — consider for compliance)\nNo PDF support\n\nBest For:\nCost-sensitive text and reasoning workloads\nAgentic tool-calling pipelines where budget matters\nExperimenting with open-weight-quality reasoning at low cost\n\nPricing:\ndeepseek-chat (V3): ~$0.14/$0.28 per 1M tokens\ndeepseek-reasoner (R1): ~$0.55/$2.19 per 1M tokens","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"14. DeepSeek","lvl3":""}},
|
|
9768
|
-
{"objectID":"6e5ecdf1db31b0952ff3e3ab0758af1a084052e528319de6bc88f64cef9c3d97","title":"15. NVIDIA NIM","url":"/docs/reference/provider-comparison#15-nvidia-nim","content":"Provider ID: nvidia-nim\nDefault Model:
|
|
9769
|
+
{"objectID":"6e5ecdf1db31b0952ff3e3ab0758af1a084052e528319de6bc88f64cef9c3d97","title":"15. NVIDIA NIM","url":"/docs/reference/provider-comparison#15-nvidia-nim","content":"Provider ID: nvidia-nim\nDefault Model: openai/gpt-oss-20b\nAliases: nvidia, nim\n\nStrengths:\nAccess to NVIDIA-hosted Llama, Mistral, Nemotron, DeepSeek models\nThinking/reasoning supported on Nemotron-Reasoning and DeepSeek-R1 models\nVision supported on vision-capable models (Phi-3-vision, Llama 3.2 Vision)\nOpenAI-compatible API with NIM-specific extras (top_k, min_p, reasoning_budget)\nGraceful retry on 400 errors — drops unsupported extras automatically\n\nWeaknesses:\nTool and vision capability depends entirely on the specific hosted model\nRequires NVIDIA NGC API key\nNo PDF support\n\nBest For:\nRunning NVIDIA-optimized Llama/Mistral/Nemotron models in the cloud\nReasoning workloads via hosted DeepSeek-R1 or Nemotron\nDevelopers already in the NVIDIA ecosystem (NGC, DGX Cloud)\n\nPricing:\nVaries by model; new accounts receive free credits\nSee https://build.nvidia.com/models for per-model pricing","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"15. NVIDIA NIM","lvl3":""}},
|
|
9769
9770
|
{"objectID":"3d848b89e6f368d83d5eb4c1857ca90c4fa81391f9da441b10fb82227632408f","title":"16. LM Studio","url":"/docs/reference/provider-comparison#16-lm-studio","content":"Provider ID: lm-studio\nDefault Model: Auto-discovered from running server\nAliases: lmstudio, lms\n\nStrengths:\nCompletely FREE (local execution via LM Studio desktop app)\nMaximum privacy — no data sent to cloud\nAuto-discovers the currently loaded model via /v1/models\nVision supported on compatible models (LLaVA, Llama 3.2 Vision, Qwen-VL, etc.)\nTool calling supported on compatible models\n\nWeaknesses:\nRequires LM Studio app and a loaded model\nModel quality and capability depend entirely on what is loaded\nNo PDF support\nSmall local models may give inconsistent structured output\n\nBest For:\nPrivacy-critical local inference\nOffline / air-gapped environments\nDevelopment and experimentation without cloud costs\nTesting multiple open-weight models via a GUI\n\nPricing:\nFREE (hardware costs only)\nRequires local GPU for best performance","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"16. LM Studio","lvl3":""}},
|
|
9770
9771
|
{"objectID":"a0f05ec8e14d9e4fb69779c0c25f1e732ae384b506c5be585c5089cd457f293f","title":"17. llama.cpp","url":"/docs/reference/provider-comparison#17-llamacpp","content":"Provider ID: llamacpp\nDefault Model: Auto-discovered from running llama-server\nAliases: llama.cpp, llama-cpp\n\nStrengths:\nCompletely FREE (local execution via llama-server)\nMaximum privacy — no data sent to cloud\nGGUF model support — run quantized models on CPU or GPU\nAuto-discovers loaded model via /v1/models\nVision supported on compatible models (LLaVA, Llama 3.2 Vision)\nTool calling supported when server started with --jinja flag\n\nWeaknesses:\nRequires building / downloading llama-server and a GGUF model\nTool calling requires --jinja flag at server startup\nModel quality depends on the GGUF model loaded\nNo PDF support\nSmall local models may give inconsistent structured output\n\nBest For:\nMaximum privacy and air-gapped deployments\nCPU inference without a GPU\nRunning heavily quantized models at low resource cost\nPower users who want direct control over model serving\n\nPricing:\nFREE (hardware costs only)\nNo API costs or rate limits","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"17. llama.cpp","lvl3":""}},
|
|
9771
9772
|
{"objectID":"7a70d0d5fafc012db75fd708bf54e3db3a35a71ce61eb67049e87218bbc874d4","title":"Voice Providers","url":"/docs/reference/provider-comparison#voice-providers","content":"Voice providers handle audio I/O and are distinct from LLM text-generation providers. They are categorised by function: Text-to-Speech (TTS), Speech-to-Text (STT), and Realtime (bidirectional audio over WebSocket).\n\n| Provider | Type | Protocol | Streaming | Formats | Auth |\n| ------------------- | -------- | ---------------- | --------- | ----------------------------------------------------- | -------------------------------------------------- |\n| google-ai (TTS) | TTS | REST (gRPC SDK) | No | MP3, WAV, OGG | Service Account (GOOGLE_APPLICATION_CREDENTIALS) |\n| openai-tts | TTS | REST | No | MP3, WAV, OGG, Opus | API Key |\n| elevenlabs | TTS | REST | No | MP3, WAV (PCM), Opus | API Key |\n| azure-tts | TTS | REST | No | MP3, WAV (PCM), Opus | API Key + Region |\n| whisper | STT | REST | No | WAV, MP3, M4A, FLAC, OGG, Opus, WebM, MP4, MPEG, MPGA | API Key |\n| google-stt | STT | REST | No | WAV, FLAC, MP3, OGG | API Key or Service Account |\n| deepgram | STT | REST + WebSocket | Yes | WAV, MP3, OGG, FLAC | API Key |\n| azure-stt | STT | REST | No | WAV¹, OGG, Opus | API Key + Region |\n| openai-realtime | Realtime | WebSocket | Yes | PCM16,","hierarchy":{"lvl0":"Reference","lvl1":"AI Provider Comparison Guide","lvl2":"Voice Providers","lvl3":""}},
|
|
@@ -9843,7 +9844,7 @@
|
|
|
9843
9844
|
{"objectID":"adefcedd575b72009c4bc0f61997c4250040929f014824c6c6cdbbe7fa0ef1e6","title":"Enterprise Production","url":"/docs/reference/provider-selection#enterprise-production","content":"Recommended Stack:\n\nEnterprise Requirements Checklist:\n[x] SLA guarantees (99.9%+)\n[x] HIPAA/SOC2 compliance\n[x] Multi-region deployment\n[x] Provider failover strategy\n[x] Cost monitoring and alerts","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Enterprise Production","lvl3":""}},
|
|
9844
9845
|
{"objectID":"00ead7f5ba563f9adeac903fd53da014cebdb61e277745108608ac4774e49f57","title":"Research and Analysis","url":"/docs/reference/provider-selection#research-and-analysis","content":"Recommended Stack:","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Research and Analysis","lvl3":""}},
|
|
9845
9846
|
{"objectID":"1272876f7ecd7e162c7ae353a481e9a18a6d43fa20e84116552e1ac6b188cea8","title":"Cost-Efficient Reasoning (DeepSeek)","url":"/docs/reference/provider-selection#cost-efficient-reasoning-deepseek","content":"Choose DeepSeek when you need frontier-quality reasoning at a fraction of the cost of Anthropic or OpenAI.\nWhen to choose: Text-only agentic workflows, chain-of-thought reasoning tasks, budget-constrained production.\nProvider ID: deepseek\nKey models: deepseek-chat (V3 — general purpose), deepseek-reasoner (R1 — reasoning)\nNot suitable for: Vision, PDF, or image processing tasks.\nCredential needed: DEEPSEEK_API_KEY (get one at https://platform.deepseek.com)","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Cost-Efficient Reasoning (DeepSeek)","lvl3":""}},
|
|
9846
|
-
{"objectID":"a91dc684aba34ed7cc14c808212a1a4ccc3bf679374984bb60818d50498bae4f","title":"NVIDIA-Hosted Models (NVIDIA NIM)","url":"/docs/reference/provider-selection#nvidia-hosted-models-nvidia-nim","content":"Choose NVIDIA NIM when you want NVIDIA-curated hosted inference — Llama, Nemotron, Mistral, and DeepSeek-R1 — accessed via an NVIDIA API key.\nWhen to choose: You want Llama 3.x or Nemotron models served at scale; you need thinking/reasoning via hosted DeepSeek-R1 or Nemotron-Reasoning; you are already an NGC customer.\nProvider ID: nvidia-nim\nKey models:
|
|
9847
|
+
{"objectID":"a91dc684aba34ed7cc14c808212a1a4ccc3bf679374984bb60818d50498bae4f","title":"NVIDIA-Hosted Models (NVIDIA NIM)","url":"/docs/reference/provider-selection#nvidia-hosted-models-nvidia-nim","content":"Choose NVIDIA NIM when you want NVIDIA-curated hosted inference — Llama, Nemotron, Mistral, and DeepSeek-R1 — accessed via an NVIDIA API key.\nWhen to choose: You want Llama 3.x or Nemotron models served at scale; you need thinking/reasoning via hosted DeepSeek-R1 or Nemotron-Reasoning; you are already an NGC customer.\nProvider ID: nvidia-nim\nKey models: openai/gpt-oss-20b (default), nvidia/nemotron-4-340b-instruct, DeepSeek-R1 variants\nVision: Available on select models (Phi-3-vision, Llama 3.2 Vision); check https://build.nvidia.com/models.\nNot suitable for: PDF processing; vision on non-vision models.\nCredential needed: NVIDIA_NIM_API_KEY (get one at https://build.nvidia.com/settings/api-keys)","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"NVIDIA-Hosted Models (NVIDIA NIM)","lvl3":""}},
|
|
9847
9848
|
{"objectID":"cc36677fe4f4c550b7760d8c16ffddec196c19f2498027b05576b3ba4fa37105","title":"Local Inference via LM Studio","url":"/docs/reference/provider-selection#local-inference-via-lm-studio","content":"Choose LM Studio when you want a desktop GUI for managing and running local models, with zero cloud cost and maximum privacy.\nWhen to choose: You want a GUI to browse, download, and switch models; you need local inference without managing llama-server manually; vision models like LLaVA or Qwen-VL are attractive.\nProvider ID: lm-studio\nModel: Auto-discovered from the loaded model (or pass an explicit model name).\nDefault base URL: http://localhost:1234/v1\nNot suitable for: Production at scale (single machine); PDF processing.\nSetup: Download LM Studio, load a model, click \"Start Server\".","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Local Inference via LM Studio","lvl3":""}},
|
|
9848
9849
|
{"objectID":"72e9be8e5b8e718308f0fe7360bcba27aae8b42fffa35be62d9a4ef188c470ae","title":"Local Inference via llama.cpp","url":"/docs/reference/provider-selection#local-inference-via-llamacpp","content":"Choose llama.cpp when you want the lowest-level, most resource-efficient local inference — especially on CPU or with heavily quantized GGUF models.\nWhen to choose: You need CPU-only inference; you want direct llama-server process control; you are running in a headless / server environment.\nProvider ID: llamacpp\nModel: Auto-discovered from the running llama-server (or pass an explicit model name).\nDefault base URL: http://localhost:8080/v1\nTool calling: Requires server to be started with --jinja flag.\nNot suitable for: PDF processing; production at scale without additional infrastructure.\nSetup: ./llama-server -m model.gguf --port 8080 [--jinja]","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Local Inference via llama.cpp","lvl3":""}},
|
|
9849
9850
|
{"objectID":"f6ce3650e34df2b638d084f777182ef05448c55cc7487917a52a5f6a3a2b4864","title":"Privacy-Critical Applications","url":"/docs/reference/provider-selection#privacy-critical-applications","content":"Recommended Stack:","hierarchy":{"lvl0":"Reference","lvl1":"Provider Selection Guide","lvl2":"Privacy-Critical Applications","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "13.8.
|
|
4
|
-
"packageManager": "pnpm@10.
|
|
3
|
+
"version": "13.8.14",
|
|
4
|
+
"packageManager": "pnpm@10.28.2",
|
|
5
5
|
"description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Juspay Technologies",
|
|
@@ -242,6 +242,7 @@
|
|
|
242
242
|
"test:proxy-telemetry": "pnpm exec tsx test/continuous-test-suite-proxy-telemetry.ts",
|
|
243
243
|
"test:proxy-restart": "pnpm exec tsx test/continuous-test-suite-proxy-restart.ts",
|
|
244
244
|
"test:proxy-image-input": "pnpm exec tsx test/continuous-test-suite-proxy-image-input.ts",
|
|
245
|
+
"test:proxy-codex-policy-refusal": "pnpm exec tsx test/continuous-test-suite-proxy-codex-policy-refusal.ts",
|
|
245
246
|
"test:codex": "pnpm exec tsx test/continuous-test-suite-codex.ts",
|
|
246
247
|
"test:bugfixes": "pnpm exec tsx test/continuous-test-suite-bugfixes.ts",
|
|
247
248
|
"test:json-e2e": "pnpm exec tsx test/continuous-test-suite-json-e2e.ts",
|