@juspay/neurolink 12.29.1 → 12.29.2

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.
@@ -74,7 +74,8 @@
74
74
  }
75
75
  ],
76
76
  "quirks": {
77
- "responseFormatDowngrade": "json-schema-to-json-object"
77
+ "responseFormatDowngrade": "json-schema-to-json-object",
78
+ "replayReasoningContent": true
78
79
  },
79
80
  "setup": {
80
81
  "url": "https://platform.deepseek.com/api_keys",
@@ -158,6 +158,9 @@ export function buildCatalogEntries() {
158
158
  if (entry.quirks?.responseFormatDowngrade) {
159
159
  base.responseFormatDowngrade = entry.quirks.responseFormatDowngrade;
160
160
  }
161
+ if (entry.quirks?.replayReasoningContent) {
162
+ base.replayReasoningContent = true;
163
+ }
161
164
  return base;
162
165
  });
163
166
  }
@@ -280,6 +280,10 @@
280
280
  "type": "string",
281
281
  "enum": ["json-schema-to-json-object"],
282
282
  "description": "Vendor rejects response_format: { type: \"json_schema\" } outright but accepts { type: \"json_object\" }. ConfiguredOpenAICompatProvider downgrades the request so generate({ schema }) keeps working."
283
+ },
284
+ "replayReasoningContent": {
285
+ "type": "boolean",
286
+ "description": "Vendor wants each assistant turn's reasoning_content sent back on every later request of the conversation (DeepSeek documents a 400 without it once tools are in play). Off for every other provider, since strict OpenAI-compatible backends reject the unknown field."
283
287
  }
284
288
  }
285
289
  },
@@ -85,6 +85,7 @@ export declare const providerCatalogJsonSchema: z.ZodObject<{
85
85
  messageContentFormat: z.ZodOptional<z.ZodLiteral<"string">>;
86
86
  registryDefaultIgnoresModelEnvVar: z.ZodOptional<z.ZodBoolean>;
87
87
  responseFormatDowngrade: z.ZodOptional<z.ZodLiteral<"json-schema-to-json-object">>;
88
+ replayReasoningContent: z.ZodOptional<z.ZodBoolean>;
88
89
  }, z.core.$strict>>;
89
90
  timeouts: z.ZodOptional<z.ZodObject<{
90
91
  generateMs: z.ZodOptional<z.ZodNumber>;
@@ -140,6 +140,7 @@ const catalogQuirksSchema = z.strictObject({
140
140
  messageContentFormat: z.literal("string").optional(),
141
141
  registryDefaultIgnoresModelEnvVar: z.boolean().optional(),
142
142
  responseFormatDowngrade: z.literal("json-schema-to-json-object").optional(),
143
+ replayReasoningContent: z.boolean().optional(),
143
144
  });
144
145
  const catalogTimeoutsSchema = z.strictObject({
145
146
  generateMs: z.number().optional(),
@@ -57,5 +57,6 @@ export declare class ConfiguredOpenAICompatProvider extends OpenAIChatCompletion
57
57
  supportsTools(): boolean;
58
58
  protected adjustRequestBody(body: OpenAICompatChatRequest, modelId: string): OpenAICompatChatRequest;
59
59
  protected adjustResponseFormat(rf: OpenAICompatResponseFormat | undefined, modelId: string): OpenAICompatResponseFormat | undefined;
60
+ protected replayReasoningContent(): boolean;
60
61
  protected formatProviderError(error: unknown): Error;
61
62
  }
@@ -130,6 +130,9 @@ export class ConfiguredOpenAICompatProvider extends OpenAIChatCompletionsProvide
130
130
  }
131
131
  return super.adjustResponseFormat(rf, modelId);
132
132
  }
