@juspay/neurolink 12.37.4 → 12.37.5

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.
@@ -46,7 +46,7 @@ import { SpanKind, SpanStatusCode, context as otelContext, trace as otelTrace, }
46
46
  import { calculateCost } from "../../utils/pricing.js";
47
47
  import { transformToolExecutions } from "../../utils/transformationUtils.js";
48
48
  import { resolveToolExecutionRecords } from "../../core/toolExecutionRecorder.js";
49
- import { resolveSamplingParams } from "../../models/modelRegistry.js";
49
+ import { modelSupportsForcedToolChoice, resolveSamplingParams, } from "../../models/modelRegistry.js";
50
50
  import { sanitizeAnthropicMessagesForTrace } from "../../utils/anthropicTraceSanitizer.js";
51
51
  import { extractToolFailureText } from "../../utils/mcpErrorText.js";
52
52
  // Import proper types for multimodal message handling
@@ -707,6 +707,20 @@ async function collectVertexStreamChunks(stream, channel, hooks = {}) {
707
707
  ...(stepReasoningTokens ? { reasoningTokens: stepReasoningTokens } : {}),
708
708
  };
709
709
  }
710
+ /**
711
+ * The answer text of an unforced finalization reply. Text that leads into a
712
+ * further tool call is preamble, not an answer, so a reply still asking for a
713
+ * tool yields none.
714
+ */
715
+ function finalizationAnswerText(content) {
716
+ if (content.some((block) => block.type === "tool_use")) {
717
+ return "";
718
+ }
719
+ return content
720
+ .filter((block) => block.type === "text")
721
+ .map((b) => b.text)
722
+ .join("");
723
+ }
710
724
  export class GoogleVertexProvider extends BaseProvider {
711
725
  projectId;
712
726
  location;
@@ -2949,9 +2963,9 @@ export class GoogleVertexProvider extends BaseProvider {
2949
2963
  * clamped below the ceiling rather than passed through — an over-large
2950
2964
  * budget is a 400 from the API.
2951
2965
  *
2952
- * `useFinalResultTool` (schema / structured-output mode) always pairs with
2953
- * a forced `tool_choice:{type:"any"}` in the request built right after this
2954
- * call — Anthropic hard-rejects `thinking` combined with a `tool_choice`
2966
+ * `forcesToolChoice` (schema mode on a model that accepts a forced choice)
2967
+ * pairs with a forced `tool_choice:{type:"any"}` in the request built right
2968
+ * after this call — Anthropic hard-rejects `thinking` combined with a `tool_choice`
2955
2969
  * that forces tool use: a live 400, "Thinking may not be enabled when
2956
2970
  * tool_choice forces tool use." So `thinking` is omitted entirely in that
2957
2971
  * mode, preserving the prior (pre-thinking-fix) behaviour of silently
@@ -2968,8 +2982,8 @@ export class GoogleVertexProvider extends BaseProvider {
2968
2982
  buildClaudeThinkingParam(
2969
2983
  // Structural, not TextGenerationOptions: the streaming caller passes
2970
2984
  // StreamOptions, and only these two fields are read.
2971
- options, maxTokens, useFinalResultTool) {
2972
- if (useFinalResultTool) {
2985
+ options, maxTokens, forcesToolChoice) {
2986
+ if (forcesToolChoice) {
2973
2987
  if (options.thinkingConfig?.enabled) {
2974
2988
  logger.debug("[GoogleVertex] Omitting thinking: schema mode forces tool_choice:any, which Anthropic rejects alongside thinking");
2975
2989
  }
@@ -3215,7 +3229,10 @@ export class GoogleVertexProvider extends BaseProvider {
3215
3229
  ...(options.topP !== undefined && { topP: options.topP }),
3216
3230
  }, "vertex.anthropic.stream");
3217
3231
  const streamMaxTokens = resolveClaudeMaxTokens(modelName, options.maxTokens);
3218
- const streamThinking = this.buildClaudeThinkingParam(options, streamMaxTokens, useFinalResultTool);
3232
+ // Claude 5.5 / 5.1 400 on a forced tool_choice; schema mode leaves them on
3233
+ // auto, steered by the final_result instruction already in the prompt.
3234
+ const forceFinalResult = useFinalResultTool && modelSupportsForcedToolChoice(modelName);
3235
+ const streamThinking = this.buildClaudeThinkingParam(options, streamMaxTokens, forceFinalResult);
3219
3236
  const requestParams = {
3220
3237
  model: modelName,
3221
3238
  // Default to the model's real output ceiling (e.g. 64K for Sonnet 4.x)
@@ -3226,7 +3243,7 @@ export class GoogleVertexProvider extends BaseProvider {
3226
3243
  ...(streamThinking && { thinking: streamThinking }),
3227
3244
  messages: messages,
3228
3245
  ...(tools && tools.length > 0 && { tools }),
3229
- ...(useFinalResultTool && { tool_choice: { type: "any" } }),
3246
+ ...(forceFinalResult && { tool_choice: { type: "any" } }),
3230
3247
  ...(systemPromptWithSchema && { system: systemPromptWithSchema }),
3231
3248
  ...(streamSampling.temperature !== undefined && {
3232
3249
  temperature: streamSampling.temperature,
@@ -3858,10 +3875,15 @@ export class GoogleVertexProvider extends BaseProvider {
3858
3875
  const finalizationStream = await client.messages.stream({
3859
3876
  ...requestParams,
3860
3877
  max_tokens: terminalMaxTokens,
3861
- tool_choice: {
3862
- type: "tool",
3863
- name: "final_result",
3864
- },
3878
+ // Resized, not inherited: terminalMaxTokens can sit below the
3879
+ // budget requestParams' thinking was sized for.
3880
+ thinking: this.buildClaudeThinkingParam(options, terminalMaxTokens, forceFinalResult),
3881
+ ...(forceFinalResult && {
3882
+ tool_choice: {
3883
+ type: "tool",
3884
+ name: "final_result",
3885
+ },
3886
+ }),
3865
3887
  ...(cachedFinal.system !== undefined && {
3866
3888
  system: cachedFinal.system,
3867
3889
  }),
@@ -3905,11 +3927,23 @@ export class GoogleVertexProvider extends BaseProvider {
3905
3927
  logger.debug("[GoogleVertex] Forced finalization returned structured output (stream)", { keys: Object.keys(forcedFinalResult.input) });
3906
3928
  }
3907
3929
  else {
3908
- const capMessage = hitContextLimit
3909
- ? buildContextCapMessage(externalToolCallCount)
3910
- : buildToolLoopCapMessage(maxSteps, externalToolCallCount);
3911
- channel.push({ content: capMessage });
3912
- aggregatedTurnText += capMessage;
3930
+ // Unforced (the model refuses a forced choice), the call may
3931
+ // answer in text instead; keep that answer over a cap notice.
3932
+ const finalizationText = forceFinalResult
3933
+ ? ""
3934
+ : finalizationAnswerText(response.content);
3935
+ if (finalizationText) {
3936
+ synthesizedFinalAnswer = true;
3937
+ channel.push({ content: finalizationText });
3938
+ aggregatedTurnText += finalizationText;
3939
+ }
3940
+ else {
3941
+ const capMessage = hitContextLimit
3942
+ ? buildContextCapMessage(externalToolCallCount)
3943
+ : buildToolLoopCapMessage(maxSteps, externalToolCallCount);
3944
+ channel.push({ content: capMessage });
3945
+ aggregatedTurnText += capMessage;
3946
+ }
3913
3947
  }
3914
3948
  }
3915
3949
  catch (error) {
@@ -4484,7 +4518,10 @@ export class GoogleVertexProvider extends BaseProvider {
4484
4518
  ...(options.topP !== undefined && { topP: options.topP }),
4485
4519
  }, "vertex.anthropic.generate");
4486
4520
  const generateMaxTokens = resolveClaudeMaxTokens(modelName, options.maxTokens);
4487
- const generateThinking = this.buildClaudeThinkingParam(options, generateMaxTokens, useFinalResultTool);
4521
+ // Claude 5.5 / 5.1 400 on a forced tool_choice; schema mode leaves them on
4522
+ // auto, steered by the final_result instruction already in the prompt.
4523
+ const forceFinalResult = useFinalResultTool && modelSupportsForcedToolChoice(modelName);
4524
+ const generateThinking = this.buildClaudeThinkingParam(options, generateMaxTokens, forceFinalResult);
4488
4525
  const requestParams = {
4489
4526
  model: modelName,
4490
4527
  // Default to the model's real output ceiling (see stream path note).
@@ -4492,7 +4529,7 @@ export class GoogleVertexProvider extends BaseProvider {
4492
4529
  ...(generateThinking && { thinking: generateThinking }),
4493
4530
  messages,
4494
4531
  ...(tools && tools.length > 0 && { tools }),
4495
- ...(useFinalResultTool && { tool_choice: { type: "any" } }),
4532
+ ...(forceFinalResult && { tool_choice: { type: "any" } }),
4496
4533
  ...(systemPromptWithSchema && { system: systemPromptWithSchema }),
4497
4534
  ...(generateSampling.temperature !== undefined && {
4498
4535
  temperature: generateSampling.temperature,
@@ -4901,10 +4938,15 @@ export class GoogleVertexProvider extends BaseProvider {
4901
4938
  const response = await withTimeout(client.messages.create({
4902
4939
  ...requestParams,
4903
4940
  max_tokens: terminalMaxTokens,
4904
- tool_choice: {
4905
- type: "tool",
4906
- name: "final_result",
4907
- },
4941
+ // Resized, not inherited: terminalMaxTokens can sit below the
4942
+ // budget requestParams' thinking was sized for.
4943
+ thinking: this.buildClaudeThinkingParam(options, terminalMaxTokens, forceFinalResult),
4944
+ ...(forceFinalResult && {
4945
+ tool_choice: {
4946
+ type: "tool",
4947
+ name: "final_result",
4948
+ },
4949
+ }),
4908
4950
  ...(cachedFinal.system !== undefined && {
4909
4951
  system: cachedFinal.system,
4910
4952
  }),
@@ -4928,9 +4970,20 @@ export class GoogleVertexProvider extends BaseProvider {
4928
4970
  logger.debug("[GoogleVertex] Forced finalization returned structured output (generate)", { keys: Object.keys(structuredOutput) });
4929
4971
  }
4930
4972
  else {
4931
- finalText = hitContextLimit
4932
- ? buildContextCapMessage(externalToolCallCount)
4933
- : buildToolLoopCapMessage(maxSteps, externalToolCallCount);
4973
+ // Unforced (the model refuses a forced choice), the call may
4974
+ // answer in text instead; keep that answer over a cap notice.
4975
+ const finalizationText = forceFinalResult
4976
+ ? ""
4977
+ : finalizationAnswerText(response.content);
4978
+ if (finalizationText) {
4979
+ finalText = finalizationText;
4980
+ synthesizedFinalAnswer = true;
4981
+ }
4982
+ else {
4983
+ finalText = hitContextLimit
4984
+ ? buildContextCapMessage(externalToolCallCount)
4985
+ : buildToolLoopCapMessage(maxSteps, externalToolCallCount);
4986
+ }
4934
4987
  }
4935
4988
  }
4936
4989
  catch (error) {
@@ -873,7 +873,7 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
873
873
  options.disableInternalFallback === true;
874
874
  // The native loop bypasses BaseProvider.executeGeneration, so the turn
875
875
  // budget has to be composed here or it stops existing for this provider.
876
- return this.runGenerateWithModelFallback(() => this.withTurnTimeout({ ...options, tools: mergedTools }, this.getDescriptorGenerateMs(), (timedOptions) => this.executeNativeGenerate(timedOptions)), callerOwnsFallback);
876
+ return this.runGenerateWithModelFallback(() => this.withTurnTimeout({ ...options, tools: mergedTools }, this.getDescriptorGenerateMs(), (timedOptions) => this.executeNativeGenerate(timedOptions)), callerOwnsFallback, options);
877
877
  }
878
878
  async executeNativeGenerate(options) {
879
879
  const startTime = Date.now();
@@ -22,18 +22,7 @@ import type { VertexAccessTokenProvider, UsageContext, VertexPassthroughTerminal
22
22
  * `effort` key, never the sibling settings beside it.
23
23
  */
24
24
  export declare function mapVertexOutputConfig(value: unknown): Record<string, unknown> | undefined;
25
- /**
26
- * Strip what Vertex rejects and pin the API version it requires.
27
- *
28
- * Prompt caching constrains every rewrite here. Anthropic caches only up to an
29
- * explicit `cache_control` marker, at most four per request, over a prefix
30
- * rendered `tools → system → messages`; anything removed or inserted before a
31
- * marker invalidates it and everything after. So: never drop a marker, never
32
- * reorder `system`, and keep each rewrite deterministic so consecutive turns
33
- * share a prefix. Vertex holds its own cache, apart from the first-party one,
34
- * so nothing here can disturb first-party hits.
35
- */
36
- export declare function buildVertexAnthropicPayload(body: Readonly<Record<string, unknown>>): Record<string, unknown>;
25
+ export declare function buildVertexAnthropicPayload(body: Readonly<Record<string, unknown>>, targetModel?: string): Record<string, unknown>;
37
26
  /**
38
27
  * Publisher endpoint for a Claude model on Vertex.
39
28
  *
@@ -13,6 +13,7 @@
13
13
  * here because nothing reshapes them.
14
14
  */
15
15
  import { logger } from "../utils/logger.js";
16
+ import { claudeDisabledThinkingReplacement, modelSupportsForcedToolChoice, } from "../models/modelRegistry.js";
16
17
  import { isTransientNetworkError } from "./proxyFetch.js";
17
18
  /** Vertex pins the Anthropic API version in the body, not a header. */
18
19
  const VERTEX_ANTHROPIC_VERSION = "vertex-2023-10-16";
@@ -334,7 +335,44 @@ function stripBillingBlock(system) {
334
335
  * share a prefix. Vertex holds its own cache, apart from the first-party one,
335
336
  * so nothing here can disturb first-party hits.
336
337
  */
337
- export function buildVertexAnthropicPayload(body) {
338
+ /**
339
+ * The client addressed its own model; the fallback target may be a Claude
340
+ * 5.5 / 5.1 model, which answers a forced `tool_choice` and
341
+ * `thinking: {type: "disabled"}` with a 400. Reshape both into what the target
342
+ * accepts rather than fail the turn the fallback exists to rescue.
343
+ */
344
+ function fitRequestToTarget(payload, targetModel) {
345
+ const choice = payload.tool_choice;
346
+ if (record(choice) &&
347
+ (choice.type === "any" || choice.type === "tool") &&
348
+ !modelSupportsForcedToolChoice(targetModel)) {
349
+ payload.tool_choice = {
350
+ type: "auto",
351
+ ...(choice.disable_parallel_tool_use !== undefined
352
+ ? { disable_parallel_tool_use: choice.disable_parallel_tool_use }
353
+ : {}),
354
+ };
355
+ logger.warn(`[vertex-anthropic] ${targetModel} rejects tool_choice "${choice.type}"; sending "auto" instead`);
356
+ }
357
+ const thinking = payload.thinking;
358
+ if (record(thinking) && thinking.type === "disabled") {
359
+ const outputConfig = payload.output_config;
360
+ const effort = record(outputConfig) && typeof outputConfig.effort === "string"
361
+ ? outputConfig.effort
362
+ : undefined;
363
+ const replacement = claudeDisabledThinkingReplacement(targetModel, effort);
364
+ if (replacement === "between_tools") {
365
+ payload.thinking = { type: "between_tools" };
366
+ }
367
+ else if (replacement === "omit") {
368
+ delete payload.thinking;
369
+ }
370
+ if (replacement !== "keep") {
371
+ logger.debug(`[vertex-anthropic] ${targetModel} rejects thinking "disabled"; ${replacement === "omit" ? "omitting thinking" : "sending between_tools"}`);
372
+ }
373
+ }
374
+ }
375
+ export function buildVertexAnthropicPayload(body, targetModel) {
338
376
  const dropped = new Set(UNSUPPORTED_FIELDS);
339
377
  const payload = Object.fromEntries(Object.entries(body).filter(([key]) => !dropped.has(key)));
340
378
  const outputConfig = resolveOutputConfig(payload.output_config, payload.messages);
@@ -359,6 +397,9 @@ export function buildVertexAnthropicPayload(body) {
359
397
  payload.system = system;
360
398
  }
361
399
  }
400
+ if (targetModel !== undefined) {
401
+ fitRequestToTarget(payload, targetModel);
402
+ }
362
403
  return { ...payload, anthropic_version: VERTEX_ANTHROPIC_VERSION };
363
404
  }
364
405
  /**
@@ -500,7 +541,7 @@ export async function dispatchVertexAnthropicPassthrough(request) {
500
541
  "content-type": "application/json",
501
542
  accept: stream ? "text/event-stream" : "application/json",
502
543
  },
503
- body: JSON.stringify(buildVertexAnthropicPayload(request.body)),
544
+ body: JSON.stringify(buildVertexAnthropicPayload(request.body, request.model)),
504
545
  ...(request.signal ? { signal: request.signal } : {}),
505
546
  });
506
547
  }
@@ -111,6 +111,12 @@ export type DynamicModelConfig = z.infer<typeof ModelConfigSchema>;
111
111
  * Dynamic model registry type
112
112
  */
113
113
  export type ModelRegistry = z.infer<typeof ModelRegistrySchema>;
114
+ /**
115
+ * What a request should carry in place of `thinking: {type: "disabled"}` for a
116
+ * Claude model: the original (`keep`), `between_tools`, or no `thinking` field
117
+ * at all (`omit`, i.e. adaptive).
118
+ */
119
+ export type ClaudeDisabledThinkingReplacement = "keep" | "between_tools" | "omit";
114
120
  /**
115
121
  * Model capabilities interface
116
122
  */
@@ -4912,11 +4912,11 @@
4912
4912
  {"objectID":"8bee50a94bc91cf5273efb43aa2f13a39be6cd72e048c55da55bd80bc74ce8a0","title":"Getting Help","url":"/docs/getting-started/installation#getting-help","content":"Check our Troubleshooting Guide\nReview FAQ\nSearch GitHub Issues\nCreate new issue with:\nNode.js version (node --version)\nOperating system\nError message\nSteps to reproduce","hierarchy":{"lvl0":"Getting Started","lvl1":"Installation","lvl2":"Getting Help","lvl3":""}},
4913
4913
  {"objectID":"80210a84a233c58e9a12aa96cedd225ad03c3bfe5344b78032d691be93ae3ba0","title":"Verification Checklist","url":"/docs/getting-started/installation#verification-checklist","content":"[ ] Node.js 18+ installed\n[ ] NeuroLink package installed or accessible via npx\n[ ] API keys configured in .env file\n[ ] neurolink status shows working providers\n[ ] Basic generation command works\n[ ] TypeScript support (if needed)\n[ ] Framework integration (if applicable)","hierarchy":{"lvl0":"Getting Started","lvl1":"Installation","lvl2":"Verification Checklist","lvl3":""}},
4914
4914
  {"objectID":"44c035a6ed0dc3b4a04ad68e17bc22de77840cb664eaee4e84f04bb8bd70caaf","title":"Next Steps","url":"/docs/getting-started/installation#next-steps","content":"Quick Start - Test your installation\nProvider Setup - Configure AI providers\nCLI Commands - Learn available commands\nExamples - See implementation patterns","hierarchy":{"lvl0":"Getting Started","lvl1":"Installation","lvl2":"Next Steps","lvl3":""}},
4915
- {"objectID":"c44f69a5d19212c85a451486bef65999f3ef505311f283fa4a129d90603820ac","title":"⚙️ Provider Configuration Guide","url":"/docs/getting-started/provider-setup","content":"⚙️ Provider Configuration Guide\n\nNeuroLink supports multiple AI providers with flexible authentication methods. This guide covers complete setup for all supported providers.\n\nSupported Providers\n\nThis guide walks through full environment-variable setup for the providers below; the complete roster — including the newer catalog providers and the embedding/media/decision-only providers — is indexed with setup guides at Provider Guides.\n\nProviders configured in this guide\nOpenAI - GPT-4o, GPT-4o-mini, GPT-4-turbo\nAmazon Bedrock - Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3 Haiku\nAmazon SageMaker - Custom models deployed on SageMaker endpoints\nGoogle Vertex AI - Gemini 3 Flash/Pro (preview), Gemini 2.5 Flash, Claude 4.0 Sonnet\nGoogle AI Studio - Gemini 1.5 Pro, Gemini 2.0 Flash, Gemini 1.5 Flash\nAnthropic - Claude 4.5 Opus/Sonnet/Haiku, Claude 4.0 Opus/Sonnet, Claude 3.7 Sonnet\nAzure OpenAI - GPT-4, GPT-3.5-Turbo\nLiteLLM - 100+ models across a broad range of providers via proxy server\nHugging Face - open models served by the unified router (Llama 3.x, Qwen 2.5, DeepSeek, Mistral)\nOllama - Local AI models including Llama 2, Code Llama, Mistral, Vicuna\nOpenRouter - 300+ models from every major lab via one aggregator endpoint\nMistral AI - Mistral Tiny, Small, Medium, and Large models\nDeepSeek - deepseek-chat (V3) and deepseek-reasoner (R1)\nNVIDIA NIM - Llama 3.3 70B and 400+ catalog models via NVIDIA hosted or self-hosted NIM\nLM Studio - Any model loaded in LM Studio desktop app (local, no API key required)\nllama.cpp - Any GGUF model served by llama-server (local, no API key required)\n\nOther providers (setup guides in the Provider Guides index)\n\nOnboarded via the zero-quirk OpenAI-wire-compatible catalog (Tier 2) — each has its own setup guide under providers/:\nGroq - LPU-accelerated inference; default openai/gpt-oss-120b\nCerebras - Wafer-scale inference; default gpt-oss-120b\nSambaNova - default Meta-Llama-3.3-70B-Instruct\nTogether AI - default meta-llama/Llama-3.3-70B-Instruct-Turbo\nFireworks AI - default accounts/fireworks/models/kimi-k2p6\nPerplexity - search-augmented models; default sonar\nCloudflare Workers AI - edge inference\nxAI - Grok models; default grok-4.6\nBaseten - default zai-org/GLM-5.3-Flash (BASETEN_API_KEY)\nGMI Cloud - default MiniMaxAI/MiniMax-M3 (GMICLOUD_API_KEY)\nInception Labs - diffusion LLMs; default mercury-2 (INCEPTION_LABS_API_KEY)\nio.net Intelligence - decentralized GPU inference; default meta-llama/Llama-3.3-70B-Instruct (IO_INTELLIGENCE_API_KEY)\nMancer - default deepseek-v4-flash (MANCER_API_KEY); no tool calling\nUpstage - Solar models; default solar-pro4 (UPSTAGE_API_KEY)\nAPI Route - OpenAI-compatible passthrough; default claude-sonnet-4-6 (API_ROUTE_API_KEY)\n\nEmbedding, media-generation, and decision-only providers — not part of generate()/stream() provider selection in the same way, but each has a setup guide:\nCohere - chat + embed-english-v3.0 embeddings + reranking\nVoyage AI - embedding-only; default voyage-3.5\nJina AI - embeddings + reranking; default jina-embeddings-v3\nReplicate, Stability AI, Ideogram, Recraft - direct image generation\nTypeSafe Jev - decision-only; serves decide(), not generate()/stream(). Set TYPESAFE_API_KEY (or AI_GATEWAY_API_KEY for the gateway transport)\nLaya - decision-only, open-weights; serves decide() on a Laya server or LiteLLM proxy route you configure. Set LAYA_API_KEY + LAYA_BASE_URL; used when TypeSafe isn't configured\n\nVoice providers (TTS/STT/Realtime) are configured further down in this guide — see OpenAI TTS onward.\n\n💰 Model Availability & Cost Considerations\n\nImportant Notes:\nModel Availability: Specific models may not be available in all regions or require special access\nCost Variations: Pricing differs significantly between providers and models (e.g., Claude 3.5 Sonnet vs GPT-4o)\nRate Limits: Each provider has different rate limits and quota restrictions\nLocal vs Cloud: Ollama (local) has no per-request cost but requires hardware resources\nEnterprise Tiers: AWS Bedrock, Google Vertex AI, and Azure typically offer enterprise pricing\n\nBest Practices:\nUse new NeuroLink() with automatic provider selection for cost-optimized routing\nMonitor usage through built-in analytics to track costs\nConsider local models (Ollama) for development and testing\nCheck provider documentation for current pricing and availability\n\n🏢 Enterprise Proxy Support\n\nProviders support corporate proxy environments automatically. Simply set environment variables:\n\nNo code changes required - NeuroLink automatically detects and uses proxy settings.\n\nFor detailed proxy setup → See Enterprise & Proxy Setup Guide\n\nOpenAI Configuration {#openai}\n\nBasic Setup\n\nOptional Configuration\n\nSupported Models\ngpt-4o (default) - Latest multimodal model\ngpt-4o-mini - Cost-effective variant\ngpt-4-turbo - High-performance model\n\nUsage Example\n\nTimeout Configuration\nDefault Timeout: 30 seconds\nSupported Formats: Milliseconds (30000), human-readable ('30s', '1m', '5m')\nEnvironment Variable: OPE","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"","lvl3":""}},
4915
+ {"objectID":"c44f69a5d19212c85a451486bef65999f3ef505311f283fa4a129d90603820ac","title":"⚙️ Provider Configuration Guide","url":"/docs/getting-started/provider-setup","content":"⚙️ Provider Configuration Guide\n\nNeuroLink supports multiple AI providers with flexible authentication methods. This guide covers complete setup for all supported providers.\n\nSupported Providers\n\nThis guide walks through full environment-variable setup for the providers below; the complete roster — including the newer catalog providers and the embedding/media/decision-only providers — is indexed with setup guides at Provider Guides.\n\nProviders configured in this guide\nOpenAI - GPT-4o, GPT-4o-mini, GPT-4-turbo\nAmazon Bedrock - Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3 Haiku\nAmazon SageMaker - Custom models deployed on SageMaker endpoints\nGoogle Vertex AI - Gemini 3 Flash/Pro (preview), Gemini 2.5 Flash, Claude 4.0 Sonnet\nGoogle AI Studio - Gemini 1.5 Pro, Gemini 2.0 Flash, Gemini 1.5 Flash\nAnthropic - Claude 4.5 Opus/Sonnet/Haiku, Claude 4.0 Opus/Sonnet, Claude 3.7 Sonnet\nAzure OpenAI - GPT-4, GPT-3.5-Turbo\nLiteLLM - 100+ models across a broad range of providers via proxy server\nHugging Face - open models served by the unified router (Llama 3.x, Qwen 2.5, DeepSeek, Mistral)\nOllama - Local AI models including Llama 2, Code Llama, Mistral, Vicuna\nOpenRouter - 300+ models from every major lab via one aggregator endpoint\nMistral AI - Mistral Tiny, Small, Medium, and Large models\nDeepSeek - deepseek-chat (V3) and deepseek-reasoner (R1)\nNVIDIA NIM - Llama 3.3 70B and 400+ catalog models via NVIDIA hosted or self-hosted NIM\nLM Studio - Any model loaded in LM Studio desktop app (local, no API key required)\nllama.cpp - Any GGUF model served by llama-server (local, no API key required)\n\nOther providers (setup guides in the Provider Guides index)\n\nOnboarded via the zero-quirk OpenAI-wire-compatible catalog (Tier 2) — each has its own setup guide under providers/:\nGroq - LPU-accelerated inference; default openai/gpt-oss-120b\nCerebras - Wafer-scale inference; default gpt-oss-120b\nSambaNova - default Meta-Llama-3.3-70B-Instruct\nTogether AI - default meta-llama/Llama-3.3-70B-Instruct-Turbo\nFireworks AI - default accounts/fireworks/models/kimi-k3\nPerplexity - search-augmented models; default sonar\nCloudflare Workers AI - edge inference\nxAI - Grok models; default grok-4.6\nBaseten - default zai-org/GLM-5.3-Flash (BASETEN_API_KEY)\nGMI Cloud - default MiniMaxAI/MiniMax-M3 (GMICLOUD_API_KEY)\nInception Labs - diffusion LLMs; default mercury-2 (INCEPTION_LABS_API_KEY)\nio.net Intelligence - decentralized GPU inference; default meta-llama/Llama-3.3-70B-Instruct (IO_INTELLIGENCE_API_KEY)\nMancer - default deepseek-v4-flash (MANCER_API_KEY); no tool calling\nUpstage - Solar models; default solar-pro4 (UPSTAGE_API_KEY)\nAPI Route - OpenAI-compatible passthrough; default claude-sonnet-4-6 (API_ROUTE_API_KEY)\n\nEmbedding, media-generation, and decision-only providers — not part of generate()/stream() provider selection in the same way, but each has a setup guide:\nCohere - chat + embed-english-v3.0 embeddings + reranking\nVoyage AI - embedding-only; default voyage-3.5\nJina AI - embeddings + reranking; default jina-embeddings-v3\nReplicate, Stability AI, Ideogram, Recraft - direct image generation\nTypeSafe Jev - decision-only; serves decide(), not generate()/stream(). Set TYPESAFE_API_KEY (or AI_GATEWAY_API_KEY for the gateway transport)\nLaya - decision-only, open-weights; serves decide() on a Laya server or LiteLLM proxy route you configure. Set LAYA_API_KEY + LAYA_BASE_URL; used when TypeSafe isn't configured\n\nVoice providers (TTS/STT/Realtime) are configured further down in this guide — see OpenAI TTS onward.\n\n💰 Model Availability & Cost Considerations\n\nImportant Notes:\nModel Availability: Specific models may not be available in all regions or require special access\nCost Variations: Pricing differs significantly between providers and models (e.g., Claude 3.5 Sonnet vs GPT-4o)\nRate Limits: Each provider has different rate limits and quota restrictions\nLocal vs Cloud: Ollama (local) has no per-request cost but requires hardware resources\nEnterprise Tiers: AWS Bedrock, Google Vertex AI, and Azure typically offer enterprise pricing\n\nBest Practices:\nUse new NeuroLink() with automatic provider selection for cost-optimized routing\nMonitor usage through built-in analytics to track costs\nConsider local models (Ollama) for development and testing\nCheck provider documentation for current pricing and availability\n\n🏢 Enterprise Proxy Support\n\nProviders support corporate proxy environments automatically. Simply set environment variables:\n\nNo code changes required - NeuroLink automatically detects and uses proxy settings.\n\nFor detailed proxy setup → See Enterprise & Proxy Setup Guide\n\nOpenAI Configuration {#openai}\n\nBasic Setup\n\nOptional Configuration\n\nSupported Models\ngpt-4o (default) - Latest multimodal model\ngpt-4o-mini - Cost-effective variant\ngpt-4-turbo - High-performance model\n\nUsage Example\n\nTimeout Configuration\nDefault Timeout: 30 seconds\nSupported Formats: Milliseconds (30000), human-readable ('30s', '1m', '5m')\nEnvironment Variable: OPENA","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"","lvl3":""}},
4916
4916
  {"objectID":"44479af76ca558a6630aafa39578fb6543bd892844c3a6c5948ffd58a2d73287","title":"⚙️ Provider Configuration Guide","url":"/docs/getting-started/provider-setup#-provider-configuration-guide","content":"NeuroLink supports multiple AI providers with flexible authentication methods. This guide covers complete setup for all supported providers.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"⚙️ Provider Configuration Guide","lvl3":""}},
4917
4917
  {"objectID":"ed4c54afa059a89c0cb4a7815f361a50933fe695ec62b3df5a0bd4ad2e25e431","title":"Supported Providers","url":"/docs/getting-started/provider-setup#supported-providers","content":"This guide walks through full environment-variable setup for the providers below; the complete roster — including the newer catalog providers and the embedding/media/decision-only providers — is indexed with setup guides at Provider Guides.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Supported Providers","lvl3":""}},
4918
4918
  {"objectID":"c0abb48e819713cb16c04d745137321d348118c823351fcf31ab014735dd036e","title":"Providers configured in this guide","url":"/docs/getting-started/provider-setup#providers-configured-in-this-guide","content":"OpenAI - GPT-4o, GPT-4o-mini, GPT-4-turbo\nAmazon Bedrock - Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3 Haiku\nAmazon SageMaker - Custom models deployed on SageMaker endpoints\nGoogle Vertex AI - Gemini 3 Flash/Pro (preview), Gemini 2.5 Flash, Claude 4.0 Sonnet\nGoogle AI Studio - Gemini 1.5 Pro, Gemini 2.0 Flash, Gemini 1.5 Flash\nAnthropic - Claude 4.5 Opus/Sonnet/Haiku, Claude 4.0 Opus/Sonnet, Claude 3.7 Sonnet\nAzure OpenAI - GPT-4, GPT-3.5-Turbo\nLiteLLM - 100+ models across a broad range of providers via proxy server\nHugging Face - open models served by the unified router (Llama 3.x, Qwen 2.5, DeepSeek, Mistral)\nOllama - Local AI models including Llama 2, Code Llama, Mistral, Vicuna\nOpenRouter - 300+ models from every major lab via one aggregator endpoint\nMistral AI - Mistral Tiny, Small, Medium, and Large models\nDeepSeek - deepseek-chat (V3) and deepseek-reasoner (R1)\nNVIDIA NIM - Llama 3.3 70B and 400+ catalog models via NVIDIA hosted or self-hosted NIM\nLM Studio - Any model loaded in LM Studio desktop app (local, no API key required)\nllama.cpp - Any GGUF model served by llama-server (local, no API key required)","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Providers configured in this guide","lvl3":""}},
4919
- {"objectID":"cc96a04c9f262c3c1f6f8b8e7c82407cc63406705250afd22947a3567e151721","title":"Other providers (setup guides in the Provider Guides index)","url":"/docs/getting-started/provider-setup#other-providers-setup-guides-in-the-provider-guides-index","content":"Onboarded via the zero-quirk OpenAI-wire-compatible catalog (Tier 2) — each has its own setup guide under providers/:\nGroq - LPU-accelerated inference; default openai/gpt-oss-120b\nCerebras - Wafer-scale inference; default gpt-oss-120b\nSambaNova - default Meta-Llama-3.3-70B-Instruct\nTogether AI - default meta-llama/Llama-3.3-70B-Instruct-Turbo\nFireworks AI - default accounts/fireworks/models/kimi-k2p6\nPerplexity - search-augmented models; default sonar\nCloudflare Workers AI - edge inference\nxAI - Grok models; default grok-4.6\nBaseten - default zai-org/GLM-5.3-Flash (BASETEN_API_KEY)\nGMI Cloud - default MiniMaxAI/MiniMax-M3 (GMICLOUD_API_KEY)\nInception Labs - diffusion LLMs; default mercury-2 (INCEPTION_LABS_API_KEY)\nio.net Intelligence - decentralized GPU inference; default meta-llama/Llama-3.3-70B-Instruct (IO_INTELLIGENCE_API_KEY)\nMancer - default deepseek-v4-flash (MANCER_API_KEY); no tool calling\nUpstage - Solar models; default solar-pro4 (UPSTAGE_API_KEY)\nAPI Route - OpenAI-compatible passthrough; default claude-sonnet-4-6 (API_ROUTE_API_KEY)\n\nEmbedding, media-generation, and decision-only providers — not part of generate()/stream() provider selection in the same way, but each has a setup guide:\nCohere - chat + embed-english-v3.0 embeddings + reranking\nVoyage AI - embedding-only; default voyage-3.5\nJina AI - embeddings + reranking; default jina-embeddings-v3\nReplicate, Stability AI, Ideogram, Recraft - direct image generation\nTypeSafe Jev - decision-only; serves decide(), not generate()/stream(). Set TYPESAFE_API_KEY (or AI_GATEWAY_API_KEY for the gateway transport)\nLaya - decision-only, open-weights; serves decide() on a Laya server or LiteLLM proxy route you configure. Set LAYA_API_KEY + LAYA_BASE_URL; used when TypeSafe isn't configured\n\nVoice providers (TTS/STT/Realtime) are configured further down in this guide — see OpenAI TTS onward.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Other providers (setup guides in the Provider Guides index)","lvl3":""}},
4919
+ {"objectID":"cc96a04c9f262c3c1f6f8b8e7c82407cc63406705250afd22947a3567e151721","title":"Other providers (setup guides in the Provider Guides index)","url":"/docs/getting-started/provider-setup#other-providers-setup-guides-in-the-provider-guides-index","content":"Onboarded via the zero-quirk OpenAI-wire-compatible catalog (Tier 2) — each has its own setup guide under providers/:\nGroq - LPU-accelerated inference; default openai/gpt-oss-120b\nCerebras - Wafer-scale inference; default gpt-oss-120b\nSambaNova - default Meta-Llama-3.3-70B-Instruct\nTogether AI - default meta-llama/Llama-3.3-70B-Instruct-Turbo\nFireworks AI - default accounts/fireworks/models/kimi-k3\nPerplexity - search-augmented models; default sonar\nCloudflare Workers AI - edge inference\nxAI - Grok models; default grok-4.6\nBaseten - default zai-org/GLM-5.3-Flash (BASETEN_API_KEY)\nGMI Cloud - default MiniMaxAI/MiniMax-M3 (GMICLOUD_API_KEY)\nInception Labs - diffusion LLMs; default mercury-2 (INCEPTION_LABS_API_KEY)\nio.net Intelligence - decentralized GPU inference; default meta-llama/Llama-3.3-70B-Instruct (IO_INTELLIGENCE_API_KEY)\nMancer - default deepseek-v4-flash (MANCER_API_KEY); no tool calling\nUpstage - Solar models; default solar-pro4 (UPSTAGE_API_KEY)\nAPI Route - OpenAI-compatible passthrough; default claude-sonnet-4-6 (API_ROUTE_API_KEY)\n\nEmbedding, media-generation, and decision-only providers — not part of generate()/stream() provider selection in the same way, but each has a setup guide:\nCohere - chat + embed-english-v3.0 embeddings + reranking\nVoyage AI - embedding-only; default voyage-3.5\nJina AI - embeddings + reranking; default jina-embeddings-v3\nReplicate, Stability AI, Ideogram, Recraft - direct image generation\nTypeSafe Jev - decision-only; serves decide(), not generate()/stream(). Set TYPESAFE_API_KEY (or AI_GATEWAY_API_KEY for the gateway transport)\nLaya - decision-only, open-weights; serves decide() on a Laya server or LiteLLM proxy route you configure. Set LAYA_API_KEY + LAYA_BASE_URL; used when TypeSafe isn't configured\n\nVoice providers (TTS/STT/Realtime) are configured further down in this guide — see OpenAI TTS onward.","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Other providers (setup guides in the Provider Guides index)","lvl3":""}},
4920
4920
  {"objectID":"d17be3311722218280d0e76731e7344c620c18f5073e07abbc826f3922db976a","title":"💰 Model Availability & Cost Considerations","url":"/docs/getting-started/provider-setup#-model-availability-cost-considerations","content":"Important Notes:\nModel Availability: Specific models may not be available in all regions or require special access\nCost Variations: Pricing differs significantly between providers and models (e.g., Claude 3.5 Sonnet vs GPT-4o)\nRate Limits: Each provider has different rate limits and quota restrictions\nLocal vs Cloud: Ollama (local) has no per-request cost but requires hardware resources\nEnterprise Tiers: AWS Bedrock, Google Vertex AI, and Azure typically offer enterprise pricing\n\nBest Practices:\nUse new NeuroLink() with automatic provider selection for cost-optimized routing\nMonitor usage through built-in analytics to track costs\nConsider local models (Ollama) for development and testing\nCheck provider documentation for current pricing and availability","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"💰 Model Availability & Cost Considerations","lvl3":""}},
4921
4921
  {"objectID":"3a1bd0ccb708d37a59e2db3650f689f77fba69e91ec88142c7c9b85f1c18057d","title":"🏢 Enterprise Proxy Support","url":"/docs/getting-started/provider-setup#-enterprise-proxy-support","content":"Providers support corporate proxy environments automatically. Simply set environment variables:\n\nNo code changes required - NeuroLink automatically detects and uses proxy settings.\n\nFor detailed proxy setup → See Enterprise & Proxy Setup Guide","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"🏢 Enterprise Proxy Support","lvl3":""}},
4922
4922
  {"objectID":"1b0159447e4aee3ffd31efe28600cf755e4cc49d50f354e1a59d9574199213d2","title":"Supported Models","url":"/docs/getting-started/provider-setup#supported-models","content":"gpt-4o (default) - Latest multimodal model\ngpt-4o-mini - Cost-effective variant\ngpt-4-turbo - High-performance model","hierarchy":{"lvl0":"Getting Started","lvl1":"⚙️ Provider Configuration Guide","lvl2":"Supported Models","lvl3":""}},
@@ -5410,29 +5410,29 @@
5410
5410
  {"objectID":"5303398825a285a4052490bdc1ec93aad23b25a4130aca8f58bd5bb231ea52d2","title":"PCM16 output is unplayable in audio players","url":"/docs/getting-started/providers/cartesia#pcm16-output-is-unplayable-in-audio-players","content":"pcm16 is RAW samples at 24 kHz, not a WAV file — players need a\nheader. Either write a 44-byte WAV header yourself before the PCM data,\nor switch to format: \"wav\" which produces a complete RIFF/WAV file\nalready.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cartesia TTS Provider Guide","lvl2":"PCM16 output is unplayable in audio players","lvl3":""}},
5411
5411
  {"objectID":"b2967379807a28639cf50c9c68894b76779dba68fe6f74d6121a76ea0cdf94d3","title":"Streaming use cases","url":"/docs/getting-started/providers/cartesia#streaming-use-cases","content":"This handler is synchronous — it waits for the full audio response. For\nsub-100 ms first-byte latency in voice-agent flows, use CartesiaStream\nin src/lib/adapters/tts/cartesiaHandler.ts directly (it's wired into\nNeuroLink's voice server). The synchronous handler is the right choice\nfor batch generation, file output, and any flow where you process the\nwhole audio buffer at once.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cartesia TTS Provider Guide","lvl2":"Streaming use cases","lvl3":""}},
5412
5412
  {"objectID":"dbb872f4bc4eb26c06d8a4ddc07f67efe59e2ea62bb9c5eda1d4df1df6b9654d","title":"See Also","url":"/docs/getting-started/providers/cartesia#see-also","content":"TTS Feature Guide — overall TTS architecture and supported providers\nFish Audio TTS — sibling low-cost TTS handler\nElevenLabs TTS — sibling TTS with the largest voice library\nAdding a TTS provider — internal reference for the integration pattern\n\nNeed Help? Open a GitHub Discussion or issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cartesia TTS Provider Guide","lvl2":"See Also","lvl3":""}},
5413
- {"objectID":"7f5abb3425169d7f2e1c11b1fbb0b6b42e3b5f13f6b5bca11f8c71d79aec7304","title":"Cerebras Provider Guide","url":"/docs/getting-started/providers/cerebras","content":"Cerebras Provider Guide\n\nThe fastest hosted generation available (~3000 tokens/s on GPT-OSS\n120B) via Cerebras' Wafer-Scale Engine — best for throughput-hungry\nworkloads\n\nOverview\n\nCerebras serves open-weight models on its Wafer-Scale Engine (WSE), a\nsingle wafer-sized chip whose on-die memory bandwidth yields generation\nspeeds an order of magnitude above GPU clouds. NeuroLink wraps\napi.cerebras.ai/v1 (OpenAI-compatible, zero-quirk Tier 2 catalog\nentry) so the standard generate / stream contract applies.\n\nThe roster below was verified against a live authenticated /v1/models\non 2026-08-27 — Cerebras retires models aggressively, and previously\ndocumented llama/qwen ids now return 404:\ngpt-oss-120b (default) — OpenAI's open-weight 120B reasoning model, ~3000 tok/s\ngemma-4-31b — Google Gemma 4 31B, ~1850 tok/s\n\nKey Facts\nProtocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cerebras.ai/v1\nDefault model: gpt-oss-120b\nContext window: 65K tokens on the free tier, 131K on paid tiers (both\n models). NeuroLink budgets context against the 65K free-tier floor — the\n account tier isn't knowable from the key, and compacting early on a paid\n tier is safe while overrunning a 65K window is not.\nMax output: 32K free / 40K paid\nVision: No (text-only roster)\nStreaming: Supported\nTool calling: Supported (native)\nStructured output: Supported — but not combined with tools in one\n request: the API rejects tools + response_format together with\n 400 wrong_api_format (\"tools\" is incompatible with \"response_format\").\n NeuroLink handles this the same way as Groq: with tools active the\n schema is enforced post-hoc on the final text instead of on the wire.\nReasoning trace: gpt-oss-120b emits reasoning deltas before\n content — see Troubleshooting for the maxTokens implication.\nBilling: no keyless free tier. Even the one-time $5 promotional\n credit requires saving a payment method (\"you won't be charged now\").\n Pay-as-you-go starts at $10.\nPricing (per million tokens, checked 2026-08-27): gpt-oss-120b\n $0.35 in / $0.75 out; gemma-4-31b $0.99 in / $1.49 out.\n\nQuick Start\nGet an API Key\n\nSign up at https://cloud.cerebras.ai (Google\nOAuth works), claim the $5 free credit under Billing → Credits (a\npayment card must be saved — no charge is made), and create an API key\n(prefix csk-).\nConfigure Environment\nGenerate Your First Response\n\nSDK Usage\n\nBasic Generation\n\nStreaming\n\nTool Calling\n\nStructured Output\n\nCombining schema with active tools works, but the schema is enforced\npost-hoc rather than on the wire (see Key Facts) — expect\nstructuredData to be best-effort in that combination, exactly as with\nGroq.\n\nPer-Call Credentials\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ---------- | --------------------- |\n| cerebras | --provider cerebras |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default | Description |\n| -------------------- | -------- | ---------------------------- | ---------------- |\n| CEREBRAS_API_KEY | Yes | — | Cerebras API key |\n| CEREBRAS_MODEL | No | gpt-oss-120b | Default model |\n| CEREBRAS_BASE_URL | No | https://api.cerebras.ai/v1 | Base URL |\n\nFeature Support Matrix\n\n| Feature | gpt-oss-120b | gemma-4-31b |\n| ------------------------- | ------------ | ----------- |\n| Text generation | Yes | Yes |\n| Streaming | Yes | Yes |\n| Tool calling | Yes | Yes |\n| Structured output | Yes | Yes |\n| Structured output + tools | Post-hoc | Post-hoc |\n| Vision | No | No |\n| Embeddings | No | No |\n| Context window | 65K/131K | 65K/131K |\n\nTroubleshooting\n\n\"Invalid Cerebras API key\"\n\nGet / rotate at https://cloud.cerebras.ai.\nA bad key returns 401 with \"code\": \"wrong_api_key\", which NeuroLink\nmaps to this message.\n\n402 payment_required on every call\n\nThe account has no balance. Cerebras has no keyless free tier: open\nBilling → Credits → ADD CREDITS in the console, choose \"Start with\nlimited free credits\", and save a payment card — the $5 promo credit\nactivates with no charge. Skipping the claim step during onboarding\n(\"SKIP TO CONSOLE\") leaves the balance at $0.00.\n\nEmpty content with small maxTokens on gpt-oss-120b\n\ngpt-oss-120b is a reasoning model: it spends its first tokens on a\nreasoning channel before emitting content. With a tight budget\n(e.g. maxTokens: 50) the entire budget goes to reasoning,\nfinish_reason is length, and content is empty. Give reasoning\nprompts a few hundred tokens of headroom.\n\n404 \"model not found\" for llama/qwen models\n\nThose models are retired. The live roster is gpt-oss-120b and\ngemma-4-31b only — verify with an authenticated\nGET https://api.cerebras.ai/v1/models.\n\nSee Also\nGroq Provider — sibling speed-focu","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"","lvl3":""}},
5413
+ {"objectID":"7f5abb3425169d7f2e1c11b1fbb0b6b42e3b5f13f6b5bca11f8c71d79aec7304","title":"Cerebras Provider Guide","url":"/docs/getting-started/providers/cerebras","content":"Cerebras Provider Guide\n\nThe fastest hosted generation available (~3000 tokens/s on GPT-OSS\n120B) via Cerebras' Wafer-Scale Engine — best for throughput-hungry\nworkloads\n\nOverview\n\nCerebras serves open-weight models on its Wafer-Scale Engine (WSE), a\nsingle wafer-sized chip whose on-die memory bandwidth yields generation\nspeeds an order of magnitude above GPU clouds. NeuroLink wraps\napi.cerebras.ai/v1 (OpenAI-compatible, zero-quirk Tier 2 catalog\nentry) so the standard generate / stream contract applies.\n\nThe roster below was verified against a live authenticated /v1/models\non 2026-09-28 — Cerebras retires models aggressively: gemma-4-31b left\nthe roster in September 2026, and earlier llama/qwen ids return 404:\ngpt-oss-120b (default) — OpenAI's open-weight 120B reasoning model, ~3000 tok/s\n\nThe roster also lists qwen-3.8-27b, which the catalog does not carry yet:\nno chat call has verified it.\n\nKey Facts\nProtocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cerebras.ai/v1\nDefault model: gpt-oss-120b\nContext window: 65K tokens on the free tier, 131K on paid tiers. NeuroLink budgets context against the 65K free-tier floor — the\n account tier isn't knowable from the key, and compacting early on a paid\n tier is safe while overrunning a 65K window is not.\nMax output: 32K free / 40K paid\nVision: No — gemma-4-31b, the only vision-capable model, is retired\nStreaming: Supported\nTool calling: Supported (native)\nStructured output: Supported — but not combined with tools in one\n request: the API rejects tools + response_format together with\n 400 wrong_api_format (\"tools\" is incompatible with \"response_format\").\n NeuroLink handles this the same way as Groq: with tools active the\n schema is enforced post-hoc on the final text instead of on the wire.\nReasoning trace: gpt-oss-120b emits reasoning deltas before\n content — see Troubleshooting for the maxTokens implication.\nBilling: no keyless free tier. Even the one-time $5 promotional\n credit requires saving a payment method (\"you won't be charged now\").\n Pay-as-you-go starts at $10.\nPricing (per million tokens, checked 2026-08-27): gpt-oss-120b\n $0.35 in / $0.75 out.\n\nQuick Start\nGet an API Key\n\nSign up at https://cloud.cerebras.ai (Google\nOAuth works), claim the $5 free credit under Billing → Credits (a\npayment card must be saved — no charge is made), and create an API key\n(prefix csk-).\nConfigure Environment\nGenerate Your First Response\n\nSDK Usage\n\nBasic Generation\n\nStreaming\n\nTool Calling\n\nStructured Output\n\nCombining schema with active tools works, but the schema is enforced\npost-hoc rather than on the wire (see Key Facts) — expect\nstructuredData to be best-effort in that combination, exactly as with\nGroq.\n\nPer-Call Credentials\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ---------- | --------------------- |\n| cerebras | --provider cerebras |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default | Description |\n| -------------------- | -------- | ---------------------------- | ---------------- |\n| CEREBRAS_API_KEY | Yes | — | Cerebras API key |\n| CEREBRAS_MODEL | No | gpt-oss-120b | Default model |\n| CEREBRAS_BASE_URL | No | https://api.cerebras.ai/v1 | Base URL |\n\nFeature Support Matrix\n\n| Feature | gpt-oss-120b |\n| ------------------------- | ------------ |\n| Text generation | Yes |\n| Streaming | Yes |\n| Tool calling | Yes |\n| Structured output | Yes |\n| Structured output + tools | Post-hoc |\n| Vision | No |\n| Embeddings | No |\n| Context window | 65K/131K |\n\nTroubleshooting\n\n\"Invalid Cerebras API key\"\n\nGet / rotate at https://cloud.cerebras.ai.\nA bad key returns 401 with \"code\": \"wrong_api_key\", which NeuroLink\nmaps to this message.\n\n402 payment_required on every call\n\nThe account has no balance. Cerebras has no keyless free tier: open\nBilling → Credits → ADD CREDITS in the console, choose \"Start with\nlimited free credits\", and save a payment card — the $5 promo credit\nactivates with no charge. Skipping the claim step during onboarding\n(\"SKIP TO CONSOLE\") leaves the balance at $0.00.\n\nEmpty content with small maxTokens on gpt-oss-120b\n\ngpt-oss-120b is a reasoning model: it spends its first tokens on a\nreasoning channel before emitting content. With a tight budget\n(e.g. maxTokens: 50) the entire budget goes to reasoning,\nfinish_reason is length, and content is empty. Give reasoning\nprompts a few hundred tokens of headroom.\n\n404 \"model not found\" for llama/qwen models\n\nThose models are retired, and so is gemma-4-31b. The catalog carries\ngpt-oss-120b only — verify the live roster with an authenticated\nGET https://api.cerebras.ai/v1/models.\n\nSee Also\nGroq Provider — sibling speed-focused OpenAI-compat provider\nxAI Grok Prov","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"","lvl3":""}},
5414
5414
  {"objectID":"2b42e090bd80e32e95e89006b45fed37fa20315824ee536721743206419731f1","title":"Cerebras Provider Guide","url":"/docs/getting-started/providers/cerebras#cerebras-provider-guide","content":"The fastest hosted generation available (~3000 tokens/s on GPT-OSS\n120B) via Cerebras' Wafer-Scale Engine — best for throughput-hungry\nworkloads","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Cerebras Provider Guide","lvl3":""}},
5415
- {"objectID":"856c92d5719d8c67da883b4fab1071e2385d3f7116f9e9f12d010871dff7509f","title":"Overview","url":"/docs/getting-started/providers/cerebras#overview","content":"Cerebras serves open-weight models on its Wafer-Scale Engine (WSE), a\nsingle wafer-sized chip whose on-die memory bandwidth yields generation\nspeeds an order of magnitude above GPU clouds. NeuroLink wraps\napi.cerebras.ai/v1 (OpenAI-compatible, zero-quirk Tier 2 catalog\nentry) so the standard generate / stream contract applies.\n\nThe roster below was verified against a live authenticated /v1/models\non 2026-08-27 — Cerebras retires models aggressively, and previously\ndocumented llama/qwen ids now return 404:\ngpt-oss-120b (default) — OpenAI's open-weight 120B reasoning model, ~3000 tok/s\ngemma-4-31b — Google Gemma 4 31B, ~1850 tok/s","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Overview","lvl3":""}},
5416
- {"objectID":"26ab9baccdd8cb8f22ca7cea1d6e854040bed3093d871530515de9b3f990f737","title":"Key Facts","url":"/docs/getting-started/providers/cerebras#key-facts","content":"Protocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cerebras.ai/v1\nDefault model: gpt-oss-120b\nContext window: 65K tokens on the free tier, 131K on paid tiers (both\n models). NeuroLink budgets context against the 65K free-tier floor — the\n account tier isn't knowable from the key, and compacting early on a paid\n tier is safe while overrunning a 65K window is not.\nMax output: 32K free / 40K paid\nVision: No (text-only roster)\nStreaming: Supported\nTool calling: Supported (native)\nStructured output: Supported — but not combined with tools in one\n request: the API rejects tools + response_format together with\n 400 wrong_api_format (\"tools\" is incompatible with \"response_format\").\n NeuroLink handles this the same way as Groq: with tools active the\n schema is enforced post-hoc on the final text instead of on the wire.\nReasoning trace: gpt-oss-120b emits reasoning deltas before\n content — see Troubleshooting for the maxTokens implication.\nBilling: no keyless free tier. Even the one-time $5 promotional\n credit requires saving a payment method (\"you won't be charged now\").\n Pay-as-you-go starts at $10.\nPricing (per million tokens, checked 2026-08-27): gpt-oss-120b\n $0.35 in / $0.75 out; gemma-4-31b $0.99 in / $1.49 out.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Key Facts","lvl3":""}},
5415
+ {"objectID":"856c92d5719d8c67da883b4fab1071e2385d3f7116f9e9f12d010871dff7509f","title":"Overview","url":"/docs/getting-started/providers/cerebras#overview","content":"Cerebras serves open-weight models on its Wafer-Scale Engine (WSE), a\nsingle wafer-sized chip whose on-die memory bandwidth yields generation\nspeeds an order of magnitude above GPU clouds. NeuroLink wraps\napi.cerebras.ai/v1 (OpenAI-compatible, zero-quirk Tier 2 catalog\nentry) so the standard generate / stream contract applies.\n\nThe roster below was verified against a live authenticated /v1/models\non 2026-09-28 — Cerebras retires models aggressively: gemma-4-31b left\nthe roster in September 2026, and earlier llama/qwen ids return 404:\ngpt-oss-120b (default) — OpenAI's open-weight 120B reasoning model, ~3000 tok/s\n\nThe roster also lists qwen-3.8-27b, which the catalog does not carry yet:\nno chat call has verified it.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Overview","lvl3":""}},
5416
+ {"objectID":"26ab9baccdd8cb8f22ca7cea1d6e854040bed3093d871530515de9b3f990f737","title":"Key Facts","url":"/docs/getting-started/providers/cerebras#key-facts","content":"Protocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cerebras.ai/v1\nDefault model: gpt-oss-120b\nContext window: 65K tokens on the free tier, 131K on paid tiers. NeuroLink budgets context against the 65K free-tier floor — the\n account tier isn't knowable from the key, and compacting early on a paid\n tier is safe while overrunning a 65K window is not.\nMax output: 32K free / 40K paid\nVision: No — gemma-4-31b, the only vision-capable model, is retired\nStreaming: Supported\nTool calling: Supported (native)\nStructured output: Supported — but not combined with tools in one\n request: the API rejects tools + response_format together with\n 400 wrong_api_format (\"tools\" is incompatible with \"response_format\").\n NeuroLink handles this the same way as Groq: with tools active the\n schema is enforced post-hoc on the final text instead of on the wire.\nReasoning trace: gpt-oss-120b emits reasoning deltas before\n content — see Troubleshooting for the maxTokens implication.\nBilling: no keyless free tier. Even the one-time $5 promotional\n credit requires saving a payment method (\"you won't be charged now\").\n Pay-as-you-go starts at $10.\nPricing (per million tokens, checked 2026-08-27): gpt-oss-120b\n $0.35 in / $0.75 out.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Key Facts","lvl3":""}},
5417
5417
  {"objectID":"c3c043ac1f776cffba1044b19f416aafce29755534349bb92136960de36a692b","title":"1. Get an API Key","url":"/docs/getting-started/providers/cerebras#1-get-an-api-key","content":"Sign up at https://cloud.cerebras.ai (Google\nOAuth works), claim the $5 free credit under Billing → Credits (a\npayment card must be saved — no charge is made), and create an API key\n(prefix csk-).","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"1. Get an API Key","lvl3":""}},
5418
5418
  {"objectID":"9e3b6877b6959bc93d1110ec37c7f1ce4af33285ee2a82761d36763d85be92e2","title":"2. Configure Environment","url":"/docs/getting-started/providers/cerebras#2-configure-environment","content":"`bash","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"2. Configure Environment","lvl3":""}},
5419
5419
  {"objectID":"e3829cccd09bb0837aa182c1797d9b0ff9f73005068adc983f16f050b8d21599","title":"Required","url":"/docs/getting-started/providers/cerebras#required","content":"CEREBRASAPIKEY=csk-...","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Required","lvl3":""}},
5420
- {"objectID":"b1eea51082498c799ccf79c0e90f0879a6170984675a89934be3a4670db89de0","title":"Optional: override the default model (default: gpt-oss-120b)","url":"/docs/getting-started/providers/cerebras#optional-override-the-default-model-default-gpt-oss-120b","content":"CEREBRAS_MODEL=gemma-4-31b","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Optional: override the default model (default: gpt-oss-120b)","lvl3":""}},
5420
+ {"objectID":"b1eea51082498c799ccf79c0e90f0879a6170984675a89934be3a4670db89de0","title":"Optional: override the default model (default: gpt-oss-120b)","url":"/docs/getting-started/providers/cerebras#optional-override-the-default-model-default-gpt-oss-120b","content":"CEREBRAS_MODEL=gpt-oss-120b","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Optional: override the default model (default: gpt-oss-120b)","lvl3":""}},
5421
5421
  {"objectID":"962285bdf8273490f1457378d234a1ac149267b97d4525c2f24b1b4da267fe1f","title":"CEREBRAS_BASE_URL=https://api.cerebras.ai/v1","url":"/docs/getting-started/providers/cerebras#cerebras_base_urlhttpsapicerebrasaiv1","content":"`","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"CEREBRAS_BASE_URL=https://api.cerebras.ai/v1","lvl3":""}},
5422
5422
  {"objectID":"dc0b39d9332b8719ec6f97b08fa67dd583fb91ea99f0690eea37525ba773c7ae","title":"Structured Output","url":"/docs/getting-started/providers/cerebras#structured-output","content":"Combining schema with active tools works, but the schema is enforced\npost-hoc rather than on the wire (see Key Facts) — expect\nstructuredData to be best-effort in that combination, exactly as with\nGroq.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Structured Output","lvl3":""}},
5423
5423
  {"objectID":"456b4dcb39fa485bca2687655be21a417c78bc6361c0d40f4c9c241ea439bcfb","title":"CLI Usage","url":"/docs/getting-started/providers/cerebras#cli-usage","content":"`bash","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"CLI Usage","lvl3":""}},
5424
5424
  {"objectID":"4643c07beb3b8210ea91cc08e566025480892c779bef7b2c796b9c8ebaff6ce1","title":"Default model (gpt-oss-120b)","url":"/docs/getting-started/providers/cerebras#default-model-gpt-oss-120b","content":"pnpm run cli generate \"Quick question\" --provider cerebras","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Default model (gpt-oss-120b)","lvl3":""}},
5425
- {"objectID":"e0c763d4b5bc1fd75056c4d34a718ac6ad2e70a476fa624d205158fa731db80e","title":"Explicit model","url":"/docs/getting-started/providers/cerebras#explicit-model","content":"pnpm run cli generate \"Hi\" --provider cerebras --model gemma-4-31b","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Explicit model","lvl3":""}},
5425
+ {"objectID":"e0c763d4b5bc1fd75056c4d34a718ac6ad2e70a476fa624d205158fa731db80e","title":"Explicit model","url":"/docs/getting-started/providers/cerebras#explicit-model","content":"pnpm run cli generate \"Hi\" --provider cerebras --model gpt-oss-120b","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Explicit model","lvl3":""}},
5426
5426
  {"objectID":"a1cc50f0d339695a00d519964c59b8be591a987db884bbe5be1e9176df71b1cb","title":"Streaming","url":"/docs/getting-started/providers/cerebras#streaming-1","content":"pnpm run cli stream \"Count to ten\" --provider cerebras","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Streaming","lvl3":""}},
5427
5427
  {"objectID":"f92965506a689f101d827e46fd2c597bc08e2e4e4795897527ea24eae93b1599","title":"Loop / chat","url":"/docs/getting-started/providers/cerebras#loop-chat","content":"pnpm run cli loop --provider cerebras\n`","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Loop / chat","lvl3":""}},
5428
5428
  {"objectID":"00c70f016282b6122ce31ad75b96f97d6ceac48d4df583fd6f5e0e5d92ac54db","title":"Provider Aliases","url":"/docs/getting-started/providers/cerebras#provider-aliases","content":"| Alias | Example |\n| ---------- | --------------------- |\n| cerebras | --provider cerebras |","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Provider Aliases","lvl3":""}},
5429
5429
  {"objectID":"6f804eccfe08ce82b598089930b46f12be01d31332a34b8a0fdc82bf0f492fa1","title":"Configuration Reference","url":"/docs/getting-started/providers/cerebras#configuration-reference","content":"| Environment Variable | Required | Default | Description |\n| -------------------- | -------- | ---------------------------- | ---------------- |\n| CEREBRAS_API_KEY | Yes | — | Cerebras API key |\n| CEREBRAS_MODEL | No | gpt-oss-120b | Default model |\n| CEREBRAS_BASE_URL | No | https://api.cerebras.ai/v1 | Base URL |","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Configuration Reference","lvl3":""}},
5430
- {"objectID":"4f11d403d24ed52edbb5f65bb14374f400a4c4f93c5cfc77031253d7f07afb70","title":"Feature Support Matrix","url":"/docs/getting-started/providers/cerebras#feature-support-matrix","content":"| Feature | gpt-oss-120b | gemma-4-31b |\n| ------------------------- | ------------ | ----------- |\n| Text generation | Yes | Yes |\n| Streaming | Yes | Yes |\n| Tool calling | Yes | Yes |\n| Structured output | Yes | Yes |\n| Structured output + tools | Post-hoc | Post-hoc |\n| Vision | No | No |\n| Embeddings | No | No |\n| Context window | 65K/131K | 65K/131K |","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Feature Support Matrix","lvl3":""}},
5430
+ {"objectID":"4f11d403d24ed52edbb5f65bb14374f400a4c4f93c5cfc77031253d7f07afb70","title":"Feature Support Matrix","url":"/docs/getting-started/providers/cerebras#feature-support-matrix","content":"| Feature | gpt-oss-120b |\n| ------------------------- | ------------ |\n| Text generation | Yes |\n| Streaming | Yes |\n| Tool calling | Yes |\n| Structured output | Yes |\n| Structured output + tools | Post-hoc |\n| Vision | No |\n| Embeddings | No |\n| Context window | 65K/131K |","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Feature Support Matrix","lvl3":""}},
5431
5431
  {"objectID":"44d1fb37e97ca28d25351c5c9b256f6290a6893cadc0a4be56dff1a10438120a","title":"\"Invalid Cerebras API key\"","url":"/docs/getting-started/providers/cerebras#invalid-cerebras-api-key","content":"`bash","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"\"Invalid Cerebras API key\"","lvl3":""}},
5432
5432
  {"objectID":"1dd703d4cc118d7afbab83843af03af9886728f3bab92272cace22e9463fa0e7","title":"and shell transcripts retain echoed values):","url":"/docs/getting-started/providers/cerebras#and-shell-transcripts-retain-echoed-values","content":"test -n \"$CEREBRASAPIKEY\" && echo \"CEREBRASAPIKEY is set\" || echo \"CEREBRASAPIKEY is missing\"\n\n\n\nGet / rotate at [https://cloud.cerebras.ai](https://cloud.cerebras.ai).\nA bad key returns 401 with \"code\": \"wrongapikey\"`, which NeuroLink\nmaps to this message.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"and shell transcripts retain echoed values):","lvl3":""}},
5433
5433
  {"objectID":"507c596f6b7d8b9e2bd492f28a01def0e63693105d3057dda54079bc94e63478","title":"402 payment_required on every call","url":"/docs/getting-started/providers/cerebras#402-payment_required-on-every-call","content":"The account has no balance. Cerebras has no keyless free tier: open\nBilling → Credits → ADD CREDITS in the console, choose \"Start with\nlimited free credits\", and save a payment card — the $5 promo credit\nactivates with no charge. Skipping the claim step during onboarding\n(\"SKIP TO CONSOLE\") leaves the balance at $0.00.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"402 payment_required on every call","lvl3":""}},
5434
5434
  {"objectID":"87ba20ffd62f6d99291ed1b32232cafab1ea70cfc060f5a59ea5e374b16de169","title":"Empty content with small maxTokens on gpt-oss-120b","url":"/docs/getting-started/providers/cerebras#empty-content-with-small-maxtokens-on-gpt-oss-120b","content":"gpt-oss-120b is a reasoning model: it spends its first tokens on a\nreasoning channel before emitting content. With a tight budget\n(e.g. maxTokens: 50) the entire budget goes to reasoning,\nfinish_reason is length, and content is empty. Give reasoning\nprompts a few hundred tokens of headroom.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"Empty content with small maxTokens on gpt-oss-120b","lvl3":""}},
5435
- {"objectID":"12792b087dafedbd6d724cb4cfd2f5365fcea8da18d2d14493ff688b79efda80","title":"404 \"model not found\" for llama/qwen models","url":"/docs/getting-started/providers/cerebras#404-model-not-found-for-llamaqwen-models","content":"Those models are retired. The live roster is gpt-oss-120b and\ngemma-4-31b only — verify with an authenticated\nGET https://api.cerebras.ai/v1/models.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"404 \"model not found\" for llama/qwen models","lvl3":""}},
5435
+ {"objectID":"12792b087dafedbd6d724cb4cfd2f5365fcea8da18d2d14493ff688b79efda80","title":"404 \"model not found\" for llama/qwen models","url":"/docs/getting-started/providers/cerebras#404-model-not-found-for-llamaqwen-models","content":"Those models are retired, and so is gemma-4-31b. The catalog carries\ngpt-oss-120b only — verify the live roster with an authenticated\nGET https://api.cerebras.ai/v1/models.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"404 \"model not found\" for llama/qwen models","lvl3":""}},
5436
5436
  {"objectID":"c122483695ccba53489f6d1403f7b78fa2f9d48c9a35220e08425516b5521183","title":"See Also","url":"/docs/getting-started/providers/cerebras#see-also","content":"Groq Provider — sibling speed-focused OpenAI-compat provider\nxAI Grok Provider — sibling OpenAI-compat with Grok 3\nTier 2 catalog entry guide — how this provider is wired internally\n\nNeed Help? Open a GitHub Discussion or issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cerebras Provider Guide","lvl2":"See Also","lvl3":""}},
5437
5437
  {"objectID":"3803b4ecde578f946b8a4fe5139e3ee640d53281541c50578e8a5d47847d5157","title":"Cloudflare Workers AI Provider Guide","url":"/docs/getting-started/providers/cloudflare","content":"Cloudflare Workers AI Provider Guide\n\nOpen-model inference at the edge via Cloudflare Workers AI\n\nOverview\n\nCloudflare Workers AI\nserves Meta Llama, Mistral, and other open models from Cloudflare's\nglobal GPU cluster. NeuroLink talks to the OpenAI-compatible endpoint.\n\nKey Facts\nProtocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1\nDefault model: @cf/meta/llama-3.3-70b-instruct-fp8-fast\nStreaming: Yes\nTool calling: Limited (model-dependent)\n\nQuick Start\nGet Credentials\n\nYou need both:\nA Cloudflare Account ID (Cloudflare dashboard → right sidebar)\nA Workers AI API token with the Workers AI Read & Write\n permission (Profile → API Tokens → Create Token)\nConfigure\nGenerate\n\nSupported Models (sample)\n\n| Model ID | Notes |\n| ------------------------------------------ | -------------- |\n| @cf/meta/llama-3.3-70b-instruct-fp8-fast | Default |\n| @cf/meta/llama-3.1-70b-instruct | Llama 3.1 70B |\n| @cf/meta/llama-3.1-8b-instruct | Fast tier |\n| @cf/meta/llama-3.2-11b-vision-instruct | Vision-capable |\n\nBrowse: https://developers.cloudflare.com/workers-ai/models\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ------------ | ----------------------- |\n| cloudflare | --provider cloudflare |\n| cf | --provider cf |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default |\n| ----------------------- | -------- | ------------------------------------------ |\n| CLOUDFLARE_ACCOUNT_ID | Yes | — |\n| CLOUDFLARE_API_KEY | Yes | — |\n| CLOUDFLARE_MODEL | No | @cf/meta/llama-3.3-70b-instruct-fp8-fast |\n\nSee Also\nTogether AI Provider\nFireworks Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Workers AI Provider Guide","lvl2":"","lvl3":""}},
5438
5438
  {"objectID":"aafa1a6f2adf2bacc5661cf9ccb309d1e32e300645f037c35a98217b31eb15df","title":"Cloudflare Workers AI Provider Guide","url":"/docs/getting-started/providers/cloudflare#cloudflare-workers-ai-provider-guide","content":"Open-model inference at the edge via Cloudflare Workers AI","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Workers AI Provider Guide","lvl2":"Cloudflare Workers AI Provider Guide","lvl3":""}},
@@ -5566,14 +5566,14 @@
5566
5566
  {"objectID":"293d0cf78c8b91321aaea4539752c75c5d23b0f630e75d8c039fa5b10759fbd8","title":"Voice not found","url":"/docs/getting-started/providers/elevenlabs#voice-not-found","content":"You passed a voice ID that does not exist in your account. List available voices to confirm:","hierarchy":{"lvl0":"Getting Started","lvl1":"ElevenLabs Provider Guide","lvl2":"Voice not found","lvl3":""}},
5567
5567
  {"objectID":"a8f667c71e278a2fbdf507c9d16d18418a74fc97ae593129deaa675058c728f5","title":"\"Failed to get voices\"","url":"/docs/getting-started/providers/elevenlabs#failed-to-get-voices","content":"Voice discovery failed (network error or invalid key). The 5-minute cache shields against transient failures, but a hard failure at startup will propagate. Ensure ELEVENLABS_API_KEY is valid and the ElevenLabs API is reachable.","hierarchy":{"lvl0":"Getting Started","lvl1":"ElevenLabs Provider Guide","lvl2":"\"Failed to get voices\"","lvl3":""}},
5568
5568
  {"objectID":"58ee78d9a6be3099cc23a438c6255e483cabb54fdd59e63c6d9de2a3e10068ad","title":"See Also","url":"/docs/getting-started/providers/elevenlabs#see-also","content":"TTS Integration Guide — complete multi-provider TTS reference\nOpenAI TTS Provider Guide — alternative TTS provider\nAudio Input (STT) — speech-to-text counterpart\nVoice Agent Guide — building full voice assistants\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"ElevenLabs Provider Guide","lvl2":"See Also","lvl3":""}},
5569
- {"objectID":"b1184b197b42e32c5be5fb34fb171453c9691187c6fd632ea6ee2ffc096329ad","title":"Fireworks AI Provider Guide","url":"/docs/getting-started/providers/fireworks","content":"Fireworks AI Provider Guide\n\nOpen-model inference tuned for low-latency production workloads\n\nOverview\n\nFireworks AI hosts Llama, DeepSeek, Mixtral,\nQwen, and other open models with aggressive throughput optimizations.\nNeuroLink talks to the OpenAI-compatible endpoint at api.fireworks.ai.\n\nKey Facts\nProtocol: OpenAI-compatible (/inference/v1/chat/completions)\nDefault base URL: https://api.fireworks.ai/inference/v1\nDefault model: accounts/fireworks/models/llama-v3p3-70b-instruct\nStreaming: Yes\nTool calling: Yes (model-dependent)\n\nQuick Start\nGet an API Key\n\nhttps://fireworks.ai/account/api-keys\nConfigure Environment\nGenerate\n\nSupported Models (sample)\n\n| Model ID | Notes |\n| ---------------------------------------------------- | --------- |\n| accounts/fireworks/models/llama-v3p3-70b-instruct | Default |\n| accounts/fireworks/models/llama-v3p1-405b-instruct | Flagship |\n| accounts/fireworks/models/deepseek-r1 | Reasoning |\n| accounts/fireworks/models/mixtral-8x22b-instruct | MoE |\n\nBrowse: https://fireworks.ai/models\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ----------- | ---------------------- |\n| fireworks | --provider fireworks |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default |\n| -------------------- | -------- | --------------------------------------------------- |\n| FIREWORKS_API_KEY | Yes | — |\n| FIREWORKS_MODEL | No | accounts/fireworks/models/llama-v3p3-70b-instruct |\n| FIREWORKS_BASE_URL | No | https://api.fireworks.ai/inference/v1 |\n\nTroubleshooting\nModel not found, inaccessible, and/or not deployed — your account\n has not deployed the requested model. Check\n https://fireworks.ai/models and either\n deploy it or pick a serverless one.\n\nSee Also\nTogether AI Provider\nGroq Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"","lvl3":""}},
5569
+ {"objectID":"b1184b197b42e32c5be5fb34fb171453c9691187c6fd632ea6ee2ffc096329ad","title":"Fireworks AI Provider Guide","url":"/docs/getting-started/providers/fireworks","content":"Fireworks AI Provider Guide\n\nOpen-model inference tuned for low-latency production workloads\n\nOverview\n\nFireworks AI hosts Kimi, GPT-OSS, Qwen, GLM and\nother open models with aggressive throughput optimizations.\nNeuroLink talks to the OpenAI-compatible endpoint at api.fireworks.ai.\n\nKey Facts\nProtocol: OpenAI-compatible (/inference/v1/chat/completions)\nDefault base URL: https://api.fireworks.ai/inference/v1\nDefault model: accounts/fireworks/models/kimi-k3 (vision-capable)\nStreaming: Yes\nTool calling: Yes (model-dependent)\n\nQuick Start\nGet an API Key\n\nhttps://fireworks.ai/account/api-keys\nConfigure Environment\nGenerate\n\nSupported Models (sample)\n\n| Model ID | Vision | Notes |\n| ---------------------------------------- | ------ | ----------------------------------- |\n| accounts/fireworks/models/kimi-k3 | Yes | Default — newest Moonshot flagship |\n| accounts/fireworks/models/gpt-oss-120b | No | Text fallback (fallbackModelName) |\n| accounts/fireworks/models/qwen3p8-max | Yes | Qwen flagship |\n| accounts/fireworks/models/glm-5p3 | No | Rejects image inputs |\n\nFireworks lists models on /models that are not deployed for serverless\nuse, so the catalog only keeps ids that answered a real chat call.\nkimi-k2p6, the default until September 2026, now returns 404\nnot deployed and is retired.\n\nBrowse: https://fireworks.ai/models\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ----------- | ---------------------- |\n| fireworks | --provider fireworks |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default |\n| -------------------- | -------- | --------------------------------------- |\n| FIREWORKS_API_KEY | Yes | — |\n| FIREWORKS_MODEL | No | accounts/fireworks/models/kimi-k3 |\n| FIREWORKS_BASE_URL | No | https://api.fireworks.ai/inference/v1 |\n\nTroubleshooting\nModel not found, inaccessible, and/or not deployed — your account\n has not deployed the requested model. Check\n https://fireworks.ai/models and either\n deploy it or pick a serverless one.\n\nSee Also\nTogether AI Provider\nGroq Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"","lvl3":""}},
5570
5570
  {"objectID":"05cd5f1dffdb316d6e5f1b3ff86da591b78de22e32dc78ccf67aa1f40d59597d","title":"Fireworks AI Provider Guide","url":"/docs/getting-started/providers/fireworks#fireworks-ai-provider-guide","content":"Open-model inference tuned for low-latency production workloads","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Fireworks AI Provider Guide","lvl3":""}},
5571
- {"objectID":"ce4faa67b07a31fda18f8df2e44a84161502930a7c7bda3806406447212d3b32","title":"Overview","url":"/docs/getting-started/providers/fireworks#overview","content":"Fireworks AI hosts Llama, DeepSeek, Mixtral,\nQwen, and other open models with aggressive throughput optimizations.\nNeuroLink talks to the OpenAI-compatible endpoint at api.fireworks.ai.","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Overview","lvl3":""}},
5572
- {"objectID":"cf82705a9b6b783a7d82e376fcee6d19120c08d1bbdf1df8b01a319dda22d70f","title":"Key Facts","url":"/docs/getting-started/providers/fireworks#key-facts","content":"Protocol: OpenAI-compatible (/inference/v1/chat/completions)\nDefault base URL: https://api.fireworks.ai/inference/v1\nDefault model: accounts/fireworks/models/llama-v3p3-70b-instruct\nStreaming: Yes\nTool calling: Yes (model-dependent)","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Key Facts","lvl3":""}},
5571
+ {"objectID":"ce4faa67b07a31fda18f8df2e44a84161502930a7c7bda3806406447212d3b32","title":"Overview","url":"/docs/getting-started/providers/fireworks#overview","content":"Fireworks AI hosts Kimi, GPT-OSS, Qwen, GLM and\nother open models with aggressive throughput optimizations.\nNeuroLink talks to the OpenAI-compatible endpoint at api.fireworks.ai.","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Overview","lvl3":""}},
5572
+ {"objectID":"cf82705a9b6b783a7d82e376fcee6d19120c08d1bbdf1df8b01a319dda22d70f","title":"Key Facts","url":"/docs/getting-started/providers/fireworks#key-facts","content":"Protocol: OpenAI-compatible (/inference/v1/chat/completions)\nDefault base URL: https://api.fireworks.ai/inference/v1\nDefault model: accounts/fireworks/models/kimi-k3 (vision-capable)\nStreaming: Yes\nTool calling: Yes (model-dependent)","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Key Facts","lvl3":""}},
5573
5573
  {"objectID":"2553a96780b52ca185305c8520070d1ffd546668722c2fa9dfb470e2883fa9ef","title":"1. Get an API Key","url":"/docs/getting-started/providers/fireworks#1-get-an-api-key","content":"https://fireworks.ai/account/api-keys","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"1. Get an API Key","lvl3":""}},
5574
- {"objectID":"f08aab0c7818717d789d878d66a349766820749c3296c011c8c3f35782e63a12","title":"Supported Models (sample)","url":"/docs/getting-started/providers/fireworks#supported-models-sample","content":"| Model ID | Notes |\n| ---------------------------------------------------- | --------- |\n| accounts/fireworks/models/llama-v3p3-70b-instruct | Default |\n| accounts/fireworks/models/llama-v3p1-405b-instruct | Flagship |\n| accounts/fireworks/models/deepseek-r1 | Reasoning |\n| accounts/fireworks/models/mixtral-8x22b-instruct | MoE |\n\nBrowse: https://fireworks.ai/models","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Supported Models (sample)","lvl3":""}},
5574
+ {"objectID":"f08aab0c7818717d789d878d66a349766820749c3296c011c8c3f35782e63a12","title":"Supported Models (sample)","url":"/docs/getting-started/providers/fireworks#supported-models-sample","content":"| Model ID | Vision | Notes |\n| ---------------------------------------- | ------ | ----------------------------------- |\n| accounts/fireworks/models/kimi-k3 | Yes | Default — newest Moonshot flagship |\n| accounts/fireworks/models/gpt-oss-120b | No | Text fallback (fallbackModelName) |\n| accounts/fireworks/models/qwen3p8-max | Yes | Qwen flagship |\n| accounts/fireworks/models/glm-5p3 | No | Rejects image inputs |\n\nFireworks lists models on /models that are not deployed for serverless\nuse, so the catalog only keeps ids that answered a real chat call.\nkimi-k2p6, the default until September 2026, now returns 404\nnot deployed and is retired.\n\nBrowse: https://fireworks.ai/models","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Supported Models (sample)","lvl3":""}},
5575
5575
  {"objectID":"1c6ba5220686d63b86ed6da5aeaff8ad54a0e33503a1f3dfd9bafd095e446665","title":"Provider Aliases","url":"/docs/getting-started/providers/fireworks#provider-aliases","content":"| Alias | Example |\n| ----------- | ---------------------- |\n| fireworks | --provider fireworks |","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Provider Aliases","lvl3":""}},
