@juspay/neurolink 12.25.5 → 12.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/dist/browser/neurolink.min.js +382 -382
- package/dist/cli/commands/decide.d.ts +2 -1
- package/dist/cli/commands/decide.js +4 -2
- package/dist/cli/commands/setup.js +2 -1
- package/dist/cli/factories/commandFactory.js +1 -1
- package/dist/cli/utils/classifierRouterFlags.js +1 -1
- package/dist/constants/enums.d.ts +15 -0
- package/dist/constants/enums.js +16 -0
- package/dist/core/baseProvider.js +2 -2
- package/dist/factories/providerDescriptors.d.ts +16 -7
- package/dist/factories/providerDescriptors.js +97 -15
- package/dist/factories/providerRegistry.js +9 -1
- package/dist/mcp/externalServerManager.js +16 -2
- package/dist/mcp/mcpCircuitBreaker.d.ts +24 -3
- package/dist/mcp/mcpCircuitBreaker.js +57 -18
- package/dist/mcp/toolDiscoveryService.js +20 -4
- package/dist/models/manifestRegistry.js +2 -0
- package/dist/models/manifests/laya.d.ts +12 -0
- package/dist/models/manifests/laya.js +54 -0
- package/dist/neurolink.js +8 -3
- package/dist/providers/laya.d.ts +40 -0
- package/dist/providers/laya.js +170 -0
- package/dist/providers/systemOneDecision.d.ts +102 -0
- package/dist/providers/systemOneDecision.js +443 -0
- package/dist/providers/typesafe.d.ts +32 -47
- package/dist/providers/typesafe.js +64 -386
- package/dist/routing/classifierRouter.d.ts +2 -2
- package/dist/routing/classifierRouter.js +10 -8
- package/dist/types/classifierRouter.d.ts +13 -3
- package/dist/types/cli.d.ts +3 -2
- package/dist/types/decision.d.ts +29 -0
- package/dist/types/externalMcp.d.ts +7 -0
- package/dist/types/providers.d.ts +20 -1
- package/dist/utils/modelChoices.js +21 -1
- package/dist/utils/providerConfig.d.ts +5 -0
- package/dist/utils/providerConfig.js +17 -0
- package/docs-site/static/search-index.json +24 -10
- package/package.json +4 -2
package/dist/types/cli.d.ts
CHANGED
|
@@ -1715,8 +1715,9 @@ export type CliClassifierRouterFlags = {
|
|
|
1715
1715
|
classifierRouter?: boolean;
|
|
1716
1716
|
/**
|
|
1717
1717
|
* Strategy: "auto" (default), "heuristic", "llm" or "jev"
|
|
1718
|
-
* (--classifier-strategy). "auto" resolves to "jev" when
|
|
1719
|
-
* is
|
|
1718
|
+
* (--classifier-strategy). "auto" resolves to "jev" when a decision
|
|
1719
|
+
* provider is configured (TYPESAFE_API_KEY, or LAYA_API_KEY with
|
|
1720
|
+
* LAYA_BASE_URL) and "heuristic" otherwise.
|
|
1720
1721
|
*/
|
|
1721
1722
|
classifierStrategy?: string;
|
|
1722
1723
|
/**
|
package/dist/types/decision.d.ts
CHANGED
|
@@ -117,6 +117,35 @@ export type DecisionResult = {
|
|
|
117
117
|
/** Server-side time behind the edge; isolates model time from network. */
|
|
118
118
|
upstreamMs?: number;
|
|
119
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* Input a decision provider can actually read, declared on its descriptor.
|
|
122
|
+
*
|
|
123
|
+
* A request over either limit is refused before any network call with
|
|
124
|
+
* `max_tokens_exceeded`, so no decision is ever made on input the model
|
|
125
|
+
* silently cut off. Every internal consumer already treats that error as
|
|
126
|
+
* "carry on as before".
|
|
127
|
+
*/
|
|
128
|
+
export type DecisionLimits = {
|
|
129
|
+
/**
|
|
130
|
+
* Estimated tokens of `state` (serialized first when it is not a string)
|
|
131
|
+
* for any model NOT listed in `models` — an alias, a typo, a self-hosted
|
|
132
|
+
* name — so it should be the tightest window the provider has.
|
|
133
|
+
*/
|
|
134
|
+
maxStateTokens: number;
|
|
135
|
+
maxQuestions: number;
|
|
136
|
+
/**
|
|
137
|
+
* Tokens charged per non-ASCII character. The default estimate assumes ~4
|
|
138
|
+
* characters per token, which holds for English and is several times too
|
|
139
|
+
* generous for other scripts on an English tokenizer. Absent = default
|
|
140
|
+
* estimate for every character.
|
|
141
|
+
*/
|
|
142
|
+
nonAsciiTokensPerChar?: number;
|
|
143
|
+
/** Per-model limits, keyed by model id; each field overrides the one above. */
|
|
144
|
+
models?: Readonly<Record<string, {
|
|
145
|
+
maxStateTokens: number;
|
|
146
|
+
nonAsciiTokensPerChar?: number;
|
|
147
|
+
}>>;
|
|
148
|
+
};
|
|
120
149
|
/**
|
|
121
150
|
* Why a decision call failed, normalised across vendors. TypeSafe alone
|
|
122
151
|
* returns two different error envelopes, so a provider must flatten them.
|
|
@@ -234,6 +234,13 @@ export type ExternalMCPToolResult = {
|
|
|
234
234
|
data?: unknown;
|
|
235
235
|
/** Error message if failed */
|
|
236
236
|
error?: string;
|
|
237
|
+
/**
|
|
238
|
+
* True when the call completed at the transport level but the MCP result
|
|
239
|
+
* itself is `{ isError: true }`. `success` stays true for such results so
|
|
240
|
+
* the resolved MCP error payload still reaches the caller unchanged; this
|
|
241
|
+
* flag is what lets stats and telemetry count the call as a failure.
|
|
242
|
+
*/
|
|
243
|
+
isErrorResult?: boolean;
|
|
237
244
|
/** Execution duration in milliseconds */
|
|
238
245
|
duration: number;
|
|
239
246
|
/** Tool execution metadata */
|
|
@@ -5,7 +5,7 @@ import type { UnknownRecord, JsonValue, StreamingCapability } from "./common.js"
|
|
|
5
5
|
import type { NeuroLink } from "../neurolink.js";
|
|
6
6
|
import { AIProviderName, AnthropicModels, BedrockModels, DeepSeekModels, GoogleAIModels, LlamaCppModels, LMStudioModels, NvidiaNimModels, OpenAIModels, VertexModels } from "../constants/enums.js";
|
|
7
7
|
import type { ValidationSchema } from "./aliases.js";
|
|
8
|
-
import type { DecisionRequest, DecisionResult } from "./decision.js";
|
|
8
|
+
import type { DecisionLimits, DecisionRequest, DecisionResult } from "./decision.js";
|
|
9
9
|
import type { EnhancedGenerateResult, TextGenerationOptions } from "./generate.js";
|
|
10
10
|
import type { MultimodalAudioEntry } from "./file.js";
|
|
11
11
|
import type { StreamOptions, StreamResult } from "./stream.js";
|
|
@@ -298,6 +298,20 @@ export type NeurolinkCredentials = {
|
|
|
298
298
|
transport?: "direct" | "gateway";
|
|
299
299
|
/** Vercel AI Gateway key. Defaults to `AI_GATEWAY_API_KEY`. */
|
|
300
300
|
gatewayApiKey?: string;
|
|
301
|
+
/**
|
|
302
|
+
* The gateway transport's evaluation-model route. Defaults to
|
|
303
|
+
* `TYPESAFE_GATEWAY_URL`, then Vercel's own route.
|
|
304
|
+
*/
|
|
305
|
+
gatewayURL?: string;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Laya (Convai, open weights) — the `decide` inference type. There is no
|
|
309
|
+
* built-in endpoint: `baseURL` (or LAYA_BASE_URL) is required, pointing at a
|
|
310
|
+
* Laya server or a proxy route to one; requests go to `<baseURL>/predict`.
|
|
311
|
+
*/
|
|
312
|
+
laya?: {
|
|
313
|
+
apiKey?: string;
|
|
314
|
+
baseURL?: string;
|
|
301
315
|
};
|
|
302
316
|
};
|
|
303
317
|
/**
|
|
@@ -2026,6 +2040,11 @@ export type ProviderDescriptor = {
|
|
|
2026
2040
|
streamMs?: number;
|
|
2027
2041
|
decideMs?: number;
|
|
2028
2042
|
};
|
|
2043
|
+
/**
|
|
2044
|
+
* What a `decide` provider can read. Absent means the provider leaves size
|
|
2045
|
+
* checks to its own server (TypeSafe). See {@link DecisionLimits}.
|
|
2046
|
+
*/
|
|
2047
|
+
decisionLimits?: DecisionLimits;
|
|
2029
2048
|
/** Ascending priority (1 = tried first) in the auto-select fallback chain used by getBestProvider(). Undefined = not part of the auto-select chain. */
|
|
2030
2049
|
autoSelectPriority?: number;
|
|
2031
2050
|
/** Format-validation regex sourced from providerConfig.ts's API_KEY_FORMATS, when one exists for this provider. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Centralized model choices for CLI commands
|
|
3
3
|
* Derives choices from model enums to ensure consistency
|
|
4
4
|
*/
|
|
5
|
-
import { AIProviderName, OpenAIModels, AnthropicModels, GoogleAIModels, BedrockModels, VertexModels, OllamaModels, AzureOpenAIModels, LiteLLMModels, SageMakerModels, OpenRouterModels, NvidiaNimModels, CohereModels, VoyageModels, JinaModels, StabilityModels, IdeogramModels, RecraftModels, TypeSafeModels, ReplicateModels, } from "../constants/enums.js";
|
|
5
|
+
import { AIProviderName, OpenAIModels, AnthropicModels, GoogleAIModels, BedrockModels, VertexModels, OllamaModels, AzureOpenAIModels, LiteLLMModels, SageMakerModels, OpenRouterModels, NvidiaNimModels, CohereModels, VoyageModels, JinaModels, StabilityModels, IdeogramModels, RecraftModels, TypeSafeModels, LayaModels, ReplicateModels, } from "../constants/enums.js";
|
|
6
6
|
import { getCatalogJsonEntries } from "../providers/catalog/loader.js";
|
|
7
7
|
/**
|
|
8
8
|
* Looks up the JSON catalog entry for a provider, if it is one of the 11
|
|
@@ -379,6 +379,24 @@ const TOP_MODELS_CONFIG = {
|
|
|
379
379
|
description: "Preview build of Jev",
|
|
380
380
|
},
|
|
381
381
|
],
|
|
382
|
+
[AIProviderName.LAYA]: [
|
|
383
|
+
{
|
|
384
|
+
model: LayaModels.TYPED_DECISIONS,
|
|
385
|
+
description: "Recommended - Laya fine-tuned for typed decisions",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
model: LayaModels.MULTILINGUAL,
|
|
389
|
+
description: "Laya, 100+ languages",
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
model: LayaModels.ENGLISH,
|
|
393
|
+
description: "Laya, English base checkpoint (512-token window)",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
model: LayaModels.AUTO,
|
|
397
|
+
description: "Let Laya pick a checkpoint by language",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
382
400
|
[AIProviderName.AUTO]: [],
|
|
383
401
|
};
|
|
384
402
|
/**
|
|
@@ -417,6 +435,7 @@ export const DEFAULT_MODELS = {
|
|
|
417
435
|
[AIProviderName.IDEOGRAM]: IdeogramModels.IDEOGRAM_V3,
|
|
418
436
|
[AIProviderName.RECRAFT]: RecraftModels.RECRAFT_V3,
|
|
419
437
|
[AIProviderName.TYPESAFE]: TypeSafeModels.JEV_LATEST,
|
|
438
|
+
[AIProviderName.LAYA]: LayaModels.TYPED_DECISIONS,
|
|
420
439
|
};
|
|
421
440
|
/**
|
|
422
441
|
* Model enum mappings for getAllModels.
|
|
@@ -448,6 +467,7 @@ const MODEL_ENUMS = {
|
|
|
448
467
|
[AIProviderName.IDEOGRAM]: IdeogramModels,
|
|
449
468
|
[AIProviderName.RECRAFT]: RecraftModels,
|
|
450
469
|
[AIProviderName.TYPESAFE]: TypeSafeModels,
|
|
470
|
+
[AIProviderName.LAYA]: LayaModels,
|
|
451
471
|
[AIProviderName.AUTO]: null,
|
|
452
472
|
};
|
|
453
473
|
/**
|
|
@@ -400,3 +400,8 @@ export declare function resolveOpenAICompatConfig(entry: OpenAICompatConfigInput
|
|
|
400
400
|
* TypeSafe (Jev) — the `decide` inference type. Not a text provider.
|
|
401
401
|
*/
|
|
402
402
|
export declare function createTypeSafeConfig(): ProviderConfigOptions;
|
|
403
|
+
/**
|
|
404
|
+
* Laya — the `decide` inference type. Not a text provider, and it has no
|
|
405
|
+
* built-in endpoint: LAYA_BASE_URL is required alongside the key.
|
|
406
|
+
*/
|
|
407
|
+
export declare function createLayaConfig(): ProviderConfigOptions;
|
|
@@ -1324,3 +1324,20 @@ export function createTypeSafeConfig() {
|
|
|
1324
1324
|
],
|
|
1325
1325
|
};
|
|
1326
1326
|
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Laya — the `decide` inference type. Not a text provider, and it has no
|
|
1329
|
+
* built-in endpoint: LAYA_BASE_URL is required alongside the key.
|
|
1330
|
+
*/
|
|
1331
|
+
export function createLayaConfig() {
|
|
1332
|
+
return {
|
|
1333
|
+
providerName: "Laya",
|
|
1334
|
+
envVarName: "LAYA_API_KEY",
|
|
1335
|
+
setupUrl: "https://github.com/NandhaKishorM/laya",
|
|
1336
|
+
description: "API key for your Laya endpoint",
|
|
1337
|
+
instructions: [
|
|
1338
|
+
"1. Run a Laya server, or use a LiteLLM proxy with a pass-through route to one",
|
|
1339
|
+
"2. Set LAYA_BASE_URL to its base URL (NeuroLink calls <LAYA_BASE_URL>/predict)",
|
|
1340
|
+
"3. Set LAYA_API_KEY to the key it accepts (on LiteLLM, a virtual key with that route in its Allowed Routes)",
|
|
1341
|
+
],
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
{"objectID":"117773e42d8af865d4b220619b88760164a39e0e143fc65efbbb2ba3db723032","title":"stream <input> {#stream}","url":"/docs/cli/commands#stream-input-stream","content":"shares the same flags as and adds chunked output for live UIs. Evaluation results are emitted after the stream completes when is set.","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"stream <input> {#stream}","lvl3":""}},
|
|
782
782
|
{"objectID":"112fba73837b247878d2a9e5e27da20722703f27b30aec829b7a5e7a35fa4907","title":"decide [state] {#decide}","url":"/docs/cli/commands#decide-state-decide","content":"Get typed, calibrated judgements from a decision model — the inference type, alongside and . Takes one plus a map of named typed questions and prints one answer per question; there is no free text anywhere in the response.\n\n`bash","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"decide [state] {#decide}","lvl3":""}},
|
|
783
783
|
{"objectID":"0076ed0bb97c3c91b6019b1168d3de94687353bc588fc474812ff9a55bf325d3","title":"State as a positional argument","url":"/docs/cli/commands#state-as-a-positional-argument","content":"npx @juspay/neurolink decide \"Refund request for a damaged item\" \\\n --questions '{\"urgent\":{\"type\":\"boolean\",\"instructions\":\"Is this urgent?\"}}'","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"State as a positional argument","lvl3":""}},
|
|
784
|
-
{"objectID":"e7605e932a3b0b4ce109cdb2cbb0d1d5012cb18891ee886ed14d4873544bd69e","title":"State and questions from files, raw JSON output","url":"/docs/cli/commands#state-and-questions-from-files-raw-json-output","content":"npx @juspay/neurolink decide --state-file ticket.json \\\n --questions-file questions.json --format json\nstate--state-file--state-file --questions --questions-file--questions-file --provider --model --timeout --format text\\|json-ftextjson--debug-v--format jsonbooleanchoicescore--questions--questions-
|
|
784
|
+
{"objectID":"e7605e932a3b0b4ce109cdb2cbb0d1d5012cb18891ee886ed14d4873544bd69e","title":"State and questions from files, raw JSON output","url":"/docs/cli/commands#state-and-questions-from-files-raw-json-output","content":"npx @juspay/neurolink decide --state-file ticket.json \\\n --questions-file questions.json --format json\nstate--state-file--state-file --questions --questions-file--questions-file --provider typesafelayaTYPESAFEAPIKEYAIGATEWAYAPIKEY--model --timeout --format text\\|json-ftextjson--debug-v--format jsonbooleanchoicescore--questions--questions-fileTYPESAFEAPIKEYAIGATEWAYAPIKEYLAYAAPIKEYLAYABASEURLdecide` inference type](/docs/features/decide-inference-type) for the full concept and the SDK equivalent.","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"State and questions from files, raw JSON output","lvl3":""}},
|
|
785
785
|
{"objectID":"7b43d630a9f7ed5a224fe8887281efede99fe513e10cd3d1322dfb30ded920b0","title":"batch <file> {#batch}","url":"/docs/cli/commands#batch-file-batch","content":"Process multiple prompts from a file in sequence.\n\n`bash","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"batch <file> {#batch}","lvl3":""}},
|
|
786
786
|
{"objectID":"7295bf29c7231cdfbc08cfe63fa54bdd96d158a2f3d4ffb093a8d86826c42abf","title":"Process prompts from a file","url":"/docs/cli/commands#process-prompts-from-a-file","content":"npx @juspay/neurolink batch prompts.txt","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"Process prompts from a file","lvl3":""}},
|
|
787
787
|
{"objectID":"f5a81a31f8f017423e190eed5892ad06dbeb9bc3d55c3224a9e34909c9332aad","title":"Export results as JSON","url":"/docs/cli/commands#export-results-as-json","content":"npx @juspay/neurolink batch questions.txt --format json","hierarchy":{"lvl0":"Cli","lvl1":"CLI Command Reference","lvl2":"Export results as JSON","lvl3":""}},
|
|
@@ -3325,11 +3325,12 @@
|
|
|
3325
3325
|
{"objectID":"a78bcf758e0d2cbf2d2e9ad39bb04c851848618fb55718447904be31d350055b","title":"Limitations","url":"/docs/features/csv-support#limitations","content":"Max file size: 10MB by default (configurable)\nMax rows: 1000 by default (configurable)\nEncoding: auto-detected via BOM + (UTF-8 / UTF-16 / Windows-1252 / Latin-1 …), or forced with (#362)\nPer-row size: a single row is capped at 10MB to bound memory; larger rows fail fast with a clear error (#371)\nParse timeout: parsing is time-bounded (30s strings / 5min files); on timeout partial rows are returned with (#379)\nRow shape: parsed rows are validated to be string-keyed objects with string values; a malformed row aborts the parse with (#384)\nToken limits: Large CSV files may exceed provider token limits\nStreaming: CSV content is parsed and formatted before sending (not streamed to LLM)","hierarchy":{"lvl0":"Features","lvl1":"CSV File Support","lvl2":"Limitations","lvl3":""}},
|
|
3326
3326
|
{"objectID":"1e48831d1c4fc775af2633d0340bdeb3d11c96abc213cbdd814a53d14ce500df","title":"Related Features","url":"/docs/features/csv-support#related-features","content":"Office Documents: DOCX, PPTX, XLSX processing\nPDF Support: PDF document processing\nImage Support: Similar multimodal input for images\nFile Detection: Auto-detect file types with confidence scores\nMemory Efficient: Streaming parser for large files\nProvider Agnostic: Works with all AI providers\nCLI Integration: Full CLI support with options","hierarchy":{"lvl0":"Features","lvl1":"CSV File Support","lvl2":"Related Features","lvl3":""}},
|
|
3327
3327
|
{"objectID":"19734b9ffaeb8376dfcebd944730a4cedae77bc1e7ed769733b8b71b1758c421","title":"Summary","url":"/docs/features/csv-support#summary","content":"CSV support is multimodal input (like images)\nUse array or array (auto-detect)\nCustomize with (maxRows, formatStyle, includeHeaders)\nWorks with ALL providers (not just vision models)\nMemory efficient streaming parser\nCLI support with , , , \nOnly types exposed from package (not classes)","hierarchy":{"lvl0":"Features","lvl1":"CSV File Support","lvl2":"Summary","lvl3":""}},
|
|
3328
|
-
{"objectID":"fce0b532226adb069bbeb5459dc5e4ec28037617ca805845768d918653ddbfd5","title":"The `decide` inference type","url":"/docs/features/decide-inference-type","content":"The inference type\n\nDeep-dive: generate, stream, decide: a third inference type for NeuroLink —\nwhy this shipped as a provider rather than a subsystem, the five call sites, and the four\ntransport bugs found by adding the Vercel AI Gateway (two of which produced plausible output).\n\nNeuroLink recognises three inference types. Two of them produce text:\n\n| Type | Call | Produces |\n| ------------ | ------------------------ | ------------------------------------------ |\n| | | text |\n| | | text, incrementally |\n| * | | typed, calibrated judgements — no text* |\n\nA decision model takes one plus a map of named, typed questions and\nreturns one typed answer per question, all evaluated in a single parallel pass.\nThere is no text anywhere in the response, so nothing has to be parsed back out\nof prose. TypeSafe's Jev
|
|
3329
|
-
{"objectID":"f91e7ef7473aa411ff8c0d3b04381325781477c1876408ffd5469dbaf2d9584c","title":"The decide inference type","url":"/docs/features/decide-inference-type#the-decide-inference-type","content":"Deep-dive: generate, stream, decide: a third inference type for NeuroLink —\nwhy this shipped as a provider rather than a subsystem, the five call sites, and the four\ntransport bugs found by adding the Vercel AI Gateway (two of which produced plausible output).\n\nNeuroLink recognises three inference types. Two of them produce text:\n\n| Type | Call | Produces |\n| ------------ | ------------------------ | ------------------------------------------ |\n| | | text |\n| | | text, incrementally |\n| * | | typed, calibrated judgements — no text* |\n\nA decision model takes one plus a map of named, typed questions and\nreturns one typed answer per question, all evaluated in a single parallel pass.\nThere is no text anywhere in the response, so nothing has to be parsed back out\nof prose. TypeSafe's Jev
|
|
3328
|
+
{"objectID":"fce0b532226adb069bbeb5459dc5e4ec28037617ca805845768d918653ddbfd5","title":"The `decide` inference type","url":"/docs/features/decide-inference-type","content":"The inference type\n\nDeep-dive: generate, stream, decide: a third inference type for NeuroLink —\nwhy this shipped as a provider rather than a subsystem, the five call sites, and the four\ntransport bugs found by adding the Vercel AI Gateway (two of which produced plausible output).\n\nNeuroLink recognises three inference types. Two of them produce text:\n\n| Type | Call | Produces |\n| ------------ | ------------------------ | ------------------------------------------ |\n| | | text |\n| | | text, incrementally |\n| * | | typed, calibrated judgements — no text* |\n\nA decision model takes one plus a map of named, typed questions and\nreturns one typed answer per question, all evaluated in a single parallel pass.\nThere is no text anywhere in the response, so nothing has to be parsed back out\nof prose. TypeSafe's Jev was the first such model; Convai Innovations' open-weights\nLaya is the second.\n\nThis is not , which scores an\nalready-generated response with RAGAS scorers. Different feature, different\nword.\n\nThe three primitives\n\n| Type | Question | Answer fields |\n| --------- | ------------------------------ | ------------------------------------------------ |\n| | Is this statement true? | (0–1) — no confidence |\n| | Which option from this set? | , , |\n| | Rate against an ordered rubric | , , , |\n\nAll three mix freely in one call.\n\nVocabulary note. TypeSafe calls the yes/no primitive a and answers\nit in a field of the same name. The Vercel AI SDK and Pydantic AI both renamed\nthat to / when exposing it, and NeuroLink follows them —\nthe vendor's spelling is translated inside , so a second\ndecision provider slots in without changing any call site.\n\nConfidence is not probability\n\n says what the model thinks. says _whether you\nshould act on it_. It is calibrated — derived from the distribution, not\nself-reported — which is what makes it usable as a gate.\n\nCalibration is a property of groups of answers, not a promise about any\none. Across many answers, those scored 0.8 are right about 80% of the time.\nIt does not mean a specific 0.8 answer is right.\n\nA carries no confidence of its own. Use \n— distance from a coin flip, so 0.5 → 0 and 0/1 → 1. Note also that a \nand an equivalent two-option are not guaranteed to agree, and\ncomplementary booleans do not reliably sum to 1, so a threshold tuned on one\nquestion shape does not transfer to another.\n\nEnabling it\n\nGet a key at console.typesafe.ai/keys.\n\nLaya, at a Laya server or a LiteLLM proxy route\n\nLaya has no built-in endpoint. The base URL and key can equally come from the\nconfig passed to the SDK, ,\nor per call; config set there counts when NeuroLink picks the default decision\nprovider, exactly as the environment does.\n\nWhen a TypeSafe key ( or ) is configured\nalongside Laya, TypeSafe is the default; Laya runs where a caller names it\n() or when neither TypeSafe key is set. Laya counts as\nconfigured only with both its key and its base URL. See the\nLaya provider guide.\n\nThe degradation contract. returns\n when no decision provider has its key set, and returns\n on any failure. There is no configuration in which a missing, invalid,\nslow or unreachable decision model changes NeuroLink's observable behaviour —\nit only ever falls back to what it did before.\n\nA credential the service does not accept disables that provider instance rather\nthan paying a round trip on every later call to be told so again.\n\nTwo transports\n\nThe same model is reachable two ways. Which one runs is decided once, in the\nconstructor:\n\n| | Direct | Vercel AI Gateway |\n| ------------------- | ------------------ | --------------------------------------------- |\n| Key | | |\n| Endpoint | | |\n| Model named in | request body | header |\n| Question vocabulary | | |\n| | on each answer | on , not on the answer |\n| Billed by | TypeSafe | Vercel |\n\nHolding both keys keeps the direct transport, so the confidence figures a\nhost already sees do not shift underneath it when a second key appears. Both\ntransports report the vendor's calibrated confidence — the gateway simply puts\nit somewhere else, under ,\nleaving the answer objects without one. Set (or\n) to override.\n\n⚠️ Read that field, not the distribution peak. It is tempting to take\n when an answer carries no , and on a\nnear-certain answer the two agree. On an uncertain one they do not, and not by a\nlittle: a measured four-way choice returned probabilities\n — a peak of 0.33 against a\nreported confidence of 0.10. That gap straddles the default\n of 0.3, so the deriv","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"","lvl3":""}},
|
|
3329
|
+
{"objectID":"f91e7ef7473aa411ff8c0d3b04381325781477c1876408ffd5469dbaf2d9584c","title":"The decide inference type","url":"/docs/features/decide-inference-type#the-decide-inference-type","content":"Deep-dive: generate, stream, decide: a third inference type for NeuroLink —\nwhy this shipped as a provider rather than a subsystem, the five call sites, and the four\ntransport bugs found by adding the Vercel AI Gateway (two of which produced plausible output).\n\nNeuroLink recognises three inference types. Two of them produce text:\n\n| Type | Call | Produces |\n| ------------ | ------------------------ | ------------------------------------------ |\n| | | text |\n| | | text, incrementally |\n| * | | typed, calibrated judgements — no text* |\n\nA decision model takes one plus a map of named, typed questions and\nreturns one typed answer per question, all evaluated in a single parallel pass.\nThere is no text anywhere in the response, so nothing has to be parsed back out\nof prose. TypeSafe's Jev was the first such model; Convai Innovations' open-weights\nLaya is the second.\n\nThis is not , which scores an\nalready-generated response with RAGAS scorers. Different feature, different\nword.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"The decide inference type","lvl3":""}},
|
|
3330
3330
|
{"objectID":"2c0f154b9ae29f0af1a097de9ccb435db1e8f5c35a4df8bb91526eadb7b5eb97","title":"The three primitives","url":"/docs/features/decide-inference-type#the-three-primitives","content":"| Type | Question | Answer fields |\n| --------- | ------------------------------ | ------------------------------------------------ |\n| | Is this statement true? | (0–1) — no confidence |\n| | Which option from this set? | , , |\n| | Rate against an ordered rubric | , , , |\n\nAll three mix freely in one call.\n\nVocabulary note. TypeSafe calls the yes/no primitive a and answers\nit in a field of the same name. The Vercel AI SDK and Pydantic AI both renamed\nthat to / when exposing it, and NeuroLink follows them —\nthe vendor's spelling is translated inside , so a second\ndecision provider slots in without changing any call site.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"The three primitives","lvl3":""}},
|
|
3331
3331
|
{"objectID":"ff28050e2ddf3c21c910bc84ca32105968e1f7ffdbc3b19a983bb9adc6e9cc36","title":"Confidence is not probability","url":"/docs/features/decide-inference-type#confidence-is-not-probability","content":"says what the model thinks. says _whether you\nshould act on it_. It is calibrated — derived from the distribution, not\nself-reported — which is what makes it usable as a gate.\n\nCalibration is a property of groups of answers, not a promise about any\none. Across many answers, those scored 0.8 are right about 80% of the time.\nIt does not mean a specific 0.8 answer is right.\n\nA carries no confidence of its own. Use \n— distance from a coin flip, so 0.5 → 0 and 0/1 → 1. Note also that a \nand an equivalent two-option are not guaranteed to agree, and\ncomplementary booleans do not reliably sum to 1, so a threshold tuned on one\nquestion shape does not transfer to another.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Confidence is not probability","lvl3":""}},
|
|
3332
|
-
{"objectID":"91bfa1275464235c40e00d8a9ac0805e9e181450cccb6235fabd43178bef7c02","title":"Enabling it","url":"/docs/features/decide-inference-type#enabling-it","content":"Get a key at console.typesafe.ai/keys
|
|
3332
|
+
{"objectID":"91bfa1275464235c40e00d8a9ac0805e9e181450cccb6235fabd43178bef7c02","title":"Enabling it","url":"/docs/features/decide-inference-type#enabling-it","content":"Get a key at console.typesafe.ai/keys.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Enabling it","lvl3":""}},
|
|
3333
|
+
{"objectID":"71509585343bb3860ff000ad67405f6ed19fbc26f8eb973ac1fe58088af460b4","title":"Laya, at a Laya server or a LiteLLM proxy route","url":"/docs/features/decide-inference-type#laya-at-a-laya-server-or-a-litellm-proxy-route","content":"Laya has no built-in endpoint. The base URL and key can equally come from the\nconfig passed to the SDK, ,\nor per call; config set there counts when NeuroLink picks the default decision\nprovider, exactly as the environment does.\n\nWhen a TypeSafe key ( or ) is configured\nalongside Laya, TypeSafe is the default; Laya runs where a caller names it\n() or when neither TypeSafe key is set. Laya counts as\nconfigured only with both its key and its base URL. See the\nLaya provider guide.\n\nThe degradation contract. returns\n when no decision provider has its key set, and returns\n on any failure. There is no configuration in which a missing, invalid,\nslow or unreachable decision model changes NeuroLink's observable behaviour —\nit only ever falls back to what it did before.\n\nA credential the service does not accept disables that provider instance rather\nthan paying a round trip on every later call to be told so again.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Laya, at a Laya server or a LiteLLM proxy route","lvl3":""}},
|
|
3333
3334
|
{"objectID":"7990ffc08aca0afbeae4310cfdcd3758daf52da4d9edd1da90a82b683f4d7d41","title":"Two transports","url":"/docs/features/decide-inference-type#two-transports","content":"The same model is reachable two ways. Which one runs is decided once, in the\nconstructor:\n\n| | Direct | Vercel AI Gateway |\n| ------------------- | ------------------ | --------------------------------------------- |\n| Key | | |\n| Endpoint | | |\n| Model named in | request body | header |\n| Question vocabulary | | |\n| | on each answer | on , not on the answer |\n| Billed by | TypeSafe | Vercel |\n\nHolding both keys keeps the direct transport, so the confidence figures a\nhost already sees do not shift underneath it when a second key appears. Both\ntransports report the vendor's calibrated confidence — the gateway simply puts\nit somewhere else, under ,\nleaving the answer objects without one. Set (or\n) to override.\n\n⚠️ Read that field, not the distribution peak. It is tempting to take\n when an answer carries no , and on a\nnear-certain answer the two agree. On an uncertain one they do not, and not by a\nlittle: a measured four-way choice returned probabilities\n — a peak of 0.33 against a\nreported confidence of 0.10. That gap straddles the default\n of 0.3, so the derived number clears a bar the real one\nfails and a near-random pick gets acted on as a confident one. The peak stays as\nthe fallback when neither source reports a confidence, and it is genuinely a\ndifferent quantity: an even distribution over N options lands near 1/N, not 0.\n\nUsage is spelled differently too — / on the\ndirect API, / on the gateway. Both are read. A\ndecision is priced on input alone, so a parser that knows only one spelling does\nnot error: it reports zero tokens and costs every call at exactly $0.\n\nGateway keys are created at Vercel → your team → AI Gateway → API Keys.\n\n⚠️ The gateway refuses to serve any request until ","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Two transports","lvl3":""}},
|
|
3334
3335
|
{"objectID":"e5df7db87d4cb31c67fcce769cf5a3573764cb358ed9ee4b41f7ce86cb3954b7","title":"Using it","url":"/docs/features/decide-inference-type#using-it","content":"/ / validate at\nruntime and return for a missing id or a mismatched type, so no\ncall site needs a type assertion.\n\nUse instead of when you want the failure to surface;\nit throws a whose carries a typed \n(, , , …).","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Using it","lvl3":""}},
|
|
3335
3336
|
{"objectID":"7232a490e9e72e01dbe1a12de9470a38ed66ef91aa076b8c8cc745770eb03545","title":"From the CLI","url":"/docs/features/decide-inference-type#from-the-cli","content":"The same primitive is available as , which calls\n (not ) and prints one line per answer:\n\nSee the CLI command reference for the full flag\nlist, including , and .","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"From the CLI","lvl3":""}},
|
|
@@ -3341,7 +3342,7 @@
|
|
|
3341
3342
|
{"objectID":"ac97e63916f0ffdf1d9befada357186f236753d40ea1f0e97bcab715e54fa7cd","title":"Relevance-driven compaction","url":"/docs/features/decide-inference-type#relevance-driven-compaction","content":"Before the existing positional compaction stages run, an optional Stage 0\nasks, per eligible message, whether the current request still needs it — at\n~400 ms for the whole batch regardless of message count. Only plain\nuser/assistant text is eligible, the most recent messages are never\ntouched, and a message is dropped only on a confident \"no.\"\n\n| | Positional stages (1–4) | Stage 0 (relevance) |\n| ----------------- | ---------------------------------- | ------------------------------------------------------------ |\n| Basis for keeping | position (recency) | relevance to the current request |\n| Drop granularity | whole messages / summarized ranges | whole messages |\n| Runs when | always, once over budget | decision provider configured, request known, and over budget |\n\nSee relevance-driven compaction for\nthe eligibility rules, the drop cap, and the separate summary-quality gate on\nStage 3.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Relevance-driven compaction","lvl3":""}},
|
|
3342
3343
|
{"objectID":"451d199b91f25696bed61dedb5ebc0465143dbf3bc350ca8a3943e622f9aedf8","title":"Tool / MCP routing","url":"/docs/features/decide-inference-type#tool-mcp-routing","content":"The shipped tool router asks a generative model for on\na 15-second budget — a shape that cannot express uncertainty. A decision\nmodel instead asks one calibrated yes/no question per server, and a server is\nexcluded only on a confident \"no\" ( default 0.6), because\ndropping a needed server breaks the turn while keeping an unneeded one only\ncosts a few tokens.\n\nA measured wording change moved unrelated servers from a mean probability of\n0.31 (dropping 12 of 39 unneeded servers) to a mean of 0.03 (dropping 37 of\n39, with zero wrong drops) — seen in\ntool / MCP routing by decision model,\nwhich also covers the exact question shape and its size guards.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Tool / MCP routing","lvl3":""}},
|
|
3343
3344
|
{"objectID":"b35e1ab2390a7b132037c293ecaf436f9ff9498591ccdd47b58ee0a6a95e7616","title":"RAG retrieval planning","url":"/docs/features/decide-inference-type#rag-retrieval-planning","content":"lets each RAG query get its own //\n/ plan instead of one fixed configuration for every query. An\nexplicit per-call field always wins over the plan, and a\ncapability the pipeline wasn't configured with can never be switched on by\nit.\n\nSee per-query RAG retrieval planning\nfor the breadth rubric and why its confidence bar is deliberately lower than\ntool routing's or compaction's.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"RAG retrieval planning","lvl3":""}},
|
|
3344
|
-
{"objectID":"6c0dd418b9f61219911960f90d1003a6c00c2e2cb81399ced3c885fd8209bc6e","title":"Limits and gotchas","url":"/docs/features/decide-inference-type#limits-and-gotchas","content":"
|
|
3345
|
+
{"objectID":"6c0dd418b9f61219911960f90d1003a6c00c2e2cb81399ced3c885fd8209bc6e","title":"Limits and gotchas","url":"/docs/features/decide-inference-type#limits-and-gotchas","content":"Laya reads far less than Jev. About 768 tokens of state on\n and , and 320 on , or an\nunrecognised model name, against Jev's ~33,000. Laya's server does not refuse a\nlonger state; it answers from the first 1,024 tokens (512 on ). So the\nprovider estimates the state's size — counting non-Latin characters at a rate\nmeasured per checkpoint — and refuses anything over the limit locally with\n, before any network call. The estimate errs toward\nrefusing.\n\nTwo separate size ceilings, both enforced:\n+ the single longest question ≤ ~33 000 tokens (measured\n exactly: 33 002 accepted, 33 003 rejected). Usually the binding one.\n+ all questions combined ≤ ~64 000 tokens.\n\nQuestions do not compete with state for the 33 K budget — a near-ceiling\nstate plus 400 extra questions is accepted.\n\nThree different error envelopes. TypeSafe returns as an object for\napplication errors and as an array for schema validation; the gateway uses\nneither and returns . The provider normalises all\nthree into one . The validation shape echoes your back,\nso it is never logged or surfaced.\n\nOn the gateway, decides the kind, not the HTTP status — a \ncarrying is a bad request, not a bad credential, and\nmust not disable the provider instance. Reading the status alone would trip the\nauth circuit breaker on a working key.\n\n403 vs 401 are inverted on the direct API, from the usual convention and\nfrom TypeSafe's own docs: a missing header returns 403, an\ninvalid key returns 401. The gateway does not share this quirk — it\nreturns 401 for both, and reserves 403 for account state.\n\n arrives with no field — the one error a\nlong-context caller is most likely to hit. The provider supplies the sentence.\n\nLatency: p50 ~400 ms warm, but the first call after idle measured\n2.0–2.7 s. The default timeout is 5 s for that reason, and every internal call\nsite is fail-open regardless.\n\nPrivacy: when enabled, the you send leaves the machine. For model\nrouting that is the prompt text. With no key set, nothing is transmit","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Limits and gotchas","lvl3":""}},
|
|
3345
3346
|
{"objectID":"f6543a204326fbf7f27ac5c61c2f10b76f0541f3acb61eec93291921404e1a37","title":"What it is bad at","url":"/docs/features/decide-inference-type#what-it-is-bad-at","content":"\"Cannot hallucinate\" is a claim about output shape, not answer\ncorrectness: a decision model cannot return malformed JSON or an option you\ndid not offer, but it can still be wrong. TypeSafe reports ~68% accuracy on its\nown 711-case benchmark, against ~73% for a frontier model. It wins cost and\nlatency on every row and loses accuracy on every row — so it is right for\ndecisions that are gated and reversible, and wrong for final answers.\nIt reads literally. It answers the question you wrote, not the one you\n meant. Split an ambiguous question into two and combine them in code.\nAsk about the act, not the subject. \"This task touches money\" scores high\n on ordinary code that merely concerns money. The risk question in\n is worded to exclude writing and testing such code, precisely\n because the naive phrasing escalated everything.\nIt is not a calculator. Counting, arithmetic and date comparison are\n unreliable — dates are read as text, not ordered quantities. A is for\n thresholding and ranking, not for reading an exact magnitude off.\nIrrelevant state costs accuracy. Filter before sending.\nIt never explains itself. No rationale field exists, which rules it out\n where a decision must be auditable.\nOption order can matter. Test with reordered if a call is close.\nDon't invert criteria. A whose description means \"no\"\n performs measurably worse.\n\nTune thresholds on your own labelled data if the decision matters, and once you\nhave, pin to a version id such as — \nis an alias and can move under you, invalidating a tuned threshold silently.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"What it is bad at","lvl3":""}},
|
|
3346
3347
|
{"objectID":"f51228c123e6f86e1889f9990b2592debd24cc90c1584ad7d35d1f9a7aac8b82","title":"Adding another decision provider","url":"/docs/features/decide-inference-type#adding-another-decision-provider","content":"The inference type is provider-neutral by construction. A second\ndecision model needs:\nAn member and a enum\n (, outside the generated regions).\nA provider class extending that overrides and\n implements / as throws — the same shape\n the embedding-only providers (, ) already use.\nA descriptor with , no auto-select ranks, and\n . That one field is what keeps a text-less model out\n of every generation fallback chain; nothing else needs to know the provider\n by name.\nA registration block, a credentials slice, a manifest, and the usual Tier-3\n onboarding artifacts — enumerates them.\n\nThe Tier-2 catalog JSON path cannot be used: its schema pins , accepts\nonly an 8-flag text-generation capability vocabulary, and requires\n and — none of which a model\nthat emits no text can honestly supply.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Adding another decision provider","lvl3":""}},
|
|
3347
3348
|
{"objectID":"31d00aee561a454dc5082ad8002f9dbc0e33f15463cfee1636497043c8f9ee55","title":"Testing","url":"/docs/features/decide-inference-type#testing","content":"The suite drives only. Live tests skip without\n; the degradation and discriminator tests run unconditionally,\nbecause \"behaves correctly with no key\" and \"a text-less provider is unreachable\nfrom generation\" are the contracts that matter most.","hierarchy":{"lvl0":"Features","lvl1":"The `decide` inference type","lvl2":"Testing","lvl3":""}},
|
|
@@ -4085,13 +4086,13 @@
|
|
|
4085
4086
|
{"objectID":"1d8625a67cba7bc640e454fe15f76d86e2be4fbe79e9496fc085e5a6df496086","title":"Future Enhancements","url":"/docs/features/pdf-support#future-enhancements","content":"Planned features for PDF support:\nOCR Integration: Extract text from scanned PDFs\nPage Selection: Analyze specific pages only\nPDF Generation: Create PDFs from AI responses\nForm Filling: Extract and populate PDF forms","hierarchy":{"lvl0":"Features","lvl1":"PDF File Support","lvl2":"Future Enhancements","lvl3":""}},
|
|
4086
4087
|
{"objectID":"20bb5119cb74199a04bebd17c621d8c6a0438c0833f12103b9f3914c5f026ceb","title":"Feedback and Support","url":"/docs/features/pdf-support#feedback-and-support","content":"Found a bug or have a feature request? Please:\nCheck existing issues on GitHub\nCreate a new issue with:\nProvider used\nPDF file details (size, pages)\nError message or unexpected behavior\nSample code (if possible)","hierarchy":{"lvl0":"Features","lvl1":"PDF File Support","lvl2":"Feedback and Support","lvl3":""}},
|
|
4087
4088
|
{"objectID":"7c47c75b9023d438078ad3ed696c167cb9b5beaa369fad844635f7f32cce74a5","title":"Version 9.2.0 (Current)","url":"/docs/features/pdf-support#version-920-current","content":"✅ Initial PDF support for Vertex AI, Anthropic, Bedrock, AI Studio\n✅ Auto-detection via flag\n✅ Multiple PDF processing\n✅ Size and page limit validation\n✅ Comprehensive error messages\n✅ CLI and SDK integration\n✅ Streaming support\n✅ Mixed multimodal inputs (PDF + CSV + images)\n\nNext: Multimodal Chat Guide | CSV Support","hierarchy":{"lvl0":"Features","lvl1":"PDF File Support","lvl2":"Version 9.2.0 (Current)","lvl3":""}},
|
|
4088
|
-
{"objectID":"2a46dad649fcc5c7b389d9db519211899183703302b4127f0a4a2285018e1362","title":"Per-Request Credentials","url":"/docs/features/per-request-credentials","content":"Per-Request Credentials\n\nStatus: Stable | Availability: SDK only\n\nOverview\n\nNeuroLink allows provider credentials to be supplied at two levels below the environment-variable default: on the constructor (instance level) and on individual / calls (per-call level). Credentials are resolved in the following order of precedence:\n\nThis enables multi-tenant architectures where different users or tenants supply their own provider API keys (bring-your-own-key, BYOK), without requiring separate NeuroLink instances per user or touching the process environment.\n\nTypical use cases:\nMulti-tenant SaaS — each API request carries the calling user's provider key; no shared key leakage between tenants\nBYOK products — end users paste their OpenAI / Anthropic keys in settings; you forward them to NeuroLink per call\nTesting and CI — inject credentials programmatically without setting environment variables\nProvider switching — override only the active provider's credentials while leaving others to fall through to env vars\n\nQuick Start\n\nInstance-Level vs Per-Call\n\nInstance-Level Credentials\n\nSet in the constructor. These apply as the default for every and call made on that instance. Useful when serving a single tenant or when you have a known key for the duration of the instance lifecycle.\n\nPer-Call Credentials\n\nSet directly on or . These override the instance-level credentials for that single call only. Only the providers you explicitly set are overridden — others continue falling through to instance credentials and then environment variables.\n\nPrecedence Rules\n\n| Level | Scope | Set on
|
|
4089
|
+
{"objectID":"2a46dad649fcc5c7b389d9db519211899183703302b4127f0a4a2285018e1362","title":"Per-Request Credentials","url":"/docs/features/per-request-credentials","content":"Per-Request Credentials\n\nStatus: Stable | Availability: SDK only\n\nOverview\n\nNeuroLink allows provider credentials to be supplied at two levels below the environment-variable default: on the constructor (instance level) and on individual / calls (per-call level). Credentials are resolved in the following order of precedence:\n\nThis enables multi-tenant architectures where different users or tenants supply their own provider API keys (bring-your-own-key, BYOK), without requiring separate NeuroLink instances per user or touching the process environment.\n\nTypical use cases:\nMulti-tenant SaaS — each API request carries the calling user's provider key; no shared key leakage between tenants\nBYOK products — end users paste their OpenAI / Anthropic keys in settings; you forward them to NeuroLink per call\nTesting and CI — inject credentials programmatically without setting environment variables\nProvider switching — override only the active provider's credentials while leaving others to fall through to env vars\n\nQuick Start\n\nInstance-Level vs Per-Call\n\nInstance-Level Credentials\n\nSet in the constructor. These apply as the default for every and call made on that instance. Useful when serving a single tenant or when you have a known key for the duration of the instance lifecycle.\n\nPer-Call Credentials\n\nSet directly on or . These override the instance-level credentials for that single call only. Only the providers you explicitly set are overridden — others continue falling through to instance credentials and then environment variables.\n\nPrecedence Rules\n\n| Level | Scope | Set on |\n| ----------- | --------------------- | ----------------------------------------------------------------------------------- |\n| Per-call | Single request only | , or |\n| Instance | All calls on instance | |\n| Environment | Process-wide fallback | , , … |\n\nUnset providers at any level fall through to the next. You never need to repeat a credential at the per-call level if the instance default is correct.\n\nProvider Credential Reference\n\nAll fields are optional — omit any field you want to fall through to a lower-precedence level.\n\n| Provider | Key | Fields |\n| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------- |\n| OpenAI | | , |\n| Anthropic | | , |\n| Google AI Studio | | , |\n| Google Vertex AI | | , , (Express Mode), , , |\n| Amazon Bedrock | | , , , |\n| Amazon SageMaker | | , , , , |\n| Azure OpenAI | | , , , |\n| Mistral | | |\n| Hugging Face | | , |\n| OpenRouter | | , |\n| LiteLLM | | , |\n| OpenAI-Compatible | | , |\n| Cerebras | | , |\n| SambaNova | | , |\n| Ollama | | |\n| TypeSafe (Jev) | | , , , , |\n| Laya | | , (required: Laya has no built-in endpoint) |\n\nThe full type definition is in .\n\nSDK Examples\n\nOpenAI\n\nCustom base URL for OpenAI-compatible proxies:\n\nAnthropic\n\nOAuth token (Anthropic Claude subscription):\n\nVertex AI — Express Mode\n\nExpress Mode uses a simple API key instead of service-account credentials, making it suitable for per-request BYOK flows:\n\nFull service-account credentials (server-side only — keep private keys out of client code):\n\nAmazon Bedrock\n\nAzure OpenAI\n\nStreaming with Credentials\n\n works identically on . Note that \nreturns a wrapper — iterate over its property:\n\nMulti-Tenant Request Handler\n\nA t","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"","lvl3":""}},
|
|
4089
4090
|
{"objectID":"12291afcfaaf4af65b01b07e93a9eac08280ff7c61394f6051a86c1b152a7b4a","title":"Per-Request Credentials","url":"/docs/features/per-request-credentials#per-request-credentials","content":"Status: Stable | Availability: SDK only","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Per-Request Credentials","lvl3":""}},
|
|
4090
4091
|
{"objectID":"6c6756b0806344240b3c86d6b0063587db50f2c4ccf936a32e87d4377b77014c","title":"Overview","url":"/docs/features/per-request-credentials#overview","content":"NeuroLink allows provider credentials to be supplied at two levels below the environment-variable default: on the constructor (instance level) and on individual / calls (per-call level). Credentials are resolved in the following order of precedence:\n\nThis enables multi-tenant architectures where different users or tenants supply their own provider API keys (bring-your-own-key, BYOK), without requiring separate NeuroLink instances per user or touching the process environment.\n\nTypical use cases:\nMulti-tenant SaaS — each API request carries the calling user's provider key; no shared key leakage between tenants\nBYOK products — end users paste their OpenAI / Anthropic keys in settings; you forward them to NeuroLink per call\nTesting and CI — inject credentials programmatically without setting environment variables\nProvider switching — override only the active provider's credentials while leaving others to fall through to env vars","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Overview","lvl3":""}},
|
|
4091
4092
|
{"objectID":"d4e86918319aa78b4e4461dbf29a60ebe90935e74fc70617f59bf524ba3e1eae","title":"Instance-Level Credentials","url":"/docs/features/per-request-credentials#instance-level-credentials","content":"Set in the constructor. These apply as the default for every and call made on that instance. Useful when serving a single tenant or when you have a known key for the duration of the instance lifecycle.","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Instance-Level Credentials","lvl3":""}},
|
|
4092
4093
|
{"objectID":"250b1dd11e018f5f252b27ce408e3dade21eff1cf26eed4aaf81126fad6ab691","title":"Per-Call Credentials","url":"/docs/features/per-request-credentials#per-call-credentials","content":"Set directly on or . These override the instance-level credentials for that single call only. Only the providers you explicitly set are overridden — others continue falling through to instance credentials and then environment variables.","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Per-Call Credentials","lvl3":""}},
|
|
4093
|
-
{"objectID":"4166cbaf6e6263ac98e24d7ede9950b44aade18e787b57e71138d2fc2deaaa07","title":"Precedence Rules","url":"/docs/features/per-request-credentials#precedence-rules","content":"| Level | Scope | Set on
|
|
4094
|
-
{"objectID":"b739fcf7819dd6f055ebe3bcdb161ff839067dc172235f9d0072f9cf79d7bcd3","title":"Provider Credential Reference","url":"/docs/features/per-request-credentials#provider-credential-reference","content":"All fields are optional — omit any field you want to fall through to a lower-precedence level.\n\n| Provider | Key | Fields |\n| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------- |\n| OpenAI | | , |\n| Anthropic | | , |\n| Google AI Studio | | , |\n| Google Vertex AI | | , , (Express Mode), , , |\n| Amazon Bedrock | | , , , |\n| Amazon SageMaker | | , , , , |\n| Azure OpenAI | | , , , |\n| Mistral | | |\n| Hugging Face | | , |\n| OpenRouter | | , |\n| LiteLLM | | , |\n| OpenAI-Compatible | | , |\n| Cerebras | | , |\n| SambaNova | | , |\n| Ollama | | |\n
|
|
4094
|
+
{"objectID":"4166cbaf6e6263ac98e24d7ede9950b44aade18e787b57e71138d2fc2deaaa07","title":"Precedence Rules","url":"/docs/features/per-request-credentials#precedence-rules","content":"| Level | Scope | Set on |\n| ----------- | --------------------- | ----------------------------------------------------------------------------------- |\n| Per-call | Single request only | , or |\n| Instance | All calls on instance | |\n| Environment | Process-wide fallback | , , … |\n\nUnset providers at any level fall through to the next. You never need to repeat a credential at the per-call level if the instance default is correct.","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Precedence Rules","lvl3":""}},
|
|
4095
|
+
{"objectID":"b739fcf7819dd6f055ebe3bcdb161ff839067dc172235f9d0072f9cf79d7bcd3","title":"Provider Credential Reference","url":"/docs/features/per-request-credentials#provider-credential-reference","content":"All fields are optional — omit any field you want to fall through to a lower-precedence level.\n\n| Provider | Key | Fields |\n| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------- |\n| OpenAI | | , |\n| Anthropic | | , |\n| Google AI Studio | | , |\n| Google Vertex AI | | , , (Express Mode), , , |\n| Amazon Bedrock | | , , , |\n| Amazon SageMaker | | , , , , |\n| Azure OpenAI | | , , , |\n| Mistral | | |\n| Hugging Face | | , |\n| OpenRouter | | , |\n| LiteLLM | | , |\n| OpenAI-Compatible | | , |\n| Cerebras | | , |\n| SambaNova | | , |\n| Ollama | | |\n| TypeSafe (Jev) | ","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Provider Credential Reference","lvl3":""}},
|
|
4095
4096
|
{"objectID":"575e2e50c5fd00e53fce66deee556264f3df8962e2188ac446e6e7d4ad29b2ed","title":"OpenAI","url":"/docs/features/per-request-credentials#openai","content":"Custom base URL for OpenAI-compatible proxies:","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"OpenAI","lvl3":""}},
|
|
4096
4097
|
{"objectID":"499e7c1d012d337ad54e06db35770d5b3471afb0f9e3f471564642e8ba7e5c6b","title":"Anthropic","url":"/docs/features/per-request-credentials#anthropic","content":"OAuth token (Anthropic Claude subscription):","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Anthropic","lvl3":""}},
|
|
4097
4098
|
{"objectID":"3f5ea871d2750f36fca227c33f109de53f5d0bc4c184ea956d0b8c3736babe29","title":"Vertex AI — Express Mode","url":"/docs/features/per-request-credentials#vertex-ai-express-mode","content":"Express Mode uses a simple API key instead of service-account credentials, making it suitable for per-request BYOK flows:\n\nFull service-account credentials (server-side only — keep private keys out of client code):","hierarchy":{"lvl0":"Features","lvl1":"Per-Request Credentials","lvl2":"Vertex AI — Express Mode","lvl3":""}},
|
|
@@ -5851,6 +5852,7 @@
|
|
|
5851
5852
|
{"objectID":"fc415454bfde58f3634df544ef2adb88836c75fb1344b7042af7a9d6fdfa63d4","title":"[LiteLLM](/docs/getting-started/providers/litellm)","url":"/docs/getting-started/providers#litellmdocsgetting-startedproviderslitellm","content":"100+ providers through proxy\n🔄 Unified API for 100+ providers\n📊 Load balancing and fallbacks\n💰 Cost tracking\n🎯 Model routing\n\nSetup Guide →","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"[LiteLLM](/docs/getting-started/providers/litellm)","lvl3":""}},
|
|
5852
5853
|
{"objectID":"faae7281e5a366b4892035d92012602a9e7aaa15cc9d96556b20493e25562498","title":"🧠 Decision-Only Providers {#decision-only-providers}","url":"/docs/getting-started/providers#-decision-only-providers-decision-only-providers","content":"The one provider that serves rather than /. It\nreturns typed, calibrated judgments and emits no text, so it never appears in\ngeneration fallback chains or the health sweep.","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"🧠 Decision-Only Providers {#decision-only-providers}","lvl3":""}},
|
|
5853
5854
|
{"objectID":"50860d1f7a27dbe3ad7452ad7079ea437658db372b97081d0a509429369cacc6","title":"[TypeSafe (Jev)](/docs/getting-started/providers/typesafe)","url":"/docs/getting-started/providers#typesafe-jevdocsgetting-startedproviderstypesafe","content":"Typed, calibrated judgments instead of text\n🎯 / / answers, each with a calibrated confidence\n⚡ Latency flat in question count — 1 question ~393 ms, 400 questions ~465 ms\n💰 ~$0.00002 per decision (~$0.042/M input, output billed at zero)\n🔌 Two transports: TypeSafe direct, or the Vercel AI Gateway\n🛡️ Fails open — with no key configured, every consumer behaves exactly as before\n🔑 API key from console.typesafe.ai/keys\n🔄 Aliases: , \n\nSetup Guide →","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"[TypeSafe (Jev)](/docs/getting-started/providers/typesafe)","lvl3":""}},
|
|
5855
|
+
{"objectID":"43b838d60f2794ce46361196d6fc8a708b3a301398dd55f2c8015d567aa21c2c","title":"[Laya](/docs/getting-started/providers/laya)","url":"/docs/getting-started/providers#layadocsgetting-startedproviderslaya","content":"Open-weights decision provider — the same typed // answers as Jev, from Convai Innovations' Apache-2.0 checkpoints, at a Laya server or LiteLLM proxy route you configure\n🧭 Serves only; built-in features use it when its key and base URL are set and neither nor is\n📏 Refuses more than ~768 tokens of state (320 on ) before any network call, since its encoders read only 1,024 (512)\n🔌 No built-in endpoint: (or ) names a Laya server or a LiteLLM pass-through route to one\n🔑 is the key that endpoint accepts; on LiteLLM, the route must be in the key's Allowed Routes\n\nSetup Guide →","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"[Laya](/docs/getting-started/providers/laya)","lvl3":""}},
|
|
5854
5856
|
{"objectID":"c98403894a115164f29a019817b7f39c93b59623a9854b4575ad06bc5f597320","title":"🧩 Additional Catalog Providers","url":"/docs/getting-started/providers#-additional-catalog-providers","content":"Every provider below is a Tier-2 catalog entry — OpenAI-wire-compatible\nwith no behavioural quirks, so the whole integration is one JSON file under\n. Each page is generated from that file, which is\nalso what the CI onboarding gate reads.","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"🧩 Additional Catalog Providers","lvl3":""}},
|
|
5855
5857
|
{"objectID":"026138da0a559269ecd9f0b2ceb72d9039096e72e064142afb7bfb74a5cb7455","title":"[API Route](/docs/getting-started/providers/api-route)","url":"/docs/getting-started/providers#api-routedocsgetting-startedprovidersapi-route","content":"Claude Sonnet 4.6\n🤖 8 models; default (1M context)\n🛠️ Native tool calling + structured output together\n💳 Free tier available\n✅ Roster verified 2026-09-17 (authenticated GET /v1/models)\n🔑 API key from api-route.com\n🔄 Aliases: \n\nSetup Guide →","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"[API Route](/docs/getting-started/providers/api-route)","lvl3":""}},
|
|
5856
5858
|
{"objectID":"85aa65949d959db077347ecf93a4c40ade9ebab4300d4d52c62c702f6929053b","title":"[Baseten](/docs/getting-started/providers/baseten)","url":"/docs/getting-started/providers#basetendocsgetting-startedprovidersbaseten","content":"GLM 5.3 Flash\n🤖 16 models; default (1M context)\n🛠️ Native tool calling + structured output together\n💳 Free tier available\n✅ Roster verified 2026-09-03 (authenticated GET /v1/models)\n🔑 API key from app.baseten.co\n\nSetup Guide →","hierarchy":{"lvl0":"Getting Started","lvl1":"AI Provider Guides","lvl2":"[Baseten](/docs/getting-started/providers/baseten)","lvl3":""}},
|
|
@@ -5913,6 +5915,18 @@
|
|
|
5913
5915
|
{"objectID":"854699a04e9d3ed9dc4cffe1b27061afb86f27586a6f04c772e0422f7853fabb","title":"1. Get API Credentials","url":"/docs/getting-started/providers/kling#1-get-api-credentials","content":"Sign up at https://kling.ai/ and grab the Access Key\nID + Secret from the developer dashboard.","hierarchy":{"lvl0":"Getting Started","lvl1":"Kling AI Provider Guide (video)","lvl2":"1. Get API Credentials","lvl3":""}},
|
|
5914
5916
|
{"objectID":"98689360e9090383d9345a8304010c5df2f704be9a96f5c072ad789a9d9e925c","title":"Configuration Reference","url":"/docs/getting-started/providers/kling#configuration-reference","content":"| Environment Variable | Required | Description |\n| -------------------- | -------- | ---------------- |\n| | Yes | Kling access key |\n| | Yes | Kling secret key |","hierarchy":{"lvl0":"Getting Started","lvl1":"Kling AI Provider Guide (video)","lvl2":"Configuration Reference","lvl3":""}},
|
|
5915
5917
|
{"objectID":"5c9cd37e0ed9672f02587ee6f99a2ba417aff558c2d46733b78974566b4a7a5a","title":"See Also","url":"/docs/getting-started/providers/kling#see-also","content":"Runway Provider\nVertex Veo Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Kling AI Provider Guide (video)","lvl2":"See Also","lvl3":""}},
|
|
5918
|
+
{"objectID":"6d919d5032d8bf60b8341d6b8ff90eeb0c7d2f87553ca6e6e96d08b988c7e6e9","title":"Laya Provider Guide","url":"/docs/getting-started/providers/laya","content":"Laya Provider Guide\n\nThe second provider of — the same typed / /\n answers as TypeSafe's Jev, from an open-weights model\nyou can run yourself. It emits no text at all.\n\nOverview\n\nLaya is Convai Innovations' Apache-2.0 \"System One\" decision model. You send\none plus named, typed questions; an encoder answers every question in a\nsingle forward pass and returns a probability distribution for each. NeuroLink\ncalls whatever base URL you configure — a Laya server, or a LiteLLM proxy with a\npass-through route to one. There is no built-in endpoint.\n\nKey Facts\n\n| | |\n| --------------------- | ------------------------------------------------------------------------------------------------- |\n| Inference type | only |\n| Checkpoints | (default, fine-tuned for typed decisions), , , or |\n| Input window | 1,024 tokens (, ); 512 () |\n| Questions per request | up to 64 |\n| Endpoint | ; the base URL is required, with no default |\n| Precedence | used automatically when its key and base URL are set and no TypeSafe key is |\n\nQuick Start\nGet an endpoint and a key\n\nRun a Laya server (see below), or use a LiteLLM\nproxy with a pass-through route to one. On LiteLLM, create a virtual key and add\nthe route's path (and , if you want to probe it) to the\nkey's Allowed Routes; a key without them is refused with a 403\n.\nConfigure\n\nBoth the base URL and the key are required. Set them in the environment:\n\nor in the config passed to the SDK, exactly as for any other provider. Values\npassed per call override the constructor's, which override the environment:\nUse it\n\nFrom the CLI\n\nWhen NeuroLink uses it\n\nEvery built-in consumer of — model routing, relevance-driven\ncompaction, tool routing and RAG planning — asks for the default decision\nprovider. That is the first one that is configured — in the environment or in\nthe passed to the SDK — and TypeSafe comes first. TypeSafe has two\nkeys, and (its Vercel AI Gateway\nroute), and either one counts. Laya counts only with both its key and its base\nURL. So:\nA TypeSafe key, plus Laya's key and base URL: built-in features use\n TypeSafe; Laya runs only where a caller asks for .\nOnly Laya's key and base URL: built-in features use Laya.\nA Laya key with no base URL: Laya is not configured. Built-in features\n ignore it, and fails with .\nNone of them: everything behaves exactly as it did without a decision\n model.\n\nLimits\n\nThe window is small. Laya's encoders read 1,024 tokens, and 512 on the\n checkpoint, against roughly 33,000 for Jev. Part of that is reserved\nfor each question and its options, so NeuroLink allows about 768 tokens of\nstate on and , and 320 on , and\nany model name it does not recognise. Laya's server does not refuse a longer\nstate — it answers from the start of it and says nothing — so NeuroLink\nrefuses it instead, before any network call, with .\n\nThe size is an estimate, not Laya's tokenizer: about four characters per token\nfor ASCII text, and 1.5 tokens per character for other scripts (0.6 on\n), calibrated against a live Laya 0.3.5 server. It errs toward refusing. Built-in\nconsumers treat a refusal as \"carry on as before\", which means long-prompt\nmodel routing usually falls back to the heuristic when Laya is the only\ndecision provider.\n\nMany options degrade it. A 's options share a fixed token budget,\nso accuracy drops past about 20 options; some Laya servers also reject a\nquestion whose options overflow the budget, as .\n\nPick the checkpoint deliberately. Laya's own benchmark puts its general\n and checkpoints close to chance on typed decisions\nwithout fine-tuning; is the fine-tuned one, which is why it is\nthe default.\n\nErrors\n\n| Reply | Kind | Retried |\n| ----------------------------------------------- | ------------------------------------------------------- | ------- |\n| 401 / 403 from the proxy | — the provider instance stops retrying | no |\n| 400 / 422 from Laya | , with Laya's reason | no |\n| 413 from Laya | | no |\n| 429 | | yes |\n| 503 | | yes |\n| other 5xx | | yes |\n| more questions or state than Laya reads (local) | , with no network ","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"","lvl3":""}},
|
|
5919
|
+
{"objectID":"c57a78b27b2b64f684ee60c36022d5b19a81323647a32687608b35530b4d3ed7","title":"Laya Provider Guide","url":"/docs/getting-started/providers/laya#laya-provider-guide","content":"The second provider of — the same typed / /\n answers as TypeSafe's Jev, from an open-weights model\nyou can run yourself. It emits no text at all.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Laya Provider Guide","lvl3":""}},
|
|
5920
|
+
{"objectID":"969ae83c9e8333da8d49838b0595db3588d8828b67611944cd46f08435f19d97","title":"Overview","url":"/docs/getting-started/providers/laya#overview","content":"Laya is Convai Innovations' Apache-2.0 \"System One\" decision model. You send\none plus named, typed questions; an encoder answers every question in a\nsingle forward pass and returns a probability distribution for each. NeuroLink\ncalls whatever base URL you configure — a Laya server, or a LiteLLM proxy with a\npass-through route to one. There is no built-in endpoint.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Overview","lvl3":""}},
|
|
5921
|
+
{"objectID":"acf4d054e73fb41ef18db1c578cf1beb1117c3f43b24c6743ba30a4fe6569fb7","title":"Key Facts","url":"/docs/getting-started/providers/laya#key-facts","content":"| | |\n| --------------------- | ------------------------------------------------------------------------------------------------- |\n| Inference type | only |\n| Checkpoints | (default, fine-tuned for typed decisions), , , or |\n| Input window | 1,024 tokens (, ); 512 () |\n| Questions per request | up to 64 |\n| Endpoint | ; the base URL is required, with no default |\n| Precedence | used automatically when its key and base URL are set and no TypeSafe key is |","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Key Facts","lvl3":""}},
|
|
5922
|
+
{"objectID":"ae5970b1821e7485e9d952384e4d6749a99d486ea648241bcbd8a9d43579e79a","title":"1. Get an endpoint and a key","url":"/docs/getting-started/providers/laya#1-get-an-endpoint-and-a-key","content":"Run a Laya server (see below), or use a LiteLLM\nproxy with a pass-through route to one. On LiteLLM, create a virtual key and add\nthe route's path (and , if you want to probe it) to the\nkey's Allowed Routes; a key without them is refused with a 403\n.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"1. Get an endpoint and a key","lvl3":""}},
|
|
5923
|
+
{"objectID":"662bbcdcfe03b7cb5abd93bb0088ff4bdcd8558ad74a79d70f1f7ab36023842c","title":"2. Configure","url":"/docs/getting-started/providers/laya#2-configure","content":"Both the base URL and the key are required. Set them in the environment:\n\nor in the config passed to the SDK, exactly as for any other provider. Values\npassed per call override the constructor's, which override the environment:","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"2. Configure","lvl3":""}},
|
|
5924
|
+
{"objectID":"c99b86a6719e50f022a261b2688e6c849e03afaed0e6e398e9353d84cbf76835","title":"When NeuroLink uses it","url":"/docs/getting-started/providers/laya#when-neurolink-uses-it","content":"Every built-in consumer of — model routing, relevance-driven\ncompaction, tool routing and RAG planning — asks for the default decision\nprovider. That is the first one that is configured — in the environment or in\nthe passed to the SDK — and TypeSafe comes first. TypeSafe has two\nkeys, and (its Vercel AI Gateway\nroute), and either one counts. Laya counts only with both its key and its base\nURL. So:\nA TypeSafe key, plus Laya's key and base URL: built-in features use\n TypeSafe; Laya runs only where a caller asks for .\nOnly Laya's key and base URL: built-in features use Laya.\nA Laya key with no base URL: Laya is not configured. Built-in features\n ignore it, and fails with .\nNone of them: everything behaves exactly as it did without a decision\n model.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"When NeuroLink uses it","lvl3":""}},
|
|
5925
|
+
{"objectID":"adbc69b418b48f0bcaa2ae6e9f87f6bf8efc0dea1fe0d614cc12973156148d9f","title":"Limits","url":"/docs/getting-started/providers/laya#limits","content":"The window is small. Laya's encoders read 1,024 tokens, and 512 on the\n checkpoint, against roughly 33,000 for Jev. Part of that is reserved\nfor each question and its options, so NeuroLink allows about 768 tokens of\nstate on and , and 320 on , and\nany model name it does not recognise. Laya's server does not refuse a longer\nstate — it answers from the start of it and says nothing — so NeuroLink\nrefuses it instead, before any network call, with .\n\nThe size is an estimate, not Laya's tokenizer: about four characters per token\nfor ASCII text, and 1.5 tokens per character for other scripts (0.6 on\n), calibrated against a live Laya 0.3.5 server. It errs toward refusing. Built-in\nconsumers treat a refusal as \"carry on as before\", which means long-prompt\nmodel routing usually falls back to the heuristic when Laya is the only\ndecision provider.\n\nMany options degrade it. A 's options share a fixed token budget,\nso accuracy drops past about 20 options; some Laya servers also reject a\nquestion whose options overflow the budget, as .\n\nPick the checkpoint deliberately. Laya's own benchmark puts its general\n and checkpoints close to chance on typed decisions\nwithout fine-tuning; is the fine-tuned one, which is why it is\nthe default.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Limits","lvl3":""}},
|
|
5926
|
+
{"objectID":"141537feff8c79df3ecbca258b80136e36da0fdeff342aa93a971be020313215","title":"Errors","url":"/docs/getting-started/providers/laya#errors","content":"| Reply | Kind | Retried |\n| ----------------------------------------------- | ------------------------------------------------------- | ------- |\n| 401 / 403 from the proxy | — the provider instance stops retrying | no |\n| 400 / 422 from Laya | , with Laya's reason | no |\n| 413 from Laya | | no |\n| 429 | | yes |\n| 503 | | yes |\n| other 5xx | | yes |\n| more questions or state than Laya reads (local) | , with no network call | no |\n| no base URL configured (local) | , with no network call | no |\n\nLiteLLM's 401 text echoes a masked copy of the rejected key and its hash; the\nprovider drops that part before the message reaches a log or an error.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Errors","lvl3":""}},
|
|
5927
|
+
{"objectID":"de358abc64cad163c1666dce7b06fc5f7b3637b9568e420ceb9269a526929d54","title":"Running your own Laya server","url":"/docs/getting-started/providers/laya#running-your-own-laya-server","content":"Laya's example server exposes the same route. Point\n at it:","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Running your own Laya server","lvl3":""}},
|
|
5928
|
+
{"objectID":"e0dd67e8f79c7801d3e199dcd765a559f64a9d65d43cf1611026725a8ae1ee82","title":"Troubleshooting","url":"/docs/getting-started/providers/laya#troubleshooting","content":"— set , or pass\n . There is no default endpoint.\n— the proxy rejected the key. Check it in the\n LiteLLM Dashboard, including its Allowed Routes. The provider instance does\n not retry after a rejection.\nA 403 with — Cloudflare in front of your proxy blocked\n the client by its signature. Node's is accepted; a proxy or agent that\n rewrites the user agent may not be.\n— the state is larger than Laya\n reads. Shorten it, or configure TypeSafe for long inputs.\nBuilt-in routing never uses Laya — a TypeSafe key is also set and takes\n precedence, or Laya has no base URL.","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
|
|
5929
|
+
{"objectID":"fb160b657869a262fd7735599ce2c2ffd49423f4a0f7c43f4ef5ee74aa4dcde5","title":"See also","url":"/docs/getting-started/providers/laya#see-also","content":"The inference type\nTypeSafe (Jev) Provider Guide\nLaya on GitHub","hierarchy":{"lvl0":"Getting Started","lvl1":"Laya Provider Guide","lvl2":"See also","lvl3":""}},
|
|
5916
5930
|
{"objectID":"e3ac6498f27344d89bbe65467d6382ad117a8cdd85b1daa4ec6dafe521cc8d44","title":"LiteLLM Provider Guide","url":"/docs/getting-started/providers/litellm","content":"LiteLLM Provider Guide\n\nAccess hundreds of AI models across 100+ providers through the NeuroLink LiteLLM provider via a LiteLLM proxy server\n\nOverview\n\nNeuroLink's provider connects to a LiteLLM proxy server to access hundreds of models across 100+ AI providers (OpenAI, Anthropic, Google, AWS Bedrock, Cohere, Groq, Together AI, and more) through a single OpenAI-compatible API. The proxy adds enterprise features like load balancing, fallbacks, budgets, and rate limiting on top of any AI provider.\n\nHow It Works\nYou run (or connect to) a LiteLLM proxy server that manages your provider API keys and model routing.\nNeuroLink's provider communicates with this proxy using the OpenAI-compatible protocol.\nModels are referenced using LiteLLM's format (e.g., , ).\n\nKey Benefits\n100+ Providers: Access hundreds of models across every major AI provider through one interface\nUnified Model Format: Use naming across all backends\nLoad Balancing: Distribute requests across multiple providers/models\nCost Tracking: Built-in budget management and spend tracking\nFallbacks: Automatic failover when providers are down\nProxy Mode: Run as standalone proxy server for team-wide use\n\nQuick Start\nSet Up a LiteLLM Proxy Server\n\nBefore using the NeuroLink provider, you need a running LiteLLM proxy. See the Setting Up LiteLLM Proxy section below for full details, or get started quickly:\nConfigure Environment Variables\n\nAdd to your file:\nTest the Setup\n\nEnvironment Variables\n\n| Variable | Required | Default | Description |\n| ------------------ | -------- | ----------------------- | ----------------------------------------- |\n| | No | | URL of your LiteLLM proxy server |\n| | No | | API key for authenticating with the proxy |\n| | No | | Default model in format |\n\nDefault Model\n\nThe default model is (from ). Override it by setting in your environment or passing on the CLI.\n\nModel Name Format\n\nLiteLLM uses a format for model names. Examples:\n\nSee the full list at LiteLLM Supported Providers.\n\nSDK Usage\n\nBasic Usage\n\nWith a Specific Model\n\nStreaming\n\nMulti-Model Workflow\n\nCLI Usage\n\nAvailable Models\n\nThe enum provides commonly used model identifiers:\n\n| Enum Value | Model ID |\n| ------------------------------ | -------------------------------------- |\n| | |\n| | |\n| | |\n| | |\n| | |\n| | |\n| | |\n| | |\n| | |\n\nYou can also pass any model string your LiteLLM proxy is configured to serve. Use the proxy's endpoint to discover available models dynamically.\n\nError Handling\n\nThe LiteLLM provider returns specific error types for common failure scenarios:\n\n| Error | Cause | Resolution |\n| ----------------------------- | ----------------------------------- | -------------------------------------------------------- |\n| (ECONNREFUSED) | LiteLLM proxy server is not running | Start the proxy at the configured |\n| | Invalid | Check your API key matches the proxy's master key |\n| | Upstream rate limit exceeded | Wait and retry, or configure load balancing in the proxy |\n| | Model not configured in proxy | Add the model to your LiteLLM proxy configuration |\n\nSetting Up LiteLLM Proxy\n\nThe NeuroLink provider requires a running LiteLLM proxy server. This section covers how to set one up.\n\nInstall LiteLLM\n\nQuick Start (Single Model)\n\nConfiguration File (Multiple Models)\n\nCreate :\n\nStart the proxy:\n\nLoad Balancing\n\nDistribute requests across multiple providers or API keys:\n\nAutomatic Failover\n\nConfigure fallback providers for reliability:\n\nBudget Management\n\nSet spending limits per virtual key:\n\nDocker Deployment\n\nTroubleshooting\n\nCommon Issues\n\"LiteLLM proxy server not available\"\n\nProblem: The proxy server is not running or is unreachable.\n\nSolution:\n\"Invalid LiteLLM configuration\"\n\nProblem: The API key does not match the proxy's master key.\n\nSolution:\n\"Model not available in LiteLLM proxy\"\n\nProblem: The requested model is not configured in the proxy's .\n\nSolution:\n\nThen restart the proxy.\n\"Rate limit exceeded\"\n\nProblem: Upstream provider rate limit hit.\n\nSolution: Configure load balancing across multiple API keys or providers in your LiteLLM proxy config.\n\nRelated Documentation\nOpenAI Compatible Guide - OpenAI-compatible providers\nProvider Setup Guide - General provider configuration\nCost Optimization - Reduce AI costs\n\nAdditional Resources\nLiteLLM Documentation - Official docs\nSupported Providers - 100+ providers list\nLiteLLM GitHub - Source code\nLiteLLM Proxy Docs - Proxy setup\n\nNeed Help? Join our GitHub Discussions or op","hierarchy":{"lvl0":"Getting Started","lvl1":"LiteLLM Provider Guide","lvl2":"","lvl3":""}},
|
|
5917
5931
|
{"objectID":"d7435a5ad9fdbf5d14349609fed469d76227dc6098228c3ec8e0c82c3d62944a","title":"LiteLLM Provider Guide","url":"/docs/getting-started/providers/litellm#litellm-provider-guide","content":"Access hundreds of AI models across 100+ providers through the NeuroLink LiteLLM provider via a LiteLLM proxy server","hierarchy":{"lvl0":"Getting Started","lvl1":"LiteLLM Provider Guide","lvl2":"LiteLLM Provider Guide","lvl3":""}},
|
|
5918
5932
|
{"objectID":"27c251c8bbd323623221b411910908f9845d9bca578eaf8a167eff42d385cc67","title":"Overview","url":"/docs/getting-started/providers/litellm#overview","content":"NeuroLink's provider connects to a LiteLLM proxy server to access hundreds of models across 100+ AI providers (OpenAI, Anthropic, Google, AWS Bedrock, Cohere, Groq, Together AI, and more) through a single OpenAI-compatible API. The proxy adds enterprise features like load balancing, fallbacks, budgets, and rate limiting on top of any AI provider.","hierarchy":{"lvl0":"Getting Started","lvl1":"LiteLLM Provider Guide","lvl2":"Overview","lvl3":""}},
|
|
@@ -6525,7 +6539,7 @@
|
|
|
6525
6539
|
{"objectID":"14c8755cfa45311a2b8645d3729d760f513b4e768f4cbe6d75e1dcaaa68c7e94","title":"Configuration Reference","url":"/docs/getting-started/providers/together-ai#configuration-reference","content":"| Environment Variable | Required | Default |\n| -------------------- | -------- | ----------------------------------------- |\n| | Yes | — |\n| | No | |\n| | No | |","hierarchy":{"lvl0":"Getting Started","lvl1":"Together AI Provider Guide","lvl2":"Configuration Reference","lvl3":""}},
|
|
6526
6540
|
{"objectID":"73dacb114377509534778a0d5d1d386e64fe4e71f75f590903d6a5c3dda075c6","title":"Feature Support Matrix","url":"/docs/getting-started/providers/together-ai#feature-support-matrix","content":"| Feature | Support |\n| ----------------- | ----------------- |\n| Text generation | Yes |\n| Streaming | Yes |\n| Tool calling | Yes (model-dep.) |\n| Structured output | Yes (model-dep.) |\n| Vision | Yes (Llama 3.2 V) |\n| Embeddings | Limited |","hierarchy":{"lvl0":"Getting Started","lvl1":"Together AI Provider Guide","lvl2":"Feature Support Matrix","lvl3":""}},
|
|
6527
6541
|
{"objectID":"5a31d744d2d35af19cc87e27118e0d4057ab98d14fa7be6e9acb01dcbfc29f6a","title":"See Also","url":"/docs/getting-started/providers/together-ai#see-also","content":"Fireworks Provider\nGroq Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Together AI Provider Guide","lvl2":"See Also","lvl3":""}},
|
|
6528
|
-
{"objectID":"63e8301588e0fd846272e6b041d27fbe6a754543f38d949f07ce7e6f181a0ced","title":"TypeSafe (Jev) Provider Guide","url":"/docs/getting-started/providers/typesafe","content":"TypeSafe (Jev) Provider Guide\n\nThe only provider that serves rather than / — it\nreturns typed, calibrated judgments and emits no text at all.\n\nOverview\n\nTypeSafe's Jev is a \"System One\" model. You send one plus a map of\nnamed, typed questions; it returns one typed answer per question, all evaluated\nin a single parallel pass. Nothing has to be parsed back out of prose, and every\n/ answer carries a calibrated confidence rather than a\nself-reported one.\n\nBecause it emits no text, and are not available and\n throws — the same shape Voyage and Jina already use for\nembedding-only providers. Its descriptor declares ,\nwhich keeps it out of auto-select and the health sweep, so those throws are\nunreachable in normal use.\n\nThis is not , which\nscores an already-generated response with RAGAS scorers. Different feature,\ndifferent word.\n\nKey Facts\nProvider id: (aliases: , )\nInference kinds: only — the single provider of the 40 that does\nTool calling: none () — a decision model calls nothing\nHealth check: ; it is never probed with a live generation\nDefault decide timeout: 5000 ms ()\nLatency: flat in question count — 1 question ~393 ms, 400 questions\n ~465 ms. Concurrent requests queue instead, so batch every question into one\n call rather than fanning out.\nCost: ~$0.042 per million input tokens, output billed at zero — about\n $0.00002 per decision. Output tokens are reported — measured 21 for a\n single question, converging to ~17.5 per question in a batch of eight — they\n are simply not charged.\nAccuracy is the trade: 67.8% on TypeSafe's own 711-case benchmark against\n Opus 5's 73.1%. Right for decisions that are gated and reversible; wrong for\n final answers.\n\nQuick Start\nGet an API key\n\nCreate one at console.typesafe.ai/keys.\nConfigure\nUse it\n\n returns on any failure. Use when you want the\nfailure to surface; it throws a whose carries a typed\n.\n\nFrom the CLI\n\n calls under the hood and reads\n from the environment like every other CLI command. See the\nCLI command reference.\n\nThe degradation contract\n\nSetting the key is the entire switch, and removing it is a complete undo.\nEvery internal consumer of fails open: with no decision provider\nconfigured, model routing, context budgeting, relevance compaction, tool routing\nand RAG planning all behave exactly as they did before. There is no\nconfiguration in which a missing, invalid, slow or unreachable decision model\nchanges NeuroLink's observable behaviour.\n\nA credential the service does not accept disables that provider instance rather\nthan paying a round trip on every later call to be told so again.\n\nTwo transports\n\nThe same model is reachable two ways, and the choice is made once in the\nconstructor.\n\n| | Direct
|
|
6542
|
+
{"objectID":"63e8301588e0fd846272e6b041d27fbe6a754543f38d949f07ce7e6f181a0ced","title":"TypeSafe (Jev) Provider Guide","url":"/docs/getting-started/providers/typesafe","content":"TypeSafe (Jev) Provider Guide\n\nThe only provider that serves rather than / — it\nreturns typed, calibrated judgments and emits no text at all.\n\nOverview\n\nTypeSafe's Jev is a \"System One\" model. You send one plus a map of\nnamed, typed questions; it returns one typed answer per question, all evaluated\nin a single parallel pass. Nothing has to be parsed back out of prose, and every\n/ answer carries a calibrated confidence rather than a\nself-reported one.\n\nBecause it emits no text, and are not available and\n throws — the same shape Voyage and Jina already use for\nembedding-only providers. Its descriptor declares ,\nwhich keeps it out of auto-select and the health sweep, so those throws are\nunreachable in normal use.\n\nThis is not , which\nscores an already-generated response with RAGAS scorers. Different feature,\ndifferent word.\n\nKey Facts\nProvider id: (aliases: , )\nInference kinds: only — the single provider of the 40 that does\nTool calling: none () — a decision model calls nothing\nHealth check: ; it is never probed with a live generation\nDefault decide timeout: 5000 ms ()\nLatency: flat in question count — 1 question ~393 ms, 400 questions\n ~465 ms. Concurrent requests queue instead, so batch every question into one\n call rather than fanning out.\nCost: ~$0.042 per million input tokens, output billed at zero — about\n $0.00002 per decision. Output tokens are reported — measured 21 for a\n single question, converging to ~17.5 per question in a batch of eight — they\n are simply not charged.\nAccuracy is the trade: 67.8% on TypeSafe's own 711-case benchmark against\n Opus 5's 73.1%. Right for decisions that are gated and reversible; wrong for\n final answers.\n\nQuick Start\nGet an API key\n\nCreate one at console.typesafe.ai/keys.\nConfigure\nUse it\n\n returns on any failure. Use when you want the\nfailure to surface; it throws a whose carries a typed\n.\n\nFrom the CLI\n\n calls under the hood and reads\n from the environment like every other CLI command. See the\nCLI command reference.\n\nThe degradation contract\n\nSetting the key is the entire switch, and removing it is a complete undo.\nEvery internal consumer of fails open: with no decision provider\nconfigured, model routing, context budgeting, relevance compaction, tool routing\nand RAG planning all behave exactly as they did before. There is no\nconfiguration in which a missing, invalid, slow or unreachable decision model\nchanges NeuroLink's observable behaviour.\n\nA credential the service does not accept disables that provider instance rather\nthan paying a round trip on every later call to be told so again.\n\nTwo transports\n\nThe same model is reachable two ways, and the choice is made once in the\nconstructor.\n\n| | Direct | Vercel AI Gateway |\n| ------------------- | ------------------- | --------------------------------------------- |\n| Key | | |\n| Endpoint | | |\n| Endpoint override | | |\n| Model named in | request body | header |\n| Question vocabulary | | |\n| | on each answer | on |\n| Billed by | TypeSafe | Vercel |\n\nHolding both keys keeps the direct transport, so the confidence figures a\nhost already sees do not shift underneath it when a second key appears. Force\none with or\n. Either endpoint can be moved without a\nrelease: / for the direct\none, / for the\ngateway route.\n\n⚠️ The gateway refuses every request — free credits included — until the\nVercel team has a credit card on file, returning . That is an account state, not a bad key, and it\narrives before the model id is validated.\n\nFull detail, including the measured error table and why the distribution peak is\nnot a substitute for the reported confidence, is in\nThe inference type.\n\nWhat NeuroLink uses it for\n\n| Area | What the decision replaces |\n| ---------------------------------------------------------------- | --------------------------------------------------------------- |\n| Model routing | difficulty + capabilities + risk + model pick in one round trip |\n| Model catalogue | one over the registry ranks all N candidates at once |\n| Context budget | a rubric-placed scope reading lowers the compaction threshold |\n| Relevance compaction | per-message keep/drop, plus a gate on the generated summary |\n| Tool / MCP routing | one per server, replacing a 15s LLM call at ~400 ms |\n| RAG retrieval | per-query / hybrid / graph / rerank planning |\n\nLimits and gotchas\nTwo input ceilings, both enforced by the service: plus the longest\n single question ≈ 33,000 tokens, and plus all questions ≈\n 64,000. Exceeding either returns ","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"","lvl3":""}},
|
|
6529
6543
|
{"objectID":"7320dc5177f0e320fe7887f77c01c06519bb6c0ddeb8a8b38ecfa013a9363a1f","title":"TypeSafe (Jev) Provider Guide","url":"/docs/getting-started/providers/typesafe#typesafe-jev-provider-guide","content":"The only provider that serves rather than / — it\nreturns typed, calibrated judgments and emits no text at all.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"TypeSafe (Jev) Provider Guide","lvl3":""}},
|
|
6530
6544
|
{"objectID":"8cc640004e04379192695b8fcd3d49552ac0f4ebd763093bc610b4c93e823fee","title":"Overview","url":"/docs/getting-started/providers/typesafe#overview","content":"TypeSafe's Jev is a \"System One\" model. You send one plus a map of\nnamed, typed questions; it returns one typed answer per question, all evaluated\nin a single parallel pass. Nothing has to be parsed back out of prose, and every\n/ answer carries a calibrated confidence rather than a\nself-reported one.\n\nBecause it emits no text, and are not available and\n throws — the same shape Voyage and Jina already use for\nembedding-only providers. Its descriptor declares ,\nwhich keeps it out of auto-select and the health sweep, so those throws are\nunreachable in normal use.\n\nThis is not , which\nscores an already-generated response with RAGAS scorers. Different feature,\ndifferent word.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"Overview","lvl3":""}},
|
|
6531
6545
|
{"objectID":"4921fe7ae1c50c817be3b7742587c455084bee9d988015cf475edd5c3c196b84","title":"Key Facts","url":"/docs/getting-started/providers/typesafe#key-facts","content":"Provider id: (aliases: , )\nInference kinds: only — the single provider of the 40 that does\nTool calling: none () — a decision model calls nothing\nHealth check: ; it is never probed with a live generation\nDefault decide timeout: 5000 ms ()\nLatency: flat in question count — 1 question ~393 ms, 400 questions\n ~465 ms. Concurrent requests queue instead, so batch every question into one\n call rather than fanning out.\nCost: ~$0.042 per million input tokens, output billed at zero — about\n $0.00002 per decision. Output tokens are reported — measured 21 for a\n single question, converging to ~17.5 per question in a batch of eight — they\n are simply not charged.\nAccuracy is the trade: 67.8% on TypeSafe's own 711-case benchmark against\n Opus 5's 73.1%. Right for decisions that are gated and reversible; wrong for\n final answers.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"Key Facts","lvl3":""}},
|
|
@@ -6533,7 +6547,7 @@
|
|
|
6533
6547
|
{"objectID":"a7cfa6599d9458e8c4a9bfcef1bba07a4948ebe6b0f30a1352df07a713040d8e","title":"3. Use it","url":"/docs/getting-started/providers/typesafe#3-use-it","content":"returns on any failure. Use when you want the\nfailure to surface; it throws a whose carries a typed\n.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"3. Use it","lvl3":""}},
|
|
6534
6548
|
{"objectID":"4ec7febf2956a104b0037472bab2e6c652e17df7f7cfdf69b73ebe2c5003f082","title":"From the CLI","url":"/docs/getting-started/providers/typesafe#from-the-cli","content":"calls under the hood and reads\n from the environment like every other CLI command. See the\nCLI command reference.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"From the CLI","lvl3":""}},
|
|
6535
6549
|
{"objectID":"98aafdb50791dab3469be7930897496cf4d2fb9dc57e42bacb2ee179ac0064f2","title":"The degradation contract","url":"/docs/getting-started/providers/typesafe#the-degradation-contract","content":"Setting the key is the entire switch, and removing it is a complete undo.\nEvery internal consumer of fails open: with no decision provider\nconfigured, model routing, context budgeting, relevance compaction, tool routing\nand RAG planning all behave exactly as they did before. There is no\nconfiguration in which a missing, invalid, slow or unreachable decision model\nchanges NeuroLink's observable behaviour.\n\nA credential the service does not accept disables that provider instance rather\nthan paying a round trip on every later call to be told so again.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"The degradation contract","lvl3":""}},
|
|
6536
|
-
{"objectID":"8fd6c7607ca461fdf5e7fb3b743b1761645c1ca9a2e666330b59614acb6455fa","title":"Two transports","url":"/docs/getting-started/providers/typesafe#two-transports","content":"The same model is reachable two ways, and the choice is made once in the\nconstructor.\n\n| | Direct
|
|
6550
|
+
{"objectID":"8fd6c7607ca461fdf5e7fb3b743b1761645c1ca9a2e666330b59614acb6455fa","title":"Two transports","url":"/docs/getting-started/providers/typesafe#two-transports","content":"The same model is reachable two ways, and the choice is made once in the\nconstructor.\n\n| | Direct | Vercel AI Gateway |\n| ------------------- | ------------------- | --------------------------------------------- |\n| Key | | |\n| Endpoint | | |\n| Endpoint override | | |\n| Model named in | request body | header |\n| Question vocabulary | | |\n| | on each answer | on |\n| Billed by | TypeSafe | Vercel |\n\nHolding both keys keeps the direct transport, so the confidence figures a\nhost already sees do not shift underneath it when a second key appears. Force\none with or\n. Either endpoint can be moved without a\nrelease: / for the direct\none, / for the\ngateway route.\n\n⚠️ The gateway refuses every request — free credits included — until the\nVercel team has a credit card on file, returning . That is an account state, not a bad key, and it\narrives before the model id is validated.\n\nFull detail, including the measured error table and why the distribution peak is\nnot a substitute for the reported confidence, is in\nThe inference type.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"Two transports","lvl3":""}},
|
|
6537
6551
|
{"objectID":"ac6585086d9cf682e7b1a66265cacfd1c4e961588384fe3883636c5deb66588c","title":"What NeuroLink uses it for","url":"/docs/getting-started/providers/typesafe#what-neurolink-uses-it-for","content":"| Area | What the decision replaces |\n| ---------------------------------------------------------------- | --------------------------------------------------------------- |\n| Model routing | difficulty + capabilities + risk + model pick in one round trip |\n| Model catalogue | one over the registry ranks all N candidates at once |\n| Context budget | a rubric-placed scope reading lowers the compaction threshold |\n| Relevance compaction | per-message keep/drop, plus a gate on the generated summary |\n| Tool / MCP routing | one per server, replacing a 15s LLM call at ~400 ms |\n| RAG retrieval | per-query / hybrid / graph / rerank planning |","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"What NeuroLink uses it for","lvl3":""}},
|
|
6538
6552
|
{"objectID":"04bf675bad2aeefe749c5229a396a476273c9b463d3b81a6767b9ca9357aa36d","title":"Limits and gotchas","url":"/docs/getting-started/providers/typesafe#limits-and-gotchas","content":"Two input ceilings, both enforced by the service: plus the longest\n single question ≈ 33,000 tokens, and plus all questions ≈\n 64,000. Exceeding either returns with no message\n at all — the provider supplies a real sentence in its place.\nBatch, never fan out. Latency is flat in question count but concurrent\n requests queue, so a second round trip costs far more than a hundred extra\n questions.\nA carries no confidence of its own. Use\n — distance from a coin flip, so 0.5 → 0 and\n 0/1 → 1.\n403 vs 401 are inverted on the direct API, and from TypeSafe's own docs: a\n missing header returns 403, an invalid key returns\nThe gateway does not share this quirk.","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"Limits and gotchas","lvl3":""}},
|
|
6539
6553
|
{"objectID":"7d7786b2749554b22a763088bb2c011be0b62bdeb53ee881e9331cf8616dffa7","title":"Troubleshooting","url":"/docs/getting-started/providers/typesafe#troubleshooting","content":"| Symptom | Cause | Fix |\n| ------------------------------------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------------- |\n| always returns | No key, or the key was rejected once and the instance disabled itself | Check ; construct a new instance after fixing it |\n| | One of the two input ceilings | Shorten , or split questions across calls — but prefer shrinking state |\n| | Gateway transport, no card on the Vercel team | Add a payment method, or use the direct transport |\n| Routing never changes | A is configured, which owns selection outright | See Provider Orchestration |","hierarchy":{"lvl0":"Getting Started","lvl1":"TypeSafe (Jev) Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.26.1",
|
|
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": {
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"// CI tier — fast, no live AI calls, safe for every commit (test:unit; also see the separate provider-safety-net CI job, which runs build + test:providers-mocked + test:provider-structure + test:error-classifier-contract on every PR)": "",
|
|
182
182
|
"test:tool-routing": "pnpm exec tsx test/continuous-test-suite-tool-routing.ts",
|
|
183
183
|
"test:tool-routing-semantic": "pnpm exec tsx test/continuous-test-suite-tool-routing-semantic.ts",
|
|
184
|
-
"test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:model-not-found-retryable && pnpm run test:archive:security && pnpm run test:office:security && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp",
|
|
184
|
+
"test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:model-not-found-retryable && pnpm run test:archive:security && pnpm run test:office:security && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp",
|
|
185
185
|
"// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit; test:matrix, a different suite covering the full provider capability matrix, runs nightly via .github/workflows/live-matrix.yml — test:providers itself is still only wired into test:live, not any GitHub Actions workflow)": "",
|
|
186
186
|
"test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic",
|
|
187
187
|
"// CI tier — product output (image/video/TTS/PPT) — costs $$ per run (not wired into any GitHub Actions workflow as of this comment; run manually or add to live-matrix.yml if nightly coverage is needed)": "",
|
|
@@ -243,6 +243,7 @@
|
|
|
243
243
|
"test:multimodal": "pnpm run test:file-formats && pnpm run test:multimodal:sdk",
|
|
244
244
|
"test:multimodal:sdk": "pnpm exec tsx test/continuous-test-suite-multimodal-sdk.ts",
|
|
245
245
|
"test:mcp-result-cache": "pnpm exec tsx test/continuous-test-suite-mcp-result-cache.ts",
|
|
246
|
+
"test:mcp-breaker-resolved-errors": "pnpm exec tsx test/continuous-test-suite-mcp-breaker-resolved-errors.ts",
|
|
246
247
|
"test:archive:security": "pnpm exec tsx test/continuous-test-suite-archive-security.ts",
|
|
247
248
|
"test:office:security": "pnpm exec tsx test/continuous-test-suite-office-security.ts",
|
|
248
249
|
"test:vision-image-format": "pnpm exec tsx test/continuous-test-suite-vision-image-format.ts",
|
|
@@ -615,6 +616,7 @@
|
|
|
615
616
|
"system-one",
|
|
616
617
|
"typesafe",
|
|
617
618
|
"typesafe-ai",
|
|
619
|
+
"laya",
|
|
618
620
|
"jev",
|
|
619
621
|
"model-routing",
|
|
620
622
|
"semantic-router",
|