133
+ replayReasoningContent() {
134
+ return this.entry.replayReasoningContent === true;
135
+ }
133
136
  formatProviderError(error) {
134
137
  // classifyProviderError hard-codes TimeoutError -> NetworkError ahead
135
138
  // of any rule table and does not allow a per-provider override. An
@@ -102,6 +102,14 @@ export declare abstract class OpenAIChatCompletionsProvider extends BaseProvider
102
102
  * deliberately. LiteLLM overrides this to true.
103
103
  */
104
104
  protected useStreamingWireForGenerate(): boolean;
105
+ /**
106
+ * When true, an assistant turn's reasoning goes back to the vendor as
107
+ * `reasoning_content` on every later request of the conversation. DeepSeek
108
+ * documents this as required once tools are in play and answers 400
109
+ * without it. Default false: strict OpenAI-compatible backends reject a
110
+ * field they don't know. Read per request, never during construction.
111
+ */
112
+ protected replayReasoningContent(): boolean;
105
113
  /**
106
114
  * Hook to adjust the fully-built wire request body before it is sent, on
107
115
  * both the streaming and non-streaming paths. Default identity. Override for
@@ -262,6 +262,16 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
262
262
  useStreamingWireForGenerate() {
263
263
  return false;
264
264
  }
265
+ /**
266
+ * When true, an assistant turn's reasoning goes back to the vendor as
267
+ * `reasoning_content` on every later request of the conversation. DeepSeek
268
+ * documents this as required once tools are in play and answers 400
269
+ * without it. Default false: strict OpenAI-compatible backends reject a
270
+ * field they don't know. Read per request, never during construction.
271
+ */
272
+ replayReasoningContent() {
273
+ return false;
274
+ }
265
275
  /**
266
276
  * Hook to adjust the fully-built wire request body before it is sent, on
267
277
  * both the streaming and non-streaming paths. Default identity. Override for
@@ -542,6 +552,7 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
542
552
  const resolveWireMaxTokens = this.resolveWireMaxTokens.bind(this);
543
553
  const suppressResponseFormatWithTools = this.suppressResponseFormatWithTools.bind(this);
544
554
  const useStreamingWireForGenerate = this.useStreamingWireForGenerate.bind(this);
555
+ const replayReasoningContent = this.replayReasoningContent.bind(this);
545
556
  const getTimeoutForOptions = (opts) => this.getTimeout((opts ?? {}));
546
557
  return {
547
558
  specificationVersion: "v3",
@@ -555,7 +566,7 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
555
566
  const wireNameMaps = buildWireToolNameMaps((options.tools ?? [])
556
567
  .filter((t) => t.type === "function")
557
568
  .map((t) => t.name));
558
- const baseMessages = messageBuilderToOpenAI(options.prompt, wireNameMaps?.toWire);
569
+ const baseMessages = messageBuilderToOpenAI(options.prompt, wireNameMaps?.toWire, replayReasoningContent());
559
570
  const hasTools = Array.isArray(options.tools) && options.tools.length > 0;
560
571
  const responseFormat = options.responseFormat &&
561
572
  !(hasTools && suppressResponseFormatWithTools())
@@ -1657,7 +1668,7 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
1657
1668
  const transformedPrompt = Array.isArray(params?.prompt)
1658
1669
  ? params.prompt
1659
1670
  : promptMessages;
1660
- const conversation = messageBuilderToOpenAI(transformedPrompt, wireNameMaps?.toWire);
1671
+ const conversation = messageBuilderToOpenAI(transformedPrompt, wireNameMaps?.toWire, this.replayReasoningContent());
1661
1672
  loopConversation = conversation;
1662
1673
  const sampled = {
1663
1674
  ...options,
@@ -2171,6 +2182,9 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
2171
2182
  role: "assistant",
2172
2183
  content: stepResult.text.length > 0 ? stepResult.text : null,
2173
2184
  tool_calls: toolCallsForMessage,
2185
+ ...(this.replayReasoningContent() && stepResult.reasoning
2186
+ ? { reasoning_content: stepResult.reasoning }
2187
+ : {}),
2174
2188
  });
2175
2189
  for (const [, t] of stepResult.toolCalls) {
2176
2190
  const startedAt = new Date();
@@ -48,7 +48,7 @@ export declare const stringifyToolInput: (input: unknown) => string;
48
48
  export declare const stringifyToolOutput: (output: unknown) => string;
49
49
  export declare const imageDataToURL: (data: unknown, mediaType?: string) => string | undefined;
50
50
  export declare const convertContentForOpenAI: (content: unknown) => string | OpenAICompatMessageContent[];
51
- export declare const messageBuilderToOpenAI: (messages: ReadonlyArray<OpenAICompatMessage>, toolNameToWire?: Map<string, string>) => OpenAICompatChatMessage[];
51
+ export declare const messageBuilderToOpenAI: (messages: ReadonlyArray<OpenAICompatMessage>, toolNameToWire?: Map<string, string>, replayReasoning?: boolean) => OpenAICompatChatMessage[];
52
52
  export declare const buildToolsForOpenAI: (tools: Record<string, Tool>, toolNameToWire?: Map<string, string>) => OpenAICompatChatTool[] | undefined;
53
53
  export declare const v3ToolsToOpenAI: (tools: OpenAICompatV3CallTools | undefined, toolNameToWire?: Map<string, string>) => OpenAICompatChatTool[] | undefined;
54
54
  export declare const v3ToolChoiceToOpenAI: (choice: OpenAICompatV3CallToolChoice, toolNameToWire?: Map<string, string>) => OpenAICompatToolChoiceWire | undefined;
@@ -96,6 +96,11 @@ export const estimateWireTokens = (messages, tools, provider) => {
96
96
  if (toolCalls) {
97
97
  total += estimateTokens(safeStringify(toolCalls), provider);
98
98
  }
99
+ const reasoning = message
100
+ .reasoning_content;
101
+ if (reasoning) {
102
+ total += estimateTokens(reasoning, provider);
103
+ }
99
104
  }
100
105
  if (tools && tools.length > 0) {
101
106
  total += estimateTokens(safeStringify(tools), provider);
@@ -242,7 +247,7 @@ export const convertContentForOpenAI = (content) => {
242
247
  }
243
248
  return out;
244
249
  };
245
- export const messageBuilderToOpenAI = (messages, toolNameToWire) => {
250
+ export const messageBuilderToOpenAI = (messages, toolNameToWire, replayReasoning = false) => {
246
251
  const out = [];
247
252
  for (const msg of messages) {
248
253
  switch (msg.role) {
@@ -264,10 +269,14 @@ export const messageBuilderToOpenAI = (messages, toolNameToWire) => {
264
269
  const parts = Array.isArray(msg.content) ? msg.content : [msg.content];
265
270
  const text = [];
266
271
  const toolCalls = [];
272
+ const reasoning = [];
267
273
  for (const part of parts) {
268
274
  if (part && typeof part === "object") {
269
275
  const p = part;
270
- if (p.type === "text") {
276
+ if (p.type === "reasoning") {
277
+ reasoning.push(part.text ?? "");
278
+ }
279
+ else if (p.type === "text") {
271
280
  text.push({
272
281
  type: "text",
273
282
  text: part.text ?? "",
@@ -297,10 +306,12 @@ export const messageBuilderToOpenAI = (messages, toolNameToWire) => {
297
306
  : text.length === 1 && text[0].type === "text"
298
307
  ? text[0].text
299
308
  : text;
309
+ const reasoningContent = replayReasoning ? reasoning.join("") : "";
300
310
  out.push({
301
311
  role: "assistant",
302
312
  content: flat,
303
313
  ...(toolCalls.length > 0 ? { tool_calls: toolCalls } : {}),
314
+ ...(reasoningContent ? { reasoning_content: reasoningContent } : {}),
304
315
  });
305
316
  break;
306
317
  }
@@ -34,6 +34,9 @@ export type OpenAICompatChatMessage = {
34
34
  role: "assistant";
35
35
  content?: string | OpenAICompatMessageContent[] | null;
36
36
  tool_calls?: OpenAICompatToolCallWire[];
37
+ /** The turn's reasoning, sent back only where the catalog opts in
38
+ * (DeepSeek's replayReasoningContent quirk). */
39
+ reasoning_content?: string;
37
40
  } | {
38
41
  role: "tool";
39
42
  content: string;
@@ -73,6 +73,11 @@ export type CatalogQuirks = {
73
73
  * ConfiguredOpenAICompatProvider so `generate({ schema })` keeps working
74
74
  * (mirrors the pre-catalog `supportsStructuredOutputs: false` behavior). */
75
75
  responseFormatDowngrade?: "json-schema-to-json-object";
76
+ /** Vendor wants each assistant turn's `reasoning_content` sent back on
77
+ * every later request of the conversation (DeepSeek documents a 400
78
+ * without it once tools are in play). ConfiguredOpenAICompatProvider
79
+ * turns on the replay; every other provider leaves the field off. */
80
+ replayReasoningContent?: boolean;
76
81
  };
77
82
  export type CatalogBillingPolicy = "free-tier" | "free-with-card" | "no-free-tier";
78
83
  export type CatalogSetup = {
@@ -798,6 +798,9 @@ export type OpenAICompatCatalogEntry = {
798
798
  * `response_format: { type: "json_schema" }` but accepts
799
799
  * `{ type: "json_object" }`. */
800
800
  responseFormatDowngrade?: "json-schema-to-json-object";
801
+ /** See CatalogQuirks.replayReasoningContent — a vendor that wants each
802
+ * assistant turn's `reasoning_content` sent back on later requests. */
803
+ replayReasoningContent?: boolean;
801
804
  };
802
805
  /** The subset of OpenAICompatCatalogEntry that resolveOpenAICompatConfig()
803
806
  * needs — lets call sites pass a minimal object without the full catalog
@@ -5474,7 +5474,7 @@
5474
5474
  {"objectID":"a0720e2017f4d4189cdb29848c4023c40b9e66f58fca8fd88d41ce87a1ab783f","title":"Streaming WebSocket disconnects","url":"/docs/getting-started/providers/deepgram#streaming-websocket-disconnects","content":"Check that is valid and that your network allows outbound WebSocket connections to . Firewall or proxy configurations may block WebSocket upgrades.","hierarchy":{"lvl0":"Getting Started","lvl1":"Deepgram Provider Guide","lvl2":"Streaming WebSocket disconnects","lvl3":""}},
5475
5475
  {"objectID":"27de57f1a55130cc5f2cf7e470801eff52bf6a056c6e29e62498f7a441b22a3a","title":"Diarization not appearing in results","url":"/docs/getting-started/providers/deepgram#diarization-not-appearing-in-results","content":"Diarization requires multi-speaker audio with clearly separated voices. Single-speaker audio will return no speaker labels. Also confirm is set, and that you are using a model that supports it (Nova-2 and above).","hierarchy":{"lvl0":"Getting Started","lvl1":"Deepgram Provider Guide","lvl2":"Diarization not appearing in results","lvl3":""}},
5476
5476
  {"objectID":"b7d80419b846034a24796f9bc7f22b7458c21238354ae728c236e8c0573e5dd2","title":"See Also","url":"/docs/getting-started/providers/deepgram#see-also","content":"Audio Input (STT) Guide — complete multi-provider STT reference\nVoice Agent Guide — building full voice assistants\nOpenAI TTS Provider Guide — text-to-speech counterpart\nElevenLabs Provider Guide — alternative TTS with voice cloning\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"Deepgram Provider Guide","lvl2":"See Also","lvl3":""}},
5477
- {"objectID":"f0011413e792381f4d6131f700afe5f7742598666be073cf1f98530c99fd5138","title":"DeepSeek Provider Guide","url":"/docs/getting-started/providers/deepseek","content":"DeepSeek Provider Guide\n\nText and image input with DeepSeek-V4.1-Flash and DeepSeek-V4-Pro through a single API\n\nOverview\n\nDeepSeek is a Chinese AI research lab offering highly capable open-weight models via a hosted cloud API. NeuroLink wraps their OpenAI-compatible endpoint. The API serves two models:\n— DeepSeek-V4.1-Flash. Reads images as well as text.\n— DeepSeek-V4-Pro-0813. Text only.\n\nThe older ids still work as aliases of : * answers with thinking off, and * answers with thinking on and returns a reasoning trace.\n\nKey Facts\nProtocol: OpenAI-compatible ()\nDefault base URL: \nContext window: 1M tokens (1,048,576), with up to 384K (393,216) output tokens\nVision: and its aliases; not reasoningcontentdeepseek-reasoner.envdeepseek-chatdeepseek-flashdeepseek-reasonerdeepseek-flashdeepseek-flashdeepseek-v4-pro--modelmodel:GET /modelsapi.deepseek.comdeepseek-flashdeepseek-v4-prodeepseek--provider deepseekds--provider dsDEEPSEEKAPIKEYsk-DEEPSEEKMODELdeepseek-chatDEEPSEEKBASEURLhttps://api.deepseek.comdeepseek-chatdeepseek-reasonerdeepseek-flashdeepseek-v4-proDEEPSEEKAPIKEY400deepseek-chatdeepseek-reasonerdeepseek-reasonerdeepseek-flashdeepseek-v4-prodeepseek-chatreasoning_content400deepseek-chat`, which keeps thinking off.\n\nSee Also\nImplementation spec — internal wire-format details and design decisions\nOpenAI Compatible provider — generic provider for any OpenAI-compatible endpoint\nLiteLLM provider — proxy-based multi-provider access\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"","lvl3":""}},
5477
+ {"objectID":"f0011413e792381f4d6131f700afe5f7742598666be073cf1f98530c99fd5138","title":"DeepSeek Provider Guide","url":"/docs/getting-started/providers/deepseek","content":"DeepSeek Provider Guide\n\nText and image input with DeepSeek-V4.1-Flash and DeepSeek-V4-Pro through a single API\n\nOverview\n\nDeepSeek is a Chinese AI research lab offering highly capable open-weight models via a hosted cloud API. NeuroLink wraps their OpenAI-compatible endpoint. The API serves two models:\n— DeepSeek-V4.1-Flash. Reads images as well as text.\n— DeepSeek-V4-Pro-0813. Text only.\n\nThe older ids still work as aliases of : * answers with thinking off, and * answers with thinking on and returns a reasoning trace.\n\nKey Facts\nProtocol: OpenAI-compatible ()\nDefault base URL: \nContext window: 1M tokens (1,048,576), with up to 384K (393,216) output tokens\nVision: and its aliases; not reasoningcontentdeepseek-reasoner.envdeepseek-chatdeepseek-flashdeepseek-reasonerdeepseek-flashdeepseek-flashdeepseek-v4-pro--modelmodel:GET /modelsapi.deepseek.comdeepseek-flashdeepseek-v4-prodeepseek--provider deepseekds--provider dsDEEPSEEKAPIKEYsk-DEEPSEEKMODELdeepseek-chatDEEPSEEKBASEURLhttps://api.deepseek.comdeepseek-chatdeepseek-reasonerdeepseek-flashdeepseek-v4-proDEEPSEEKAPIKEY400deepseek-chatdeepseek-reasonerdeepseek-reasonerdeepseek-flashdeepseek-v4-prodeepseek-chatreasoning_content400quirks.replayReasoningContentgenerate()stream()deepseek-chat` keeps thinking off.\n\nSee Also\nImplementation spec — internal wire-format details and design decisions\nOpenAI Compatible provider — generic provider for any OpenAI-compatible endpoint\nLiteLLM provider — proxy-based multi-provider access\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"","lvl3":""}},
5478
5478
  {"objectID":"958538aa2497f8c0121993c79063ab03a4e9182ad54e8e826fac34ccf66059d2","title":"DeepSeek Provider Guide","url":"/docs/getting-started/providers/deepseek#deepseek-provider-guide","content":"Text and image input with DeepSeek-V4.1-Flash and DeepSeek-V4-Pro through a single API","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"DeepSeek Provider Guide","lvl3":""}},
5479
5479
  {"objectID":"c3e1684d29fb0fb80d0a6c08cccede4c72627e18920573ed08ace68662625d5e","title":"Overview","url":"/docs/getting-started/providers/deepseek#overview","content":"DeepSeek is a Chinese AI research lab offering highly capable open-weight models via a hosted cloud API. NeuroLink wraps their OpenAI-compatible endpoint. The API serves two models:\n— DeepSeek-V4.1-Flash. Reads images as well as text.\n— DeepSeek-V4-Pro-0813. Text only.\n\nThe older ids still work as aliases of : * answers with thinking off, and * answers with thinking on and returns a reasoning trace.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"Overview","lvl3":""}},
5480
5480
  {"objectID":"90018a4be75353babd3c1ed5c9f76895280adfbeaad70cff5718ac9f60d46d88","title":"Key Facts","url":"/docs/getting-started/providers/deepseek#key-facts","content":"Protocol: OpenAI-compatible ()\nDefault base URL: \nContext window: 1M tokens (1,048,576), with up to 384K (393,216) output tokens\nVision: and its aliases; not reasoning_contentdeepseek-reasoner`)","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"Key Facts","lvl3":""}},
@@ -5504,7 +5504,7 @@
5504
5504
  {"objectID":"54989b947cc0840d9d58abc26fce361c1c0c678c2ebef38eb352dc221da6b43c","title":"\"DeepSeek rate limit exceeded\"","url":"/docs/getting-started/providers/deepseek#deepseek-rate-limit-exceeded","content":"Too many requests in a short window. Implement exponential backoff or reduce request concurrency. Rate limits are published in the DeepSeek API docs.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"\"DeepSeek rate limit exceeded\"","lvl3":""}},
5505
5505
  {"objectID":"bcadc6d16aa1af4c9dd5e509db1ee7f587179ae8ca9d98e7240408c739991802","title":"\"Model not found\"","url":"/docs/getting-started/providers/deepseek#model-not-found","content":"DeepSeek answers an unknown id with and \"The supported API model names are deepseek-flash, deepseek-v4-pro\". Use one of those, or the / aliases.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"\"Model not found\"","lvl3":""}},
5506
5506
  {"objectID":"5d6c41711a9d937d9546d0227eee7fce427c5cdff6f8d549cf4e4171ba66b5d7","title":"Slow responses with thinking on","url":"/docs/getting-started/providers/deepseek#slow-responses-with-thinking-on","content":"Expected. , and reason before answering, which adds latency. Use for latency-sensitive paths.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"Slow responses with thinking on","lvl3":""}},
5507
- {"objectID":"b507cb02f53bda7fec320d54c24a3a6d33e5e17bda8fe60622265712c2e59944","title":"Tool calls failing with thinking on","url":"/docs/getting-started/providers/deepseek#tool-calls-failing-with-thinking-on","content":"DeepSeek requires to be sent back on every later request once tools are in play, and returns otherwise (thinking mode guide). For tool-heavy workflows, use , which keeps thinking off.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"Tool calls failing with thinking on","lvl3":""}},
5507
+ {"objectID":"b507cb02f53bda7fec320d54c24a3a6d33e5e17bda8fe60622265712c2e59944","title":"Tool calls failing with thinking on","url":"/docs/getting-started/providers/deepseek#tool-calls-failing-with-thinking-on","content":"DeepSeek's thinking mode guide says each turn's must be sent back on every later request once tools are in play, and that the API returns otherwise. NeuroLink does this for you: the DeepSeek catalog entry sets , so both and send the reasoning back on each follow-up request. (Tested live on 2026-09-26, the API accepted follow-ups with or without it, but NeuroLink follows the documented contract.)\n\nIf a tool loop still fails, check whether you are replaying conversation history yourself without each assistant turn's reasoning. For tool-heavy workflows where you don't need the reasoning, keeps thinking off.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"Tool calls failing with thinking on","lvl3":""}},
5508
5508
  {"objectID":"892870aad241356c56f5445ecf528a3a7b6ba11c3eedea3673715106da0ef59d","title":"See Also","url":"/docs/getting-started/providers/deepseek#see-also","content":"Implementation spec — internal wire-format details and design decisions\nOpenAI Compatible provider — generic provider for any OpenAI-compatible endpoint\nLiteLLM provider — proxy-based multi-provider access\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"DeepSeek Provider Guide","lvl2":"See Also","lvl3":""}},
5509
5509
  {"objectID":"b3dc872a8aa0c095281226e80d35c5d769d99952788bf74ad7ee9fb302df11f4","title":"ElevenLabs Music Provider Guide","url":"/docs/getting-started/providers/elevenlabs-music","content":"ElevenLabs Music Provider Guide\n\nMusic + sound-effect generation via the ElevenLabs Music / SFX API\n\nOverview\n\nElevenLabs ships music and sound-effect models\nunder the same account used for TTS. NeuroLink supports both via\n (full musical tracks) and\n (short SFX).\n\nKey Facts\nEndpoint: (and )\nAuth: header (same key as TTS)\nOutput: MP3\n\nQuick Start\nGet an API Key\n\nhttps://elevenlabs.io/app/settings/api-keys\nConfigure\nGenerate Music\n\nSound Effects\n\nCLI Usage\n\nConfiguration Reference\n\n| Environment Variable | Required | Description |\n| -------------------- | -------- | -------------- |\n| | Yes | ElevenLabs key |\n\nTroubleshooting\n— your ElevenLabs subscription has an open\n invoice. Complete payment at\n https://elevenlabs.io/app/subscription\n to re-enable the music endpoint.\n\nSee Also\nBeatoven Provider\nLyria Provider\nElevenLabs TTS","hierarchy":{"lvl0":"Getting Started","lvl1":"ElevenLabs Music Provider Guide","lvl2":"","lvl3":""}},
5510
5510
  {"objectID":"c53d01db44f92cdf3d96fda02e6105b3c436689e2b09c49cc9819592771f88d0","title":"ElevenLabs Music Provider Guide","url":"/docs/getting-started/providers/elevenlabs-music#elevenlabs-music-provider-guide","content":"Music + sound-effect generation via the ElevenLabs Music / SFX API","hierarchy":{"lvl0":"Getting Started","lvl1":"ElevenLabs Music Provider Guide","lvl2":"ElevenLabs Music Provider Guide","lvl3":""}},
@@ -8893,10 +8893,10 @@
8893
8893
  {"objectID":"dfcef07cbe4841f92c204d0ab2f64ab5bafd5cad7da138a9ff481b47b72d89b6","title":"Must remain class (12)","url":"/docs/provider-integration/migration-ledger#must-remain-class-12","content":"| Provider | Why |\n| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| | AWS SigV4/Converse protocol, custom loop, not OpenAI-compatible. Tier 4. |\n| | Chat portion is catalog-shaped, but embeddings, image generation, and OpenAI-specific telemetry/errors are executable behavior. |\n| | Two native protocols (Google GenAI + Anthropic-on-Vertex) and multiple modality pipelines behind one provider identity. |\n| | Native Messages API auth/message/tool semantics are executable protocol behavior. ","hierarchy":{"lvl0":"Provider Integration","lvl1":"Provider Descriptor Migration Ledger","lvl2":"Must remain class (12)","lvl3":""}},
8894
8894
  {"objectID":"a4f69e09308f075830f2efa7c1b0126236c5ec0fc12bfe08be21764a627e47a5","title":"Must remain core class (1)","url":"/docs/provider-integration/migration-ledger#must-remain-core-class-1","content":"| Provider | Why |\n| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| | This is the generic protocol surface itself, not a direct vendor. It should consume shared descriptor/config primitives but must never become a fixed-vendor JSON row — collapsing it into the catalog would conflate \"the adapter\" with \"an entry in the adapter's catalog.\" |","hierarchy":{"lvl0":"Provider Integration","lvl1":"Provider Descriptor Migration Ledger","lvl2":"Must remain core class (1)","lvl3":""}},
8895
8895
  {"objectID":"235850085d9102413140920b9d5e5e2ff6113d007c865f5d78012af80fbf1843","title":"Suggested execution order","url":"/docs/provider-integration/migration-ledger#suggested-execution-order","content":"— low-risk once the conflicts above are resolved, JSON-ready-now; proves the removal path for a hand descriptor that already has a JSON twin.\n, — smallest schema extensions (few named fields), each unlocks one direct-vendor class removal.\nThree shared adapters (local-runtime, embedding-only, image-generation) — each unlocks 3 providers at once; build once, migrate three.\ndescriptor-only JSON metadata — proof of concept for moving static descriptor data out of a \"must remain class\" provider without touching its execution.\nDirect-vendor \"must remain class\" providers (, , , , , , ) get descriptor-only JSON metadata migrations, execution untouched — lower priority, cosmetic consolidation only.\nAggregators (, ), the core adapter (), and are excluded from the first-class-count migration priority entirely — the first three add no direct-vendor coverage however they're implemented, and is a -only provider with no / surface to migrate at all.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Provider Descriptor Migration Ledger","lvl2":"Suggested execution order","lvl3":""}},
8896
- {"objectID":"6122b2e83358a45c64da87c1ca80a2d579cdfb087a6d9dc58b1e02805296b14a","title":"OpenAI-Compatible Provider Catalog","url":"/docs/provider-integration/openai-compat-catalog","content":"OpenAI-Compatible Provider Catalog\n\nSixteen OpenAI-compatible providers — API Route, Baseten, SambaNova,\nCerebras, Groq, xAI, Together AI, Fireworks AI, Perplexity, Mistral,\nCloudflare Workers AI, GMI Cloud, Inception Labs, io.net Intelligence,\nMancer, Upstage — are registered from one JSON file each, under\n, and served by one generic class,\n\n(). Adding another provider to\nthis family means adding one JSON file — no subclass, no registry edit, no\nhand-written enum member, no test edit.\n\nThe JSON is the source of truth\n\n still exists and keeps its name and element type,\nbut it is now built by the loader ()\nfrom the JSON files rather than hand-written. Two consumers read the JSON:\nCodegen () writes the compile-time\n artifacts into marked regions — the member, the\n enum, the key — plus the generated\n index. Pre-commit and CI fail on stale output.\nThe loader builds the runtime entry; the descriptor, config options,\n context windows, pricing, vision map and model-choice tables all derive\n from it, as do the provider test suites' rows and counts.\n\nEach file is validated by a zod schema ()\nwith a mirrored for editor squiggles.\nProbe evidence (roster/auth/billing dates, live-matrix result, PR URL)\nlives in the file's block — the old\n files were folded into it.\n\nField-by-field reference and the escape hatches:\n. Design rationale and the approved rulings:\n.\n\nWhen a provider belongs in the catalog\n\nA provider belongs in the JSON catalog if it needs only:\na credential (API key, optionally an extra field like Cloudflare's account id)\na base URL (static default + optional env override, or computed from an\n extra credential field)\na default/fallback model\nerror-message classification (auth / rate-limit / invalid-model / generic)\na named, closed catalog quirk. DeepSeek is the worked example: it 400s on\n structured-output requests, so sets\n and the\n generic downgrades to before\n sending — no subclass.\n\nWhen a provider needs a dedicated subclass instead\n\nAzure OpenAI is deliberately not in the catalog because it overrides real\nrequest-shaping behavior that no named catalog quirk expresses:\nAzure OpenAI () overrides four hooks:\n (deployment-name URL routing across two Azure\n endpoint schemes), (Azure's header instead of\n ), (renames to\n for o-series/gpt-5+ deployments), and\n (Azure supports both at once).\n\nIf a future provider needs any hook beyond the 3 mandatory ones\n(, , ) or the 2\npurely-declarative optional ones (,\n) and that hook is not already a named catalog quirk, it\nneeds either a new closed quirk (the DeepSeek route) or a dedicated subclass\n(the Azure OpenAI route).\n\nError-message fidelity\n\nEach entry's is a direct, order-preserving translation of its\noriginal subclass's / ladder into rule data\n(status code and/or case-insensitive pattern), classified via\n\n(). Every bespoke message string is\npreserved verbatim — including xAI's \"top up your account\" quota URL and\nGroq's decommissioned-vs-not-found distinction — via each rule's own\n field (), with model-name\ninterpolation carried through . There is no message-wording\nregression here. Timeout classification is likewise unchanged: 15 of the 16\nproviders map to (the classifier's default),\nand Groq alone maps it to . Groq's subclass override is\npreserved verbatim via the JSON's , so no\nprovider's timeout class changed during migration.\n\nKnown pre-existing quirk this migration preserved (not fixed)\n\nMistral's provider registration passes a value to\n that does not check \n(, a bare literal), while\n for Mistral does\ncheck (falling back to ).\nEvery other catalog provider's registry default and class default agree.\nThis is expressed via the JSON's \n( only for Mistral). The JSON migration did reconcile one half of it:\n now returns the real generation default\n() rather than the registry literal — a disclosed\nbug-fix-grade delta, since the two disagreed before.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"","lvl3":""}},
8896
+ {"objectID":"6122b2e83358a45c64da87c1ca80a2d579cdfb087a6d9dc58b1e02805296b14a","title":"OpenAI-Compatible Provider Catalog","url":"/docs/provider-integration/openai-compat-catalog","content":"OpenAI-Compatible Provider Catalog\n\nSixteen OpenAI-compatible providers — API Route, Baseten, SambaNova,\nCerebras, Groq, xAI, Together AI, Fireworks AI, Perplexity, Mistral,\nCloudflare Workers AI, GMI Cloud, Inception Labs, io.net Intelligence,\nMancer, Upstage — are registered from one JSON file each, under\n, and served by one generic class,\n\n(). Adding another provider to\nthis family means adding one JSON file — no subclass, no registry edit, no\nhand-written enum member, no test edit.\n\nThe JSON is the source of truth\n\n still exists and keeps its name and element type,\nbut it is now built by the loader ()\nfrom the JSON files rather than hand-written. Two consumers read the JSON:\nCodegen () writes the compile-time\n artifacts into marked regions — the member, the\n enum, the key — plus the generated\n index. Pre-commit and CI fail on stale output.\nThe loader builds the runtime entry; the descriptor, config options,\n context windows, pricing, vision map and model-choice tables all derive\n from it, as do the provider test suites' rows and counts.\n\nEach file is validated by a zod schema ()\nwith a mirrored for editor squiggles.\nProbe evidence (roster/auth/billing dates, live-matrix result, PR URL)\nlives in the file's block — the old\n files were folded into it.\n\nField-by-field reference and the escape hatches:\n. Design rationale and the approved rulings:\n.\n\nWhen a provider belongs in the catalog\n\nA provider belongs in the JSON catalog if it needs only:\na credential (API key, optionally an extra field like Cloudflare's account id)\na base URL (static default + optional env override, or computed from an\n extra credential field)\na default/fallback model\nerror-message classification (auth / rate-limit / invalid-model / generic)\na named, closed catalog quirk. DeepSeek is the worked example: it 400s on\n structured-output requests, so sets\n and the\n generic downgrades to before\n sending — no subclass. It also sets :\n DeepSeek documents that each assistant turn's must go\n back on later requests once tools are in play, so the shared message\n converter and the streaming tool loop send it — for this quirk only, since\n strict OpenAI-compatible backends reject the unknown field.\n\nWhen a provider needs a dedicated subclass instead\n\nAzure OpenAI is deliberately not in the catalog because it overrides real\nrequest-shaping behavior that no named catalog quirk expresses:\nAzure OpenAI () overrides four hooks:\n (deployment-name URL routing across two Azure\n endpoint schemes), (Azure's header instead of\n ), (renames to\n for o-series/gpt-5+ deployments), and\n (Azure supports both at once).\n\nIf a future provider needs any hook beyond the 3 mandatory ones\n(, , ) or the 2\npurely-declarative optional ones (,\n) and that hook is not already a named catalog quirk, it\nneeds either a new closed quirk (the DeepSeek route) or a dedicated subclass\n(the Azure OpenAI route).\n\nError-message fidelity\n\nEach entry's is a direct, order-preserving translation of its\noriginal subclass's / ladder into rule data\n(status code and/or case-insensitive pattern), classified via\n\n(). Every bespoke message string is\npreserved verbatim — including xAI's \"top up your account\" quota URL and\nGroq's decommissioned-vs-not-found distinction — via each rule's own\n field (), with model-name\ninterpolation carried through . There is no message-wording\nregression here. Timeout classification is likewise unchanged: 15 of the 16\nproviders map to (the classifier's default),\nand Groq alone maps it to . Groq's subclass override is\npreserved verbatim via the JSON's , so no\nprovider's timeout class changed during migration.\n\nKnown pre-existing quirk this migration preserved (not fixed)\n\nMistral's provider registration passes a value to\n that does not check \n(, a bare literal), while\n for Mistral does\ncheck (falling back to ).\nEvery other catalog provider's registry default and class default agree.\nThis is expressed via the JSON's \n( only for Mistral). The JSON migration did reconcile one half of it:\n now returns the real generation default\n() rather than the registry literal — a disclosed\nbug-fix-grade delta, since the two disagreed before.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"","lvl3":""}},
8897
8897
  {"objectID":"9a91a5b4a32a9f1e89c6a28f762c3594c4a39d96d32cc9e6e1fa0f5cb3f609e4","title":"OpenAI-Compatible Provider Catalog","url":"/docs/provider-integration/openai-compat-catalog#openai-compatible-provider-catalog","content":"Sixteen OpenAI-compatible providers — API Route, Baseten, SambaNova,\nCerebras, Groq, xAI, Together AI, Fireworks AI, Perplexity, Mistral,\nCloudflare Workers AI, GMI Cloud, Inception Labs, io.net Intelligence,\nMancer, Upstage — are registered from one JSON file each, under\n, and served by one generic class,\n\n(). Adding another provider to\nthis family means adding one JSON file — no subclass, no registry edit, no\nhand-written enum member, no test edit.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"OpenAI-Compatible Provider Catalog","lvl3":""}},
8898
8898
  {"objectID":"16e60ee66171009a6638b5110cc8693f90c1a2cfde796c6932c3512d7f7421fb","title":"The JSON is the source of truth","url":"/docs/provider-integration/openai-compat-catalog#the-json-is-the-source-of-truth","content":"still exists and keeps its name and element type,\nbut it is now built by the loader ()\nfrom the JSON files rather than hand-written. Two consumers read the JSON:\nCodegen () writes the compile-time\n artifacts into marked regions — the member, the\n enum, the key — plus the generated\n index. Pre-commit and CI fail on stale output.\nThe loader builds the runtime entry; the descriptor, config options,\n context windows, pricing, vision map and model-choice tables all derive\n from it, as do the provider test suites' rows and counts.\n\nEach file is validated by a zod schema ()\nwith a mirrored for editor squiggles.\nProbe evidence (roster/auth/billing dates, live-matrix result, PR URL)\nlives in the file's block — the old\n files were folded into it.\n\nField-by-field reference and the escape hatches:\n. Design rationale and the approved rulings:\n.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"The JSON is the source of truth","lvl3":""}},
8899
- {"objectID":"00a7366eb480e85f5377e0cb8575403e7fd9b33cc028bf95cf0fe48cc94fcea9","title":"When a provider belongs in the catalog","url":"/docs/provider-integration/openai-compat-catalog#when-a-provider-belongs-in-the-catalog","content":"A provider belongs in the JSON catalog if it needs only:\na credential (API key, optionally an extra field like Cloudflare's account id)\na base URL (static default + optional env override, or computed from an\n extra credential field)\na default/fallback model\nerror-message classification (auth / rate-limit / invalid-model / generic)\na named, closed catalog quirk. DeepSeek is the worked example: it 400s on\n structured-output requests, so sets\n and the\n generic downgrades to before\n sending — no subclass.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"When a provider belongs in the catalog","lvl3":""}},
8899
+ {"objectID":"00a7366eb480e85f5377e0cb8575403e7fd9b33cc028bf95cf0fe48cc94fcea9","title":"When a provider belongs in the catalog","url":"/docs/provider-integration/openai-compat-catalog#when-a-provider-belongs-in-the-catalog","content":"A provider belongs in the JSON catalog if it needs only:\na credential (API key, optionally an extra field like Cloudflare's account id)\na base URL (static default + optional env override, or computed from an\n extra credential field)\na default/fallback model\nerror-message classification (auth / rate-limit / invalid-model / generic)\na named, closed catalog quirk. DeepSeek is the worked example: it 400s on\n structured-output requests, so sets\n and the\n generic downgrades to before\n sending — no subclass. It also sets :\n DeepSeek documents that each assistant turn's must go\n back on later requests once tools are in play, so the shared message\n converter and the streaming tool loop send it — for this quirk only, since\n strict OpenAI-compatible backends reject the unknown field.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"When a provider belongs in the catalog","lvl3":""}},
8900
8900
  {"objectID":"c2a9e3425a4cecb520467f900df8b5fa78fc4178514eba6385040bb9506e48ee","title":"When a provider needs a dedicated subclass instead","url":"/docs/provider-integration/openai-compat-catalog#when-a-provider-needs-a-dedicated-subclass-instead","content":"Azure OpenAI is deliberately not in the catalog because it overrides real\nrequest-shaping behavior that no named catalog quirk expresses:\nAzure OpenAI () overrides four hooks:\n (deployment-name URL routing across two Azure\n endpoint schemes), (Azure's header instead of\n ), (renames to\n for o-series/gpt-5+ deployments), and\n (Azure supports both at once).\n\nIf a future provider needs any hook beyond the 3 mandatory ones\n(, , ) or the 2\npurely-declarative optional ones (,\n) and that hook is not already a named catalog quirk, it\nneeds either a new closed quirk (the DeepSeek route) or a dedicated subclass\n(the Azure OpenAI route).","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"When a provider needs a dedicated subclass instead","lvl3":""}},
8901
8901
  {"objectID":"a5276d835ceba15da6ec36261ab78001e17f8b78ba9c8cb1c5e1282aa2f377e3","title":"Error-message fidelity","url":"/docs/provider-integration/openai-compat-catalog#error-message-fidelity","content":"Each entry's is a direct, order-preserving translation of its\noriginal subclass's / ladder into rule data\n(status code and/or case-insensitive pattern), classified via\n\n(). Every bespoke message string is\npreserved verbatim — including xAI's \"top up your account\" quota URL and\nGroq's decommissioned-vs-not-found distinction — via each rule's own\n field (), with model-name\ninterpolation carried through . There is no message-wording\nregression here. Timeout classification is likewise unchanged: 15 of the 16\nproviders map to (the classifier's default),\nand Groq alone maps it to . Groq's subclass override is\npreserved verbatim via the JSON's , so no\nprovider's timeout class changed during migration.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"Error-message fidelity","lvl3":""}},
8902
8902
  {"objectID":"2a22fddc1a2c383a5e75a53e2d512d764f01ad66ab03bfe6edf12acb5d204814","title":"Known pre-existing quirk this migration preserved (not fixed)","url":"/docs/provider-integration/openai-compat-catalog#known-pre-existing-quirk-this-migration-preserved-not-fixed","content":"Mistral's provider registration passes a value to\n that does not check \n(, a bare literal), while\n for Mistral does\ncheck (falling back to ).\nEvery other catalog provider's registry default and class default agree.\nThis is expressed via the JSON's \n( only for Mistral). The JSON migration did reconcile one half of it:\n now returns the real generation default\n() rather than the registry literal — a disclosed\nbug-fix-grade delta, since the two disagreed before.","hierarchy":{"lvl0":"Provider Integration","lvl1":"OpenAI-Compatible Provider Catalog","lvl2":"Known pre-existing quirk this migration preserved (not fixed)","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.29.1",
3
+ "version": "12.29.2",
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": {