@juspay/neurolink 12.44.6 → 12.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/dist/browser/neurolink.min.js +362 -362
- package/dist/constants/enums.d.ts +4 -0
- package/dist/constants/enums.js +5 -0
- package/dist/providers/catalog/a2agent.json +64 -0
- package/dist/providers/catalog/index.generated.d.ts +1 -1
- package/dist/providers/catalog/index.generated.js +3 -0
- package/dist/proxy/accountCooldown.js +5 -2
- package/dist/proxy/accountQuota.js +2 -0
- package/dist/proxy/codexFallback.js +3 -4
- package/dist/server/routes/claudeProxyRoutes.js +7 -2
- package/dist/server/routes/codexProxyRoutes.js +24 -8
- package/dist/types/providerCatalog.generated.d.ts +2 -2
- package/dist/types/providers.d.ts +4 -0
- package/docs-site/static/search-index.json +6 -6
- package/package.json +6 -2
|
@@ -16,6 +16,7 @@ export declare enum AIProviderName {
|
|
|
16
16
|
NVIDIA_NIM = "nvidia-nim",
|
|
17
17
|
LM_STUDIO = "lm-studio",
|
|
18
18
|
LLAMACPP = "llamacpp",
|
|
19
|
+
A2AGENT = "a2agent",
|
|
19
20
|
ABOVE_DEV = "above-dev",
|
|
20
21
|
AI21 = "ai21",
|
|
21
22
|
AIAND = "aiand",
|
|
@@ -844,6 +845,9 @@ export declare enum ReplicateModels {
|
|
|
844
845
|
* authentication failures during ongoing operations
|
|
845
846
|
*/
|
|
846
847
|
export declare const TOKEN_EXPIRY_BUFFER_MS: number;
|
|
848
|
+
export declare enum A2agentModels {
|
|
849
|
+
DEEPSEEK_V4_FLASH = "deepseek-v4-flash"
|
|
850
|
+
}
|
|
847
851
|
export declare enum AboveDevModels {
|
|
848
852
|
DEEPSEEK_V4_1_FLASH = "deepseek-v4.1-flash",
|
|
849
853
|
DEEPSEEK_V4_PRO = "deepseek-v4-pro",
|
package/dist/constants/enums.js
CHANGED
|
@@ -21,6 +21,7 @@ export var AIProviderName;
|
|
|
21
21
|
AIProviderName["LM_STUDIO"] = "lm-studio";
|
|
22
22
|
AIProviderName["LLAMACPP"] = "llamacpp";
|
|
23
23
|
// ── BEGIN GENERATED(provider-members): provider catalog (pnpm run codegen:catalog) ──
|
|
24
|
+
AIProviderName["A2AGENT"] = "a2agent";
|
|
24
25
|
AIProviderName["ABOVE_DEV"] = "above-dev";
|
|
25
26
|
AIProviderName["AI21"] = "ai21";
|
|
26
27
|
AIProviderName["AIAND"] = "aiand";
|
|
@@ -1080,6 +1081,10 @@ export var ReplicateModels;
|
|
|
1080
1081
|
*/
|
|
1081
1082
|
export const TOKEN_EXPIRY_BUFFER_MS = 5 * 60 * 1000; // 5 minutes
|
|
1082
1083
|
// ── BEGIN GENERATED(models-enums): provider catalog (pnpm run codegen:catalog) ──
|
|
1084
|
+
export var A2agentModels;
|
|
1085
|
+
(function (A2agentModels) {
|
|
1086
|
+
A2agentModels["DEEPSEEK_V4_FLASH"] = "deepseek-v4-flash";
|
|
1087
|
+
})(A2agentModels || (A2agentModels = {}));
|
|
1083
1088
|
export var AboveDevModels;
|
|
1084
1089
|
(function (AboveDevModels) {
|
|
1085
1090
|
AboveDevModels["DEEPSEEK_V4_1_FLASH"] = "deepseek-v4.1-flash";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./provider-catalog.schema.json",
|
|
3
|
+
"id": "a2agent",
|
|
4
|
+
"displayName": "A2Agent",
|
|
5
|
+
"aliases": [],
|
|
6
|
+
"tier": 2,
|
|
7
|
+
"wire": {
|
|
8
|
+
"baseURL": "https://api.a2agent.me/v1"
|
|
9
|
+
},
|
|
10
|
+
"models": {
|
|
11
|
+
"default": "deepseek-v4-flash",
|
|
12
|
+
"fallbacks": ["deepseek-v4-flash"],
|
|
13
|
+
"defaultContextWindow": 1000000,
|
|
14
|
+
"defaultMaxOutputTokens": 4096,
|
|
15
|
+
"catalog": {
|
|
16
|
+
"deepseek-v4-flash": {
|
|
17
|
+
"contextWindow": 1000000,
|
|
18
|
+
"vision": false,
|
|
19
|
+
"status": "production",
|
|
20
|
+
"description": "DeepSeek V4 Flash via A2Agent; live-verified chat and tool calling"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"capabilities": {
|
|
25
|
+
"text": true,
|
|
26
|
+
"streaming": true,
|
|
27
|
+
"tools": true,
|
|
28
|
+
"toolsWithStreaming": true,
|
|
29
|
+
"structuredOutput": true,
|
|
30
|
+
"structuredOutputWithTools": true,
|
|
31
|
+
"embeddings": false,
|
|
32
|
+
"thinking": false
|
|
33
|
+
},
|
|
34
|
+
"errorRules": [],
|
|
35
|
+
"setup": {
|
|
36
|
+
"url": "https://a2agent.me/keys",
|
|
37
|
+
"apiKeyFormat": null,
|
|
38
|
+
"billingPolicy": "no-free-tier",
|
|
39
|
+
"instructions": [
|
|
40
|
+
"1. Create an account at https://a2agent.me/register",
|
|
41
|
+
"2. Create an API key at https://a2agent.me/keys",
|
|
42
|
+
"3. Set {apiKeyEnvVar} in your environment",
|
|
43
|
+
"4. Review trial-credit eligibility and prepaid rates at https://docs.a2agent.me/quickstart and https://a2agent.me/pricing",
|
|
44
|
+
"5. Use authenticated GET https://api.a2agent.me/v1/models for current model IDs; set A2AGENT_MODEL to select another model"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"evidence": {
|
|
48
|
+
"rosterVerified": {
|
|
49
|
+
"date": "2026-09-21",
|
|
50
|
+
"status": 200,
|
|
51
|
+
"method": "authenticated GET https://api.a2agent.me/v1/models; deepseek-v4-flash present among 21 model IDs"
|
|
52
|
+
},
|
|
53
|
+
"authProbe": {
|
|
54
|
+
"date": "2026-09-21",
|
|
55
|
+
"status": 401,
|
|
56
|
+
"method": "GET /v1/models with a deliberately invalid Bearer token"
|
|
57
|
+
},
|
|
58
|
+
"liveMatrix": {
|
|
59
|
+
"date": "2026-09-21",
|
|
60
|
+
"result": "deepseek-v4-flash: provider matrix 4/4 (generate, stream, tools, structured output); CLI generate resolves the default and returns HELLO. Direct SSE, tool calls, streaming tool calls, JSON output and tools+response_format probes pass. SDK generate executes a tool and validates its result against a schema; fresh-session SDK streaming executes the tool and returns its value with automatic tool choice. Forcing required tool choice on every stream step loops until timeout, so that mode is not claimed. Vision, embeddings and thinking-level controls are not claimed."
|
|
61
|
+
},
|
|
62
|
+
"addedInPR": "https://github.com/juspay/neurolink/pull/1775"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ProviderCatalogJson } from "../../types/index.js";
|
|
2
2
|
export declare const CATALOG_JSON_ENTRIES: ProviderCatalogJson[];
|
|
3
|
-
export declare const CATALOG_PROVIDER_IDS: readonly ["above-dev", "ai21", "aiand", "aionlabs", "ambient", "api-route", "arcee", "atlas-cloud", "avian-io", "baidu-qianfan", "baseten", "bee-heossi", "byteplus-modelark", "bytez", "cerebras", "charm-hyper", "chutes", "cloudflare", "crusoe", "dashscope", "deepinfra", "deepseek", "empiriolabs", "featherless-ai", "fireworks", "friendli", "gmicloud", "gradientai", "groq", "hetzner-inference", "huggingface", "inception-labs", "inceptron", "inco", "inference-net", "io-intelligence", "koscompute", "lemonfox-ai", "lilac", "llmtech", "mancer", "meta-model-api", "minimax", "mistral", "moark", "modelscope", "moonshot-ai", "morph", "nebius", "neuralwatt", "novita", "ovhcloud", "parasail", "pareto-inference", "perplexity", "poolside", "prime-intellect", "reka", "sakana-ai", "sambanova", "sarvam", "scaleway", "siliconflow", "stackit", "stepfun", "subconscious", "synthetic", "telnyx", "thinking-machines", "tinfoil", "together-ai", "umans-ai", "upstage", "venice-ai", "vispark", "vultr-inference", "wafer", "wandb-inference", "xai", "z-ai"];
|
|
3
|
+
export declare const CATALOG_PROVIDER_IDS: readonly ["a2agent", "above-dev", "ai21", "aiand", "aionlabs", "ambient", "api-route", "arcee", "atlas-cloud", "avian-io", "baidu-qianfan", "baseten", "bee-heossi", "byteplus-modelark", "bytez", "cerebras", "charm-hyper", "chutes", "cloudflare", "crusoe", "dashscope", "deepinfra", "deepseek", "empiriolabs", "featherless-ai", "fireworks", "friendli", "gmicloud", "gradientai", "groq", "hetzner-inference", "huggingface", "inception-labs", "inceptron", "inco", "inference-net", "io-intelligence", "koscompute", "lemonfox-ai", "lilac", "llmtech", "mancer", "meta-model-api", "minimax", "mistral", "moark", "modelscope", "moonshot-ai", "morph", "nebius", "neuralwatt", "novita", "ovhcloud", "parasail", "pareto-inference", "perplexity", "poolside", "prime-intellect", "reka", "sakana-ai", "sambanova", "sarvam", "scaleway", "siliconflow", "stackit", "stepfun", "subconscious", "synthetic", "telnyx", "thinking-machines", "tinfoil", "together-ai", "umans-ai", "upstage", "venice-ai", "vispark", "vultr-inference", "wafer", "wandb-inference", "xai", "z-ai"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// GENERATED FILE — do not edit. Regenerate with `pnpm run codegen:catalog`.
|
|
2
2
|
// Source of truth: the per-provider JSON files in this directory.
|
|
3
|
+
import a2agentJson from "./a2agent.json" with { type: "json" };
|
|
3
4
|
import aboveDevJson from "./above-dev.json" with { type: "json" };
|
|
4
5
|
import ai21Json from "./ai21.json" with { type: "json" };
|
|
5
6
|
import aiandJson from "./aiand.json" with { type: "json" };
|
|
@@ -81,6 +82,7 @@ import wandbInferenceJson from "./wandb-inference.json" with { type: "json" };
|
|
|
81
82
|
import xaiJson from "./xai.json" with { type: "json" };
|
|
82
83
|
import zAiJson from "./z-ai.json" with { type: "json" };
|
|
83
84
|
export const CATALOG_JSON_ENTRIES = [
|
|
85
|
+
a2agentJson,
|
|
84
86
|
aboveDevJson,
|
|
85
87
|
ai21Json,
|
|
86
88
|
aiandJson,
|
|
@@ -163,6 +165,7 @@ export const CATALOG_JSON_ENTRIES = [
|
|
|
163
165
|
zAiJson,
|
|
164
166
|
];
|
|
165
167
|
export const CATALOG_PROVIDER_IDS = [
|
|
168
|
+
"a2agent",
|
|
166
169
|
"above-dev",
|
|
167
170
|
"ai21",
|
|
168
171
|
"aiand",
|
|
@@ -98,7 +98,9 @@ export async function saveAccountCooldown(accountKey, coolingUntil, reason) {
|
|
|
98
98
|
await ensureAccountCooldownsLoaded();
|
|
99
99
|
// Another worker (a draining one during a rolling restart) may have written
|
|
100
100
|
// the file since this one loaded it, so the change folds onto the file as
|
|
101
|
-
// it is now rather than onto this worker's copy.
|
|
101
|
+
// it is now rather than onto this worker's copy. Best-effort: the mutex is
|
|
102
|
+
// per process, so two workers writing within the same few ms can still
|
|
103
|
+
// lose one update.
|
|
102
104
|
const onDisk = await readCooldownsFromDisk(memoryCache);
|
|
103
105
|
memoryCache = onDisk;
|
|
104
106
|
const current = onDisk[accountKey];
|
|
@@ -116,7 +118,8 @@ export async function clearAccountCooldown(accountKey, expectedCoolingUntil) {
|
|
|
116
118
|
await mutationMutex.runExclusive(async () => {
|
|
117
119
|
await ensureAccountCooldownsLoaded();
|
|
118
120
|
// Compare against the file, not this worker's copy: another worker may
|
|
119
|
-
// have extended this cooldown since, and that one must survive.
|
|
121
|
+
// have extended this cooldown since, and that one must survive. Same
|
|
122
|
+
// best-effort limit as saveAccountCooldown: no cross-process lock.
|
|
120
123
|
const onDisk = await readCooldownsFromDisk(memoryCache);
|
|
121
124
|
memoryCache = onDisk;
|
|
122
125
|
const current = onDisk[accountKey];
|
|
@@ -387,6 +387,8 @@ async function flushToDisk() {
|
|
|
387
387
|
// Another worker (a draining one during a rolling restart) may have
|
|
388
388
|
// written the file since this one loaded it: fold only this worker's
|
|
389
389
|
// changes onto the file as it is now, never rewrite it from this copy.
|
|
390
|
+
// Best-effort: the mutexes are per process, so two workers flushing
|
|
391
|
+
// within the same few ms can still lose one update.
|
|
390
392
|
const onDisk = await readQuotasFromDisk(filePath, fallback);
|
|
391
393
|
const merged = { ...onDisk };
|
|
392
394
|
for (const [key, quota] of Object.entries(flushing)) {
|
|
@@ -343,10 +343,9 @@ function codexSessionId(body) {
|
|
|
343
343
|
return undefined;
|
|
344
344
|
}
|
|
345
345
|
const fields = parsed;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
: undefined;
|
|
346
|
+
// `??` would let an empty or non-string session_id shadow a usable
|
|
347
|
+
// parent_session_id, so each field has to qualify on its own.
|
|
348
|
+
return [fields.session_id, fields.parent_session_id].find((value) => typeof value === "string" && value.length > 0);
|
|
350
349
|
}
|
|
351
350
|
/** Convert a Claude Messages request into the ChatGPT Codex Responses shape. */
|
|
352
351
|
export function convertClaudeRequestToCodex(body, model, reasoningEffort) {
|
|
@@ -773,8 +773,13 @@ function hasScopedOnlyExhaustion(quota, now, policy = overagePolicy) {
|
|
|
773
773
|
isOverageUsable(quota, policy)) {
|
|
774
774
|
return false;
|
|
775
775
|
}
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
// Same notion of "scoped" as the request path: header windows (which carry
|
|
777
|
+
// both a display scope and the wire id) and usage-API windows (often only
|
|
778
|
+
// one of them) must classify alike, or a 429 is scoped when routed and
|
|
779
|
+
// account-wide when reconciled.
|
|
780
|
+
return (quota.windows ?? []).some((window) => (window.kind === "weekly_scoped" || window.kind === "session_scoped") &&
|
|
781
|
+
(typeof window.scopeModel === "string" ||
|
|
782
|
+
typeof window.scopeModelId === "string") &&
|
|
778
783
|
now - scopedWindowObservedAt(quota, window) <=
|
|
779
784
|
QUOTA_SNAPSHOT_FRESHNESS_MS &&
|
|
780
785
|
isScopedWindowExhausted(window, now));
|
|
@@ -151,21 +151,25 @@ function buildCodexErrorResponse(status, message, code) {
|
|
|
151
151
|
}), { status, headers: { "content-type": "application/json" } });
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
* Build a terminal Codex Responses SSE stream for a
|
|
155
|
-
*
|
|
154
|
+
* Build a terminal Codex Responses SSE stream for a failure that never reached
|
|
155
|
+
* an upstream request (every pooled account is cooling).
|
|
156
156
|
* A bare non-2xx status with no body reads to the Codex CLI as a dropped
|
|
157
157
|
* connection, so it shows "Reconnecting... waiting for network" forever
|
|
158
158
|
* instead of a real error. Emitting a well-formed `response.failed` event —
|
|
159
159
|
* the same terminal shape the CLI already parses out of a live stream —
|
|
160
160
|
* lets it render the actual failure instead.
|
|
161
|
+
*
|
|
162
|
+
* The code is what the client keys on: `insufficient_quota` tells it the plan
|
|
163
|
+
* is spent, so it is reserved for a pool that is out of quota. Accounts parked
|
|
164
|
+
* by a transient auth failure report `server_error` instead.
|
|
161
165
|
*/
|
|
162
|
-
function
|
|
166
|
+
function buildCodexPoolCoolingResponse(message, retryAfterSec, code) {
|
|
163
167
|
const payload = {
|
|
164
168
|
type: "response.failed",
|
|
165
169
|
response: {
|
|
166
170
|
error: {
|
|
167
|
-
type:
|
|
168
|
-
code
|
|
171
|
+
type: code,
|
|
172
|
+
code,
|
|
169
173
|
message,
|
|
170
174
|
},
|
|
171
175
|
},
|
|
@@ -1333,14 +1337,26 @@ loopbackPort, internalDispatch) {
|
|
|
1333
1337
|
});
|
|
1334
1338
|
return buildCodexErrorResponse(413, outbound.message, "request_too_large");
|
|
1335
1339
|
}
|
|
1340
|
+
const resetAt = soonest ? new Date(soonest).toISOString() : undefined;
|
|
1341
|
+
// A refresh that failed transiently, or a 401 with no refresh token to
|
|
1342
|
+
// retry with, parks the account as "auth". Reporting that as spent quota
|
|
1343
|
+
// would tell the user the plan is exhausted when it is not.
|
|
1344
|
+
if (ordered.every((account) => account.coolingReason === "auth")) {
|
|
1345
|
+
await recordFinalOutcome(undefined, 503, {
|
|
1346
|
+
errorType: "all_accounts_auth_cooling",
|
|
1347
|
+
errorMessage: "All Codex accounts are cooling after an auth failure",
|
|
1348
|
+
});
|
|
1349
|
+
return buildCodexPoolCoolingResponse(resetAt
|
|
1350
|
+
? `Codex authentication is temporarily unavailable for every account. Retry after ${resetAt}, or run \`neurolink auth login codex\` if it persists.`
|
|
1351
|
+
: "Codex authentication is temporarily unavailable for every account. Retry shortly, or run `neurolink auth login codex` if it persists.", retryAfterSec, "server_error");
|
|
1352
|
+
}
|
|
1336
1353
|
await recordFinalOutcome(undefined, 429, {
|
|
1337
1354
|
errorType: "all_accounts_cooling",
|
|
1338
1355
|
errorMessage: "All Codex accounts are rate-limited",
|
|
1339
1356
|
});
|
|
1340
|
-
|
|
1341
|
-
return buildCodexQuotaExhaustedResponse(resetAt
|
|
1357
|
+
return buildCodexPoolCoolingResponse(resetAt
|
|
1342
1358
|
? `Codex quota exhausted: all accounts are rate-limited. Resets at ${resetAt}.`
|
|
1343
|
-
: "Codex quota exhausted: all accounts are rate-limited.", retryAfterSec);
|
|
1359
|
+
: "Codex quota exhausted: all accounts are rate-limited.", retryAfterSec, "insufficient_quota");
|
|
1344
1360
|
}
|
|
1345
1361
|
let attempt = 0;
|
|
1346
1362
|
let lastErrorMessage = "All Codex accounts failed";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type CatalogProviderName = "above-dev" | "ai21" | "aiand" | "aionlabs" | "ambient" | "api-route" | "arcee" | "atlas-cloud" | "avian-io" | "baidu-qianfan" | "baseten" | "bee-heossi" | "byteplus-modelark" | "bytez" | "cerebras" | "charm-hyper" | "chutes" | "cloudflare" | "crusoe" | "dashscope" | "deepinfra" | "deepseek" | "empiriolabs" | "featherless-ai" | "fireworks" | "friendli" | "gmicloud" | "gradientai" | "groq" | "hetzner-inference" | "huggingface" | "inception-labs" | "inceptron" | "inco" | "inference-net" | "io-intelligence" | "koscompute" | "lemonfox-ai" | "lilac" | "llmtech" | "mancer" | "meta-model-api" | "minimax" | "mistral" | "moark" | "modelscope" | "moonshot-ai" | "morph" | "nebius" | "neuralwatt" | "novita" | "ovhcloud" | "parasail" | "pareto-inference" | "perplexity" | "poolside" | "prime-intellect" | "reka" | "sakana-ai" | "sambanova" | "sarvam" | "scaleway" | "siliconflow" | "stackit" | "stepfun" | "subconscious" | "synthetic" | "telnyx" | "thinking-machines" | "tinfoil" | "together-ai" | "umans-ai" | "upstage" | "venice-ai" | "vispark" | "vultr-inference" | "wafer" | "wandb-inference" | "xai" | "z-ai";
|
|
2
|
-
export type CatalogCredentialKey = "aboveDev" | "ai21" | "aiand" | "aionlabs" | "ambient" | "apiRoute" | "arcee" | "atlasCloud" | "avianIo" | "baiduQianfan" | "baseten" | "beeHeossi" | "byteplusModelark" | "bytez" | "cerebras" | "charmHyper" | "chutes" | "cloudflare" | "crusoe" | "dashscope" | "deepinfra" | "deepseek" | "empiriolabs" | "featherlessAi" | "fireworks" | "friendli" | "gmicloud" | "gradientai" | "groq" | "hetznerInference" | "huggingFace" | "inceptionLabs" | "inceptron" | "inco" | "inferenceNet" | "ioIntelligence" | "koscompute" | "lemonfoxAi" | "lilac" | "llmtech" | "mancer" | "metaModelApi" | "minimax" | "mistral" | "moark" | "modelscope" | "moonshotAi" | "morph" | "nebius" | "neuralwatt" | "novita" | "ovhcloud" | "parasail" | "paretoInference" | "perplexity" | "poolside" | "primeIntellect" | "reka" | "sakanaAi" | "sambanova" | "sarvam" | "scaleway" | "siliconflow" | "stackit" | "stepfun" | "subconscious" | "synthetic" | "telnyx" | "thinkingMachines" | "tinfoil" | "together" | "umansAi" | "upstage" | "veniceAi" | "vispark" | "vultrInference" | "wafer" | "wandbInference" | "xai" | "zAi";
|
|
1
|
+
export type CatalogProviderName = "a2agent" | "above-dev" | "ai21" | "aiand" | "aionlabs" | "ambient" | "api-route" | "arcee" | "atlas-cloud" | "avian-io" | "baidu-qianfan" | "baseten" | "bee-heossi" | "byteplus-modelark" | "bytez" | "cerebras" | "charm-hyper" | "chutes" | "cloudflare" | "crusoe" | "dashscope" | "deepinfra" | "deepseek" | "empiriolabs" | "featherless-ai" | "fireworks" | "friendli" | "gmicloud" | "gradientai" | "groq" | "hetzner-inference" | "huggingface" | "inception-labs" | "inceptron" | "inco" | "inference-net" | "io-intelligence" | "koscompute" | "lemonfox-ai" | "lilac" | "llmtech" | "mancer" | "meta-model-api" | "minimax" | "mistral" | "moark" | "modelscope" | "moonshot-ai" | "morph" | "nebius" | "neuralwatt" | "novita" | "ovhcloud" | "parasail" | "pareto-inference" | "perplexity" | "poolside" | "prime-intellect" | "reka" | "sakana-ai" | "sambanova" | "sarvam" | "scaleway" | "siliconflow" | "stackit" | "stepfun" | "subconscious" | "synthetic" | "telnyx" | "thinking-machines" | "tinfoil" | "together-ai" | "umans-ai" | "upstage" | "venice-ai" | "vispark" | "vultr-inference" | "wafer" | "wandb-inference" | "xai" | "z-ai";
|
|
2
|
+
export type CatalogCredentialKey = "a2agent" | "aboveDev" | "ai21" | "aiand" | "aionlabs" | "ambient" | "apiRoute" | "arcee" | "atlasCloud" | "avianIo" | "baiduQianfan" | "baseten" | "beeHeossi" | "byteplusModelark" | "bytez" | "cerebras" | "charmHyper" | "chutes" | "cloudflare" | "crusoe" | "dashscope" | "deepinfra" | "deepseek" | "empiriolabs" | "featherlessAi" | "fireworks" | "friendli" | "gmicloud" | "gradientai" | "groq" | "hetznerInference" | "huggingFace" | "inceptionLabs" | "inceptron" | "inco" | "inferenceNet" | "ioIntelligence" | "koscompute" | "lemonfoxAi" | "lilac" | "llmtech" | "mancer" | "metaModelApi" | "minimax" | "mistral" | "moark" | "modelscope" | "moonshotAi" | "morph" | "nebius" | "neuralwatt" | "novita" | "ovhcloud" | "parasail" | "paretoInference" | "perplexity" | "poolside" | "primeIntellect" | "reka" | "sakanaAi" | "sambanova" | "sarvam" | "scaleway" | "siliconflow" | "stackit" | "stepfun" | "subconscious" | "synthetic" | "telnyx" | "thinkingMachines" | "tinfoil" | "together" | "umansAi" | "upstage" | "veniceAi" | "vispark" | "vultrInference" | "wafer" | "wandbInference" | "xai" | "zAi";
|
|
@@ -1268,7 +1268,7 @@
|
|
|
1268
1268
|
{"objectID":"f5f73efdd4286e5fadbc8e565606028eaaf1d527e37beeaaeec1910817bb072c","title":"Recognition","url":"/docs/community/contributing#recognition","content":"We value all contributions! Contributors are:\nListed in our Contributors page\nMentioned in release notes\nGiven credit in the changelog","hierarchy":{"lvl0":"Community","lvl1":"🤝 Contributing to NeuroLink","lvl2":"Recognition","lvl3":""}},
|
|
1269
1269
|
{"objectID":"4bb17f9c985c0b3f6575474dc003fc5a5bb94668d98a8071d6852c14dad1796f","title":"🎯 Current Focus Areas","url":"/docs/community/contributing#-current-focus-areas","content":"We're particularly interested in contributions for:\nProvider Support - Adding new AI providers\nTool Integration - MCP external server activation\nPerformance - Optimization and benchmarking\nDocumentation - Tutorials and guides\nTesting - Increasing test coverage","hierarchy":{"lvl0":"Community","lvl1":"🤝 Contributing to NeuroLink","lvl2":"🎯 Current Focus Areas","lvl3":""}},
|
|
1270
1270
|
{"objectID":"f88b7ad80d1f2c3206d04b9cbcae88e51d4e58e1d133a35f909db9a3504d8535","title":"📝 License","url":"/docs/community/contributing#-license","content":"By contributing to NeuroLink, you agree that your contributions will be licensed under the MIT License.\n\nThank you for contributing to NeuroLink! 🚀","hierarchy":{"lvl0":"Community","lvl1":"🤝 Contributing to NeuroLink","lvl2":"📝 License","lvl3":""}},
|
|
1271
|
-
{"objectID":"e79e61b456a7d08d82af7d1db7a9208b9742297f6704005da3bb2c755d4a47c7","title":"Automatic","url":"/docs/connectors/automatic","content":"Automatic\n\nStatus: ✅ Production\nType: Consumer intelligence · Operations hub\nStack: SvelteKit + NeuroLink SDK + Shopify API\n\nPurpose\n\nAutomatic is a Shopify merchant operations connector. It routes order and address data through NeuroLink's pipe to surface address quality grades and return-to-origin (RTO) risk scores — giving merchants AI-driven insight on every order before fulfillment.\n\nStream Types\n\n| Stream | Direction | Description |\n| ----------------------- | --------- | ----------------------------------------------------------- |\n| Shopify order data | → Pipe | Orders fetched via Shopify GraphQL and Vayu backend |\n| Address strings | → Pipe | Delivery addresses sent to external validation service |\n| Pincode + order context | → Pipe | COD flag, order value, address score for RTO model |\n| Validation results | Pipe → | Grade (A–E), score (0–100), spam flag, missing fields |\n| RTO assessment | Pipe → | Risk level (HIGH/MEDIUM/LOW), probability %, reason factors |\n\nInput / Output Contract\n\nPOST /automatic/analytics\n\nReturns: Array of Shopify order nodes with full order data.\n\nPOST /automatic/address\n\nReturns:\n\nPOST /automatic/rto\n\nReturns:\n\nPOST /automatic/rto/pincode\n\nReturns: { \"isRtoPincode\": true }\n\nNeuroLink Integration\n\nAutomatic uses NeuroLink for MCP tool registry, HITL conversation types, and OpenTelemetry observability. Provider selection happens at generation time in other parts of the application.\n\nFeatures used:\nMCP tool registry and execution\nOpenTelemetry logging (DEBUG / INFO / WARN / ERROR severity)\nHITL types from @juspay/neurolink
|
|
1271
|
+
{"objectID":"e79e61b456a7d08d82af7d1db7a9208b9742297f6704005da3bb2c755d4a47c7","title":"Automatic","url":"/docs/connectors/automatic","content":"Automatic\n\nStatus: ✅ Production\nType: Consumer intelligence · Operations hub\nStack: SvelteKit + NeuroLink SDK + Shopify API\n\nPurpose\n\nAutomatic is a Shopify merchant operations connector. It routes order and address data through NeuroLink's pipe to surface address quality grades and return-to-origin (RTO) risk scores — giving merchants AI-driven insight on every order before fulfillment.\n\nStream Types\n\n| Stream | Direction | Description |\n| ----------------------- | --------- | ----------------------------------------------------------- |\n| Shopify order data | → Pipe | Orders fetched via Shopify GraphQL and Vayu backend |\n| Address strings | → Pipe | Delivery addresses sent to external validation service |\n| Pincode + order context | → Pipe | COD flag, order value, address score for RTO model |\n| Validation results | Pipe → | Grade (A–E), score (0–100), spam flag, missing fields |\n| RTO assessment | Pipe → | Risk level (HIGH/MEDIUM/LOW), probability %, reason factors |\n\nInput / Output Contract\n\nPOST /automatic/analytics\n\nReturns: Array of Shopify order nodes with full order data.\n\nPOST /automatic/address\n\nReturns:\n\nPOST /automatic/rto\n\nReturns:\n\nPOST /automatic/rto/pincode\n\nReturns: { \"isRtoPincode\": true }\n\nNeuroLink Integration\n\nAutomatic uses NeuroLink for MCP tool registry, HITL conversation types, and OpenTelemetry observability. Provider selection happens at generation time in other parts of the application.\n\nFeatures used:\nMCP tool registry and execution\nOpenTelemetry logging (DEBUG / INFO / WARN / ERROR severity)\nHITL types from @juspay/neurolink\nConversation memory configuration types\n\nGateway Unlocked\n\nAutomatic gives Shopify merchants:\nAddress intelligence — grade every delivery address before shipping\nRTO prediction — flag high-risk orders (COD + bad pincode + low address score)\nOperational clarity — every order carries an AI risk signal, no manual review needed\n\nOperational Notes\nAddress validation and 2-second UX delay run concurrently via Promise.all()\nRequest bodies validated with type decoders and Zod schemas\nAll endpoints return createFailureResponse() (400) on error with descriptive message\nNeuroLink instance lazy-initialized — ensureToolsRegistered() called on first use\nSession auth: Shopify session tokens via validateAuth() middleware","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"","lvl3":""}},
|
|
1272
1272
|
{"objectID":"de5dd97b5cff947efcff1a1224ddf4b64296bb3ce017a2c627ab88120a6d63b6","title":"Automatic","url":"/docs/connectors/automatic#automatic","content":"Status: ✅ Production\nType: Consumer intelligence · Operations hub\nStack: SvelteKit + NeuroLink SDK + Shopify API","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"Automatic","lvl3":""}},
|
|
1273
1273
|
{"objectID":"80d1ddf5f066c98190b83e53fc449a51c4d4f24646ae3428c02a7648166d4ce5","title":"Purpose","url":"/docs/connectors/automatic#purpose","content":"Automatic is a Shopify merchant operations connector. It routes order and address data through NeuroLink's pipe to surface address quality grades and return-to-origin (RTO) risk scores — giving merchants AI-driven insight on every order before fulfillment.","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"Purpose","lvl3":""}},
|
|
1274
1274
|
{"objectID":"c2b720f9555688be2e4bb98a65c88136c15d11e8fc8aec9c002858fed0060764","title":"Stream Types","url":"/docs/connectors/automatic#stream-types","content":"| Stream | Direction | Description |\n| ----------------------- | --------- | ----------------------------------------------------------- |\n| Shopify order data | → Pipe | Orders fetched via Shopify GraphQL and Vayu backend |\n| Address strings | → Pipe | Delivery addresses sent to external validation service |\n| Pincode + order context | → Pipe | COD flag, order value, address score for RTO model |\n| Validation results | Pipe → | Grade (A–E), score (0–100), spam flag, missing fields |\n| RTO assessment | Pipe → | Risk level (HIGH/MEDIUM/LOW), probability %, reason factors |","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"Stream Types","lvl3":""}},
|
|
@@ -1276,7 +1276,7 @@
|
|
|
1276
1276
|
{"objectID":"ae1ffeb7537ba19800e5cd2c90236a2beaf6c1764670b4735ddcab468c7bed2b","title":"POST /automatic/address","url":"/docs/connectors/automatic#post-automaticaddress","content":"Returns:","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"POST /automatic/address","lvl3":""}},
|
|
1277
1277
|
{"objectID":"57befbc7f7f6e32d1815c6b35496d8212cfe8b98ded1a2d89117e2b0fd2775f9","title":"POST /automatic/rto","url":"/docs/connectors/automatic#post-automaticrto","content":"Returns:","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"POST /automatic/rto","lvl3":""}},
|
|
1278
1278
|
{"objectID":"71d1f27e3a563db07f1dee966ee2e5790e43d95d426da6c6721cfe8a226289b8","title":"POST /automatic/rto/pincode","url":"/docs/connectors/automatic#post-automaticrtopincode","content":"Returns: { \"isRtoPincode\": true }","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"POST /automatic/rto/pincode","lvl3":""}},
|
|
1279
|
-
{"objectID":"6a46accc0bc04e2dbe7f1408f66bcc70d671a0be83f15d8e9106dde2839f1e8a","title":"NeuroLink Integration","url":"/docs/connectors/automatic#neurolink-integration","content":"Automatic uses NeuroLink for MCP tool registry, HITL conversation types, and OpenTelemetry observability. Provider selection happens at generation time in other parts of the application.\n\nFeatures used:\nMCP tool registry and execution\nOpenTelemetry logging (DEBUG / INFO / WARN / ERROR severity)\nHITL types from @juspay/neurolink
|
|
1279
|
+
{"objectID":"6a46accc0bc04e2dbe7f1408f66bcc70d671a0be83f15d8e9106dde2839f1e8a","title":"NeuroLink Integration","url":"/docs/connectors/automatic#neurolink-integration","content":"Automatic uses NeuroLink for MCP tool registry, HITL conversation types, and OpenTelemetry observability. Provider selection happens at generation time in other parts of the application.\n\nFeatures used:\nMCP tool registry and execution\nOpenTelemetry logging (DEBUG / INFO / WARN / ERROR severity)\nHITL types from @juspay/neurolink\nConversation memory configuration types","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"NeuroLink Integration","lvl3":""}},
|
|
1280
1280
|
{"objectID":"5ef8d3e6cca7cfeb1be6c53321971b9ec0ed36ead39f7f673658dcb352a2b593","title":"Gateway Unlocked","url":"/docs/connectors/automatic#gateway-unlocked","content":"Automatic gives Shopify merchants:\nAddress intelligence — grade every delivery address before shipping\nRTO prediction — flag high-risk orders (COD + bad pincode + low address score)\nOperational clarity — every order carries an AI risk signal, no manual review needed","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"Gateway Unlocked","lvl3":""}},
|
|
1281
1281
|
{"objectID":"0115690e3895bb4454bd957ea1827e28be41d82f8e88210c7a485205d74c9d68","title":"Operational Notes","url":"/docs/connectors/automatic#operational-notes","content":"Address validation and 2-second UX delay run concurrently via Promise.all()\nRequest bodies validated with type decoders and Zod schemas\nAll endpoints return createFailureResponse() (400) on error with descriptive message\nNeuroLink instance lazy-initialized — ensureToolsRegistered() called on first use\nSession auth: Shopify session tokens via validateAuth() middleware","hierarchy":{"lvl0":"Connectors","lvl1":"Automatic","lvl2":"Operational Notes","lvl3":""}},
|
|
1282
1282
|
{"objectID":"fa95e01efb0a0501fb1705d149d82391f46c1a9e720f821d8625568a966346ac","title":"Connector Catalog","url":"/docs/connectors","content":"Connector Catalog\n\nConnectors are applications built on NeuroLink that open a specific gateway — a new way for people or systems to access and experience AI.\n\nEvery connector follows the same pattern:\n\nThe pipe handles provider dispatch, context building, tool execution, and memory. The connector decides what flows through it and what happens at each end.\n\nProduction Connectors\n\n| Connector | Status | Gateway | Provider |\n| --------------------------------------- | ------------- | ----------------------------------------- | ----------------------- |\n| Automatic | ✅ Production | Consumer intelligence · Operations risk | NeuroLink SDK |\n| Tara | ✅ Production | Engineering assistance · Self-improvement | Vertex AI via NeuroLink |\n| Yama | ✅ Production | Code quality · Automated governance | LiteLLM via NeuroLink |\n\nBuilding Your Own Connector\n\nAny application that imports NeuroLink and connects it to a data source or action surface is a connector. Study the production connectors above — then build yours.\n\nStart with: Quick Start →","hierarchy":{"lvl0":"Connectors","lvl1":"Connector Catalog","lvl2":"","lvl3":""}},
|
|
@@ -3201,7 +3201,7 @@
|
|
|
3201
3201
|
{"objectID":"8f00ff46e651a81fa28b61fd20f66b0a93b72d2024b4da2f2e8fe661b32c4d9e","title":"<<< neurolink-proxy (managed) <<<","url":"/docs/features/codex-proxy-support#-neurolink-proxy-managed--1","content":"Your 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":"<<< neurolink-proxy (managed) <<<","lvl3":""}},
|
|
3202
3202
|
{"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":""}},
|
|
3203
3203
|
{"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":""}},
|
|
3204
|
-
{"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| 401 / 403 from upstream | One forced token refresh, then rotate; a failed refresh disables the account until re-login |\n| 429 | Cool the account per its reported window, then rotate |\n| 5xx / network | Rotate to the next account |\n\nAccess tokens are refreshed proactively when within 5 minutes of expiry, and the rotated refresh token is written back to the store.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"6. Error handling","lvl3":""}},
|
|
3204
|
+
{"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, then rotate; a failed refresh disables the account until re-login |\n| 429 | Cool the account per its reported window, then rotate |\n| 5xx / network | Rotate to the next account |\n\nAccess tokens are refreshed proactively when within 5 minutes of expiry, and the rotated refresh token is written back to the store.","hierarchy":{"lvl0":"Features","lvl1":"Codex (ChatGPT) Support for NeuroLink Proxy","lvl2":"6. Error handling","lvl3":""}},
|
|
3205
3205
|
{"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":""}},
|
|
3206
3206
|
{"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":""}},
|
|
3207
3207
|
{"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":""}},
|
|
@@ -4331,13 +4331,13 @@
|
|
|
4331
4331
|
{"objectID":"4f7347e1213c98df50781c6e08637edf26a9230b6cde930cb8d61cdaac35743f","title":"Log specific components","url":"/docs/features/rag#log-specific-components","content":"DEBUG=neurolink:rag:chunker pnpm exec tsx your-script.ts\nDEBUG=neurolink:rag:reranker pnpm exec tsx your-script.ts\nDEBUG=neurolink:rag:hybrid pnpm exec tsx your-script.ts\n`","hierarchy":{"lvl0":"Features","lvl1":"RAG Document Processing Guide","lvl2":"Log specific components","lvl3":""}},
|
|
4332
4332
|
{"objectID":"79ce1d456fd4fd9c06bf8aab0a9244c950872cdea1eb786fbed8c98444e51377","title":"Core Exports","url":"/docs/features/rag#core-exports","content":"Document Processing:\nloadDocument(path) - Load a single document\nloadDocuments(paths) - Load multiple documents\nMDocument - Fluent document processing class\nprocessDocument(text, options) - Process text through chunking and metadata extraction\n\nChunking:\ncreateChunker(strategy, config) - Create a chunker instance\nChunkerFactory - Factory for chunker creation\nChunkerRegistry - Registry with all chunker implementations\ngetAvailableStrategies() - List available chunking strategies\ngetRecommendedStrategy(contentType) - Get recommended strategy for content type\n\nReranking:\ncreateReranker(type, config) - Create a reranker instance\nRerankerFactory - Factory for reranker creation\nRerankerRegistry - Registry with all reranker implementations\ngetAvailableRerankerTypes() - List available reranker types\nrerank(results, query, model) - Direct reranking function\nbatchRerank(results, query, options) - Batch reranking\n\nRetrieval:\ncreateHybridSearch(config) - Create hybrid search instance\nInMemoryBM25Index - In-memory BM25 index\nInMemoryVectorStore - In-memory vector store\nreciprocalRankFusion(rankings, k) - RRF score fusion\nlinearCombination(vectorScores, bm25Scores, alpha) - Linear score fusion\ncreateVectorQueryTool(vectorStore, options) - Create vector query tool\n\nMetadata:\ncreateMetadataExtractor(type, config) - Create metadata extractor\nLLMMetadataExtractor - LLM-powered extractor class\nextractMetadata(chunks, params) - Extract metadata from chunks\n\nPipeline:\nRAGPipeline - Full RAG pipeline class\ncreateRAGPipeline(config) - Create pipeline instance\nassembleContext(chunks, options) - Assemble context from chunks\nformatContextWithCitations(chunks, format) - Format with citations\n\nResilience:\nRAGCircuitBreaker - Circuit breaker pattern for RAG operations\nRAGRetryHandler - Retry with exponential backoff and jitter\n\nTypes:\nChunk, ChunkMetadata, ChunkerConfig\nReranker, RerankerConfig, RerankerType\nHybridSearchOptions, BM25Config\nRAGPipelineConfig, RAGResponse\nMetadataExtractor, Metad","hierarchy":{"lvl0":"Features","lvl1":"RAG Document Processing Guide","lvl2":"Core Exports","lvl3":""}},
|
|
4333
4333
|
{"objectID":"a5a323f35e894680ca74c75bd4c91f4ed7a1a3f8f4783bc1cef0d6a2c738a4d7","title":"See Also","url":"/docs/features/rag#see-also","content":"RAG Configuration Guide - Detailed configuration reference\nRAG Testing Guide - Testing RAG pipelines\nObservability Guide - Tracing and monitoring\nGuardrails Guide - Input/output validation\nVector Store Integrations - Production vector stores","hierarchy":{"lvl0":"Features","lvl1":"RAG Document Processing Guide","lvl2":"See Also","lvl3":""}},
|
|
4334
|
-
{"objectID":"8520c68d4d7a4320716d52b9cc0ac0f75a1ce3eafa30ad50b9f196f7d2a4e49c","title":"Real-time Voice Services","url":"/docs/features/real-time-services","content":"NeuroLink integrates the two major realtime voice APIs behind a single, provider-agnostic interface: OpenAI Realtime (openai-realtime) and Google Gemini Live (gemini-live). These let you build full-duplex voice agents where audio streams in and out simultaneously, with the model responding mid-utterance and calling tools in-flight.\n\nRealtime voice is exposed through the RealtimeProcessor static class (not a method on the NeuroLink instance). For non-realtime synthesis and transcription, see the TTS Guide and STT Guide.\n\nOverview\n\n| Capability | openai-realtime | gemini-live |\n| -------------- | ------------------------------- | ------------------------------- |\n| Provider value | \"openai-realtime\" | \"gemini-live\" |\n| Transport | WebSocket | WebSocket / WebRTC |\n| Modalities | audio in/out, text in/out | audio in/out, text, video |\n| Tool calls | Yes (via onFunctionCall) | Yes (via onFunctionCall) |\n| Interruption | Server-side VAD + manual cancel | Native barge-in + manual cancel |\n\nBoth APIs support concurrent audio input and output streams, so the user can interrupt the model mid-response and the model can stream audio while still listening for new input.\n\nQuick Start (SDK)\n\nThe RealtimeProcessor is a static class — there is no new RealtimeProcessor() and no neurolink.openRealtimeSession(...) method. Connect with RealtimeProcessor.connect(provider, config, handlers):\n\nThe handler shape is provider-agnostic: the same RealtimeEventHandlers object works across both providers, so you can switch with a single string change.\n\nEvent handler reference\n\nQuick Start (CLI)\n\nNeuroLink does not ship a neurolink voice realtime interactive CLI. Instead, the realtime voice server is exposed via:\n\nConnect a browser/mobile client to ws://localhost:8081/voice to drive the session. The server bridges the client to the chosen provider (configured via env vars and per-session messages) and forwards events bidirectionally.\n\nThe TTS and STT flags on generate / stream (e.g. --tts, --stt, --input-audio) are for non-realtime synthesis and transcription — see TTS and STT.\n\nSelf-hosted Realtime Voice Server\n\nFor multi-tenant deployments — voice bots, IVR-style applications, in-app voice features — NeuroLink ships a real-time voice agent server. It bridges browser/mobile clients to provider realtime APIs with session management, observability, and tool routing.\n\nNote: the server is
|
|
4334
|
+
{"objectID":"8520c68d4d7a4320716d52b9cc0ac0f75a1ce3eafa30ad50b9f196f7d2a4e49c","title":"Real-time Voice Services","url":"/docs/features/real-time-services","content":"NeuroLink integrates the two major realtime voice APIs behind a single, provider-agnostic interface: OpenAI Realtime (openai-realtime) and Google Gemini Live (gemini-live). These let you build full-duplex voice agents where audio streams in and out simultaneously, with the model responding mid-utterance and calling tools in-flight.\n\nRealtime voice is exposed through the RealtimeProcessor static class (not a method on the NeuroLink instance). For non-realtime synthesis and transcription, see the TTS Guide and STT Guide.\n\nOverview\n\n| Capability | openai-realtime | gemini-live |\n| -------------- | ------------------------------- | ------------------------------- |\n| Provider value | \"openai-realtime\" | \"gemini-live\" |\n| Transport | WebSocket | WebSocket / WebRTC |\n| Modalities | audio in/out, text in/out | audio in/out, text, video |\n| Tool calls | Yes (via onFunctionCall) | Yes (via onFunctionCall) |\n| Interruption | Server-side VAD + manual cancel | Native barge-in + manual cancel |\n\nBoth APIs support concurrent audio input and output streams, so the user can interrupt the model mid-response and the model can stream audio while still listening for new input.\n\nQuick Start (SDK)\n\nThe RealtimeProcessor is a static class — there is no new RealtimeProcessor() and no neurolink.openRealtimeSession(...) method. Connect with RealtimeProcessor.connect(provider, config, handlers):\n\nThe handler shape is provider-agnostic: the same RealtimeEventHandlers object works across both providers, so you can switch with a single string change.\n\nEvent handler reference\n\nQuick Start (CLI)\n\nNeuroLink does not ship a neurolink voice realtime interactive CLI. Instead, the realtime voice server is exposed via:\n\nConnect a browser/mobile client to ws://localhost:8081/voice to drive the session. The server bridges the client to the chosen provider (configured via env vars and per-session messages) and forwards events bidirectionally.\n\nThe TTS and STT flags on generate / stream (e.g. --tts, --stt, --input-audio) are for non-realtime synthesis and transcription — see TTS and STT.\n\nSelf-hosted Realtime Voice Server\n\nFor multi-tenant deployments — voice bots, IVR-style applications, in-app voice features — NeuroLink ships a real-time voice agent server. It bridges browser/mobile clients to provider realtime APIs with session management, observability, and tool routing.\n\nNote: the server is launched from the CLI, as in Quick Start (CLI) above. startVoiceServer, the function behind that command, is internal: it is a function rather than a NeuroLinkVoiceServer class, and the package does not export it, so there is no supported import path for starting it from code.\n\nThe server emits OTEL spans + Langfuse traces per session, supports HITL approvals on tool calls, and can be deployed standalone or behind your own gateway.\n\nProvider Selection\n\n| Use case | Recommended provider |\n| --------------------------------------------------------- | ----------------------------------------------------- |\n| English-first, broad voice catalog, GPT-4o reasoning | openai-realtime |\n| Multilingual, video input, lowest latency in many regions | gemini-live |\n| Customer support voice bots with structured tool calls | openai-realtime (more deterministic function calls) |\n| In-app voice search / multimodal queries | gemini-live |\n\nEither can be wrapped behind providerFallback so a model-access denial automatically falls through to the alternate model. See Provider Fallback — note that the orchestrator only triggers on access-denied errors, not on rate limits or generic failures.\n\nTool Calls Inside Realtime Sessions\n\nBoth providers can call functions registered with the realtime session. Use the onFunctionCall handler (not onToolCall — that name is reserved for the streaming-text API):\n\nWhen HITL middleware is wired in front of the function-call handler, sensitive operations (e.g. cancelOrder, chargeCard) pause for human approval before responding back into the realtime stream.\n\nObservability\n\nRealtime sessions emit:\nsession:start, session:end events with duration + token usage\nPer-utterance transcript:user, transcript:assistant events\ntool:call, tool:result events\naudio:in:bytes, audio:out:bytes for bandwidth tracking\n\nThese flow into the same OTEL/Langfuse pipeline as text generation. See the Observability Guide.\n\nStatus & Inspection\n\nRelated\nTTS Guide — non-realtime text-to-speech (6 providers)\nSTT Guide — transcription (4 providers)\nVoice Agent Guide — building voice agents end-to-end\nProvider Fallback — failover between models on access denial\nObservability — wiring fallback events into your monitoring stack","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"","lvl3":""}},
|
|
4335
4335
|
{"objectID":"87b8bb1f37916fade5b273a6037c4aedf9a1a2e425352b238a961c192b64e7ea","title":"Overview","url":"/docs/features/real-time-services#overview","content":"| Capability | openai-realtime | gemini-live |\n| -------------- | ------------------------------- | ------------------------------- |\n| Provider value | \"openai-realtime\" | \"gemini-live\" |\n| Transport | WebSocket | WebSocket / WebRTC |\n| Modalities | audio in/out, text in/out | audio in/out, text, video |\n| Tool calls | Yes (via onFunctionCall) | Yes (via onFunctionCall) |\n| Interruption | Server-side VAD + manual cancel | Native barge-in + manual cancel |\n\nBoth APIs support concurrent audio input and output streams, so the user can interrupt the model mid-response and the model can stream audio while still listening for new input.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Overview","lvl3":""}},
|
|
4336
4336
|
{"objectID":"e67429fee6cb4d4138a61d5d6377ce42f05311ca590c7e2af4d5f67ed9937e00","title":"Quick Start (SDK)","url":"/docs/features/real-time-services#quick-start-sdk","content":"The RealtimeProcessor is a static class — there is no new RealtimeProcessor() and no neurolink.openRealtimeSession(...) method. Connect with RealtimeProcessor.connect(provider, config, handlers):\n\nThe handler shape is provider-agnostic: the same RealtimeEventHandlers object works across both providers, so you can switch with a single string change.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Quick Start (SDK)","lvl3":""}},
|
|
4337
4337
|
{"objectID":"908a71813f0c74c8d299bb8054a7b1bda254ec6d642e6fe6ccf8bd8e5eab09bf","title":"Quick Start (CLI)","url":"/docs/features/real-time-services#quick-start-cli","content":"NeuroLink does not ship a neurolink voice realtime interactive CLI. Instead, the realtime voice server is exposed via:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Quick Start (CLI)","lvl3":""}},
|
|
4338
4338
|
{"objectID":"75191549698a180302a3c5cc8a569ae56746610c861afdb6ac16423dde6dfcab","title":"Canonical: start the realtime voice WebSocket server","url":"/docs/features/real-time-services#canonical-start-the-realtime-voice-websocket-server","content":"npx @juspay/neurolink serve voice --port 8081","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Canonical: start the realtime voice WebSocket server","lvl3":""}},
|
|
4339
4339
|
{"objectID":"7d1d459e2f376156ae554f68c93ffef4fcb5c86abdd088cb5f2fcbc5a1fe905a","title":"Deprecated alias (still works, prints a deprecation notice)","url":"/docs/features/real-time-services#deprecated-alias-still-works-prints-a-deprecation-notice","content":"npx @juspay/neurolink voice-server --port 8081\n\n\nConnect a browser/mobile client to ws://localhost:8081/voice to drive the session. The server bridges the client to the chosen provider (configured via env vars and per-session messages) and forwards events bidirectionally.\n\nThe TTS and STT _flags_ on generate / stream (e.g. --tts, --stt, --input-audio`) are for non-realtime synthesis and transcription — see TTS and STT.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Deprecated alias (still works, prints a deprecation notice)","lvl3":""}},
|
|
4340
|
-
{"objectID":"c140aba9971425669727df00fba1b8ac11cdd873fd27a03933c575301dbd3bef","title":"Self-hosted Realtime Voice Server","url":"/docs/features/real-time-services#self-hosted-realtime-voice-server","content":"For multi-tenant deployments — voice bots, IVR-style applications, in-app voice features — NeuroLink ships a real-time voice agent server. It bridges browser/mobile clients to provider realtime APIs with session management, observability, and tool routing.\n\nNote: the server is
|
|
4340
|
+
{"objectID":"c140aba9971425669727df00fba1b8ac11cdd873fd27a03933c575301dbd3bef","title":"Self-hosted Realtime Voice Server","url":"/docs/features/real-time-services#self-hosted-realtime-voice-server","content":"For multi-tenant deployments — voice bots, IVR-style applications, in-app voice features — NeuroLink ships a real-time voice agent server. It bridges browser/mobile clients to provider realtime APIs with session management, observability, and tool routing.\n\nNote: the server is launched from the CLI, as in Quick Start (CLI) above. startVoiceServer, the function behind that command, is internal: it is a function rather than a NeuroLinkVoiceServer class, and the package does not export it, so there is no supported import path for starting it from code.\n\nThe server emits OTEL spans + Langfuse traces per session, supports HITL approvals on tool calls, and can be deployed standalone or behind your own gateway.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Self-hosted Realtime Voice Server","lvl3":""}},
|
|
4341
4341
|
{"objectID":"bd64662bc081839e65fa0142f0f05090121ed145e2df85dc04bc4da3eedad07d","title":"Provider Selection","url":"/docs/features/real-time-services#provider-selection","content":"| Use case | Recommended provider |\n| --------------------------------------------------------- | ----------------------------------------------------- |\n| English-first, broad voice catalog, GPT-4o reasoning | openai-realtime |\n| Multilingual, video input, lowest latency in many regions | gemini-live |\n| Customer support voice bots with structured tool calls | openai-realtime (more deterministic function calls) |\n| In-app voice search / multimodal queries | gemini-live |\n\nEither can be wrapped behind providerFallback so a model-access denial automatically falls through to the alternate model. See Provider Fallback — note that the orchestrator only triggers on access-denied errors, not on rate limits or generic failures.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Provider Selection","lvl3":""}},
|
|
4342
4342
|
{"objectID":"491a5c18055e328dafca470921c76a02c447e8212d99904e7964b0021f3c08ab","title":"Tool Calls Inside Realtime Sessions","url":"/docs/features/real-time-services#tool-calls-inside-realtime-sessions","content":"Both providers can call functions registered with the realtime session. Use the onFunctionCall handler (not onToolCall — that name is reserved for the streaming-text API):\n\nWhen HITL middleware is wired in front of the function-call handler, sensitive operations (e.g. cancelOrder, chargeCard) pause for human approval before responding back into the realtime stream.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Tool Calls Inside Realtime Sessions","lvl3":""}},
|
|
4343
4343
|
{"objectID":"b245605b86c76d4a79fc9b4399211a7fa803e23fe9dfb682b81c5853af40ae37","title":"Observability","url":"/docs/features/real-time-services#observability","content":"Realtime sessions emit:\nsession:start, session:end events with duration + token usage\nPer-utterance transcript:user, transcript:assistant events\ntool:call, tool:result events\naudio:in:bytes, audio:out:bytes for bandwidth tracking\n\nThese flow into the same OTEL/Langfuse pipeline as text generation. See the Observability Guide.","hierarchy":{"lvl0":"Features","lvl1":"Real-time Voice Services","lvl2":"Observability","lvl3":""}},
|
|
@@ -9799,7 +9799,7 @@
|
|
|
9799
9799
|
{"objectID":"61a3976ba8f1c5eeed456f7af64d3274a0fd5bf8ee77fe201de27295f5b403cb","title":"8. Documentation Verification","url":"/docs/rag/VERIFICATION#8-documentation-verification","content":"| Document | Exists | Accurate | Complete | Status |\n| ---------------- | ------ | -------- | -------- | ------ |\n| TESTING.md | [ ] | [ ] | [ ] | [ ] |\n| CONFIGURATION.md | [ ] | [ ] | [ ] | [ ] |\n| VERIFICATION.md | [ ] | [ ] | [ ] | [ ] |\n| CLI-COVERAGE.md | [ ] | [ ] | [ ] | [ ] |","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"8. Documentation Verification","lvl3":""}},
|
|
9800
9800
|
{"objectID":"83f7357fa2d3b81496d704bba2ae12343314f32e2ccec6dae2248e63867cddca","title":"Sign-off","url":"/docs/rag/VERIFICATION#sign-off","content":"| Role | Name | Date | Signature |\n| --------- | ---- | ---- | --------- |\n| Developer | | | |\n| QA | | | |\n| Tech Lead | | | |","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"Sign-off","lvl3":""}},
|
|
9801
9801
|
{"objectID":"574e58b2065b4cf4518e5cbf15dfd86d2bea4091d742c3eeb19a4f89f28fbfc5","title":"Notes","url":"/docs/rag/VERIFICATION#notes","content":"Add any observations, issues, or recommendations here:","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"Notes","lvl3":""}},
|
|
9802
|
-
{"objectID":"9b3ba67e38b636436e6b2f378b85e8b14b45f30f68b91afe7597703a50c9d82a","title":"Analytics Reference","url":"/docs/reference/analytics","content":"Analytics Reference\n\nNeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.\n\nOverview\n\nThe analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |\n\nToken Usage Tracking\n\nBasic Token Usage\n\nNeuroLink automatically tracks token usage for every generation:\n\nTokenUsage Type\n\nThe TokenUsage type provides detailed token information:\n\nCache Token Tracking\n\nFor providers that support prompt caching (Anthropic, Google), NeuroLink tracks cache metrics:\n\nReasoning Token Tracking\n\nFor models with extended thinking capabilities (OpenAI o1, Anthropic Claude with thinking, Gemini 3):\n\nCost Analytics\n\nAutomatic Cost Estimation\n\nNeuroLink automatically estimates costs based on provider pricing:\n\nCost Calculation Formula\n\nCosts are calculated using per-token pricing:\n\nProvider Pricing Configuration\n\nNeuroLink uses configurable pricing for each provider:\n\n| Provider | Default Input Cost (per 1K) | Default Output Cost (per 1K) |\n| ------------- | --------------------------- | ---------------------------- |\n| OpenAI | $0.00015 | $0.0006 |\n| Anthropic | $0.0015 | $0.0075 |\n| Google AI | $0.000075 | $0.0003 |\n| Google Vertex | $0.000075 | $0.0003 |\n| Bedrock | $0.0015 | $0.0075 |\n| Azure | $0.00015 | $0.0006 |\n| Mistral | $0.0001 | $0.0003 |\n| HuggingFace | $0.0002 | $0.0008 |\n| Ollama | $0 | $0 |\n\nCustom Cost Configuration\n\nOverride default pricing via environment variables:\n\nAggregating Costs\n\nTrack cumulative costs across multiple requests:\n\nPerformance Metrics\n\nResponse Time Tracking\n\nEvery request automatically tracks response time:\n\nAnalyticsData Structure\n\nThe complete analytics data structure:\n\nPerformance Metrics Type\n\nFor advanced performance tracking:\n\nStream Performance Metrics\n\nFor streaming requests, additional metrics are available:\n\nStreaming Example\n\nQuality Evaluation\n\nEnabling Evaluation\n\nNeuroLink can automatically evaluate response quality:\n\nEvaluationData Structure\n\nDomain-Aware Evaluation\n\nConfigure evaluation for specific domains:\n\nEvaluation Providers\n\nEvaluation can use different providers:\n\nAnalytics Middleware\n\nUsing Analytics Middleware\n\nNeuroLink provides built-in analytics middleware:\n\nMiddleware Metadata\n\nThe analytics middleware provides:\n\nCustom Analytics Collection\n\nImplement custom analytics collection:\n\
|
|
9802
|
+
{"objectID":"9b3ba67e38b636436e6b2f378b85e8b14b45f30f68b91afe7597703a50c9d82a","title":"Analytics Reference","url":"/docs/reference/analytics","content":"Analytics Reference\n\nNeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.\n\nOverview\n\nThe analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |\n\nToken Usage Tracking\n\nBasic Token Usage\n\nNeuroLink automatically tracks token usage for every generation:\n\nTokenUsage Type\n\nThe TokenUsage type provides detailed token information:\n\nCache Token Tracking\n\nFor providers that support prompt caching (Anthropic, Google), NeuroLink tracks cache metrics:\n\nReasoning Token Tracking\n\nFor models with extended thinking capabilities (OpenAI o1, Anthropic Claude with thinking, Gemini 3):\n\nCost Analytics\n\nAutomatic Cost Estimation\n\nNeuroLink automatically estimates costs based on provider pricing:\n\nCost Calculation Formula\n\nCosts are calculated using per-token pricing:\n\nProvider Pricing Configuration\n\nNeuroLink uses configurable pricing for each provider:\n\n| Provider | Default Input Cost (per 1K) | Default Output Cost (per 1K) |\n| ------------- | --------------------------- | ---------------------------- |\n| OpenAI | $0.00015 | $0.0006 |\n| Anthropic | $0.0015 | $0.0075 |\n| Google AI | $0.000075 | $0.0003 |\n| Google Vertex | $0.000075 | $0.0003 |\n| Bedrock | $0.0015 | $0.0075 |\n| Azure | $0.00015 | $0.0006 |\n| Mistral | $0.0001 | $0.0003 |\n| HuggingFace | $0.0002 | $0.0008 |\n| Ollama | $0 | $0 |\n\nCustom Cost Configuration\n\nOverride default pricing via environment variables:\n\nAggregating Costs\n\nTrack cumulative costs across multiple requests:\n\nPerformance Metrics\n\nResponse Time Tracking\n\nEvery request automatically tracks response time:\n\nAnalyticsData Structure\n\nThe complete analytics data structure:\n\nPerformance Metrics Type\n\nFor advanced performance tracking:\n\nStream Performance Metrics\n\nFor streaming requests, additional metrics are available:\n\nStreaming Example\n\nQuality Evaluation\n\nEnabling Evaluation\n\nNeuroLink can automatically evaluate response quality:\n\nEvaluationData Structure\n\nDomain-Aware Evaluation\n\nConfigure evaluation for specific domains:\n\nEvaluation Providers\n\nEvaluation can use different providers:\n\nAnalytics Middleware\n\nUsing Analytics Middleware\n\nNeuroLink provides built-in analytics middleware:\n\nMiddleware Metadata\n\nThe analytics middleware provides:\n\nCustom Analytics Collection\n\nImplement custom analytics collection:\n\nIntegration with Observability Tools\n\nOpenTelemetry Integration\n\nExport analytics to OpenTelemetry:\n\nPrometheus Metrics\n\nExport metrics to Prometheus:\n\nDataDog Integration\n\nSend analytics to DataDog:\n\nCustom Logging\n\nStructured logging with analytics:\n\nUsage Statistics\n\nTracking Usage Over Time\n\nBuild usage dashboards with aggregated statistics:\n\nRate Limiting Based on Usage\n\nImplement rate limiting using analytics:\n\nCLI Analytics\n\nViewing Analytics in CLI\n\nVerbose Analytics\n\nBest Practices\nAlways Enable Analytics in Production\nMonitor Cost Alerts\nTrack Token Efficiency\nImplement Budget Controls\n\nRelated Documentation\nConfiguration Reference - Configure analytics settings\nProvider Comparison - Compare provider costs\nTroubleshooting - Debug analytics issues\nError Codes - Analytics-related error codes","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"","lvl3":""}},
|
|
9803
9803
|
{"objectID":"0926aba6cc673644c3648445ea2da40fb83fabeb6f365c4e889c094c3560fb9d","title":"Analytics Reference","url":"/docs/reference/analytics#analytics-reference","content":"NeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Analytics Reference","lvl3":""}},
|
|
9804
9804
|
{"objectID":"2405c488fbebcf4cfe8245a94e5fe3eb106a312cde6bd795c0b2710362507e6f","title":"Overview","url":"/docs/reference/analytics#overview","content":"The analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Overview","lvl3":""}},
|
|
9805
9805
|
{"objectID":"4de3db21ab73ce27bed5f620bc7d11d61e84931962cde34efcd084c976a22c99","title":"Basic Token Usage","url":"/docs/reference/analytics#basic-token-usage","content":"NeuroLink automatically tracks token usage for every generation:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Basic Token Usage","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.45.0",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
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": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"build:cli:link": "pnpm run build:cli && pnpm link --global",
|
|
36
36
|
"check:deps": "tsx scripts/check-banned-deps.ts",
|
|
37
37
|
"check:dts": "tsx scripts/check-shipped-types.ts",
|
|
38
|
+
"check:docs-api": "tsx scripts/check-docs-api.ts",
|
|
38
39
|
"codegen:catalog": "tsx tools/codegen-catalog.ts",
|
|
39
40
|
"cli": "node dist/cli/index.js",
|
|
40
41
|
"preview": "vite preview",
|
|
@@ -188,6 +189,7 @@
|
|
|
188
189
|
"test:tool-routing-cli": "pnpm exec tsx test/continuous-test-suite-tool-routing-cli.ts",
|
|
189
190
|
"test:tool-dedup": "pnpm exec tsx test/continuous-test-suite-tool-dedup.ts",
|
|
190
191
|
"test:tools-manager-truncation": "pnpm exec tsx test/continuous-test-suite-tools-manager-truncation.ts",
|
|
192
|
+
"test:tooling-scripts": "pnpm exec tsx test/continuous-test-suite-tooling-scripts.ts",
|
|
191
193
|
"test:model-not-found-retryable": "pnpm exec tsx test/continuous-test-suite-model-not-found-retryable.ts",
|
|
192
194
|
"test:reasoning-parity-live": "pnpm exec tsx test/continuous-test-suite-reasoning-parity-live.ts",
|
|
193
195
|
"test:ci": "pnpm run test && pnpm run test:client && pnpm run test:hitl",
|
|
@@ -250,7 +252,7 @@
|
|
|
250
252
|
"validate:commit": "tsx scripts/commit-validation.ts",
|
|
251
253
|
"quality:metrics": "tsx scripts/quality-metrics.ts",
|
|
252
254
|
"quality:report": "pnpm run quality:metrics && echo 'Quality metrics saved to quality-metrics.json'",
|
|
253
|
-
"pre-push": "pnpm run check:deps && pnpm run build && pnpm run test:provider-structure && pnpm run test:model-manifests",
|
|
255
|
+
"pre-push": "pnpm run check:deps && pnpm run check:docs-api && pnpm run build && pnpm run test:provider-structure && pnpm run test:model-manifests",
|
|
254
256
|
"check:all": "pnpm run lint && pnpm run format --check && pnpm run validate && pnpm run validate:commit",
|
|
255
257
|
"test:file-formats": "pnpm exec tsx test/continuous-test-suite-file-formats.ts",
|
|
256
258
|
"test:audio-transcription": "pnpm exec tsx test/continuous-test-suite-audio-transcription.ts",
|
|
@@ -279,6 +281,8 @@
|
|
|
279
281
|
"test:aistudio-loop-characterization": "tsx test/continuous-test-suite-aistudio-loop-characterization.ts",
|
|
280
282
|
"test:docs-mcp": "pnpm exec tsx test/continuous-test-suite-docs-mcp.ts",
|
|
281
283
|
"test:docs-search-index": "pnpm exec tsx test/continuous-test-suite-docs-search-index.ts",
|
|
284
|
+
"test:docs-snippets": "pnpm exec tsx test/continuous-test-suite-docs-snippets.ts",
|
|
285
|
+
"test:docs-snippets:update": "pnpm exec tsx test/continuous-test-suite-docs-snippets.ts --update-ledger",
|
|
282
286
|
"test:import-cost": "pnpm exec tsx test/continuous-test-suite-import-cost.ts",
|
|
283
287
|
"test:vertex-claude-characterization": "tsx test/continuous-test-suite-vertex-claude-characterization.ts",
|
|
284
288
|
"test:toolfree-guard-overhead": "pnpm exec tsx test/continuous-test-suite-toolfree-guard-overhead.ts",
|