5576
- {"objectID":"0fd84fcdee093aae5dd076045f0363115b84752fb19939ed867be53ec42e7c0e","title":"Configuration Reference","url":"/docs/getting-started/providers/fireworks#configuration-reference","content":"| Environment Variable | Required | Default |\n| -------------------- | -------- | --------------------------------------------------- |\n| FIREWORKS_API_KEY | Yes | — |\n| FIREWORKS_MODEL | No | accounts/fireworks/models/llama-v3p3-70b-instruct |\n| FIREWORKS_BASE_URL | No | https://api.fireworks.ai/inference/v1 |","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Configuration Reference","lvl3":""}},
5576
+ {"objectID":"0fd84fcdee093aae5dd076045f0363115b84752fb19939ed867be53ec42e7c0e","title":"Configuration Reference","url":"/docs/getting-started/providers/fireworks#configuration-reference","content":"| Environment Variable | Required | Default |\n| -------------------- | -------- | --------------------------------------- |\n| FIREWORKS_API_KEY | Yes | — |\n| FIREWORKS_MODEL | No | accounts/fireworks/models/kimi-k3 |\n| FIREWORKS_BASE_URL | No | https://api.fireworks.ai/inference/v1 |","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Configuration Reference","lvl3":""}},
5577
5577
  {"objectID":"1641ff26216c6b6cb208d2dd83700286afa7680efcbb7f24cc5d63382b705f6c","title":"Troubleshooting","url":"/docs/getting-started/providers/fireworks#troubleshooting","content":"Model not found, inaccessible, and/or not deployed — your account\n has not deployed the requested model. Check\n https://fireworks.ai/models and either\n deploy it or pick a serverless one.","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
5578
5578
  {"objectID":"016bd37da784e68632e7632baf2ff92d35b9746cf85268f4e9f1007576898945","title":"See Also","url":"/docs/getting-started/providers/fireworks#see-also","content":"Together AI Provider\nGroq Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Fireworks AI Provider Guide","lvl2":"See Also","lvl3":""}},
5579
5579
  {"objectID":"158e1aff9458883a351d80f993d03d24e7fe73c454666523ed2366580ccb5b30","title":"Fish Audio TTS Provider Guide","url":"/docs/getting-started/providers/fish-audio","content":"Fish Audio TTS Provider Guide\n\nLow-cost text-to-speech — S2 Pro voice cloning, multilingual, ~80%\ncheaper than ElevenLabs\n\nOverview\n\nFish Audio is a low-cost TTS provider focused on voice cloning. NeuroLink\nwraps it as a TTSHandler so it slots into the same\ngenerate({ tts: { provider: \"fish-audio\" } }) flow as OpenAI / ElevenLabs / Azure / Google AI TTS.\nLatest model: s1 (default) — best quality\nspeech-1.6, speech-1.5 — older / cheaper models\nVoice cloning: 15s of reference audio → custom voice id\nLanguages: 14 (English, Mandarin, Cantonese, Japanese, Korean,\n French, German, Spanish, Italian, Portuguese, Russian, Arabic, Hindi,\n Indonesian)\n\nKey Facts\nProtocol: Native REST API (POST /v1/tts)\nDefault base URL: https://api.fish.audio\nDefault model: s1\nDefault voice (reference_id): fb6c0e1ea91e427fb9a93b9bbf0a1e4d (Generic Female / English)\nMax text length: 5000 characters\nOutput formats: mp3 (default), wav, pcm16 (raw 16-bit PCM @ 44.1 kHz)\nStreaming: Not implemented in this handler (synchronous synthesis only)\n\nQuick Start\nGet an API Key\n\nSign up at https://fish.audio/ and create an API\nkey from the dashboard.\nConfigure Environment\nSynthesize Your First Audio\n\nSDK Usage\n\nBasic Synthesis (Default Voice)\n\nCustom Voice (Voice Cloning)\n\nGet a reference_id from your Fish Audio dashboard after uploading 15s\nof reference audio:\n\nTTS-Augmented LLM Response\n\nWhen useAiResponse: true, NeuroLink first calls the LLM, then\nsynthesizes the LLM output through Fish Audio:\n\nWAV / PCM16 Output\n\nPer-Call Credentials\n\nCLI Usage\n\nConfiguration Reference\n\n| Environment Variable | Required | Default | Description |\n| --------------------- | -------- | ---------------------------------- | -------------------------- |\n| FISH_AUDIO_API_KEY | Yes | — | Fish Audio API key |\n| FISH_AUDIO_VOICE_ID | No | fb6c0e1ea91e427fb9a93b9bbf0a1e4d | Default reference_id voice |\n| FISH_AUDIO_BASE_URL | No | https://api.fish.audio | Base URL |\n\nVoice Models\n\n| Model | Notes |\n| ------------ | ------------------------------ |\n| s1 | Latest, best quality (default) |\n| speech-1.6 | Previous flagship |\n| speech-1.5 | Older / cheaper |\n\nVoices are identified by reference_id strings from the Fish library.\nBrowse and clone voices in your Fish Audio dashboard.\n\nFeature Support Matrix\n\n| Feature | Fish Audio |\n| -------------- | --------------------- |\n| Text-to-speech | Yes |\n| Voice cloning | Yes (15s reference) |\n| Multilingual | Yes (14 languages) |\n| MP3 output | Yes |\n| WAV output | Yes (44.1 kHz) |\n| PCM16 output | Yes (raw, no RIFF) |\n| OPUS output | Falls back to MP3 |\n| Streaming | No (synchronous only) |\n| getVoices() | Not implemented |\n\nTroubleshooting\n\n\"Invalid Fish Audio API key\"\n\nGet / rotate at https://fish.audio/.\n\n\"Fish Audio rate limit exceeded\"\n\nFree tier has hourly limits. Upgrade your plan or implement exponential\nbackoff. The handler maps 408 / 429 / 5xx to retriable errors.\n\n\"Fish Audio synthesis failed: 422\"\n\nUsually means the reference_id is invalid or the text is too long\n(>5000 chars). Truncate the text or check the voice id in your dashboard.\n\nAudio sounds robotic / low quality\n\nTry a higher-quality model (model: \"s1\" if you're on speech-1.5) or\nclone your own reference voice from a 15s clean audio sample. Default\nvoices are generic — voice-cloned reference_ids almost always sound\nbetter.\n\n\"PCM16 output is unplayable in audio players\"\n\npcm16 is RAW samples, not WAV — players need a header. To play, write\na WAV header yourself (44 bytes) before the PCM data, or use the wav\nformat which produces a complete RIFF/WAV file.\n\nSee Also\nTTS Feature Guide — overall TTS architecture and supported providers\nElevenLabs TTS — sibling TTS provider with the largest voice library\nOpenAI TTS — sibling TTS provider with tts-1 / tts-1-hd\nAdding a TTS provider — internal reference for the integration pattern\n\nNeed Help? Open a GitHub Discussion or issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"Fish Audio TTS Provider Guide","lvl2":"","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.37.4",
3
+ "version": "12.37.5",
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": {