@juspay/neurolink 12.43.1 → 12.43.3

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.
@@ -1153,6 +1153,10 @@ export class AnthropicProvider extends BaseProvider {
1153
1153
  }
1154
1154
  // Extended thinking passthrough (providerOptions.anthropic.thinking).
1155
1155
  const thinking = options.providerOptions?.anthropic?.thinking;
1156
+ // `disabled` is sent so a model that thinks by default (claude-sonnet-5
1157
+ // does, unasked) is told not to, but it fixes nothing about sampling: only a
1158
+ // block that turns thinking ON makes Anthropic reject temperature.
1159
+ const thinkingOn = thinking?.type === "enabled";
1156
1160
  // Close the stable prefix with a breakpoint on the last tool. The
1157
1161
  // stream path does the same, just before its own marker count.
1158
1162
  tools = withLastToolCacheBreakpoint(tools);
@@ -1184,7 +1188,7 @@ export class AnthropicProvider extends BaseProvider {
1184
1188
  }, "anthropic.doGenerate");
1185
1189
  // Dropping a caller's explicit sampling parameters is exactly the
1186
1190
  // kind of silent discard this change fixes elsewhere, so say so.
1187
- if (thinking &&
1191
+ if (thinkingOn &&
1188
1192
  (samplingParams.temperature !== undefined ||
1189
1193
  samplingParams.topP !== undefined)) {
1190
1194
  logger.debug("[anthropic] extended thinking is enabled, so temperature/top_p are omitted — Anthropic rejects any temperature but 1 while thinking is set");
@@ -1200,10 +1204,10 @@ export class AnthropicProvider extends BaseProvider {
1200
1204
  // forwarding it alongside thinking turns a call that used to work
1201
1205
  // into a 400. Drop the sampling knobs for exactly those turns and
1202
1206
  // let Anthropic's thinking defaults stand.
1203
- ...(!thinking && samplingParams.temperature !== undefined
1207
+ ...(!thinkingOn && samplingParams.temperature !== undefined
1204
1208
  ? { temperature: samplingParams.temperature }
1205
1209
  : {}),
1206
- ...(!thinking && samplingParams.topP !== undefined
1210
+ ...(!thinkingOn && samplingParams.topP !== undefined
1207
1211
  ? { top_p: samplingParams.topP }
1208
1212
  : {}),
1209
1213
  ...(options.stopSequences && options.stopSequences.length > 0
@@ -1534,6 +1538,12 @@ export class AnthropicProvider extends BaseProvider {
1534
1538
  budget_tokens: options.thinkingConfig.budgetTokens,
1535
1539
  };
1536
1540
  }
1541
+ else if (options.thinkingConfig?.type === "disabled") {
1542
+ // Without this the request carries no `thinking` field at all, which on
1543
+ // a model that thinks by default means "think" — the explicit
1544
+ // `type: "disabled"` the type already offered was silently dropped.
1545
+ anthropicNamespace.thinking = { type: "disabled" };
1546
+ }
1537
1547
  // The per-call `timeout` keeps its per-MODEL-CALL meaning once
1538
1548
  // `turnTimeoutMs` owns the whole-turn deadline, and it reaches the model
1539
1549
  // layer only through providerOptions.neurolink. Without it each step fell
@@ -1751,7 +1761,11 @@ export class AnthropicProvider extends BaseProvider {
1751
1761
  type: "enabled",
1752
1762
  budget_tokens: options.thinkingConfig.budgetTokens,
1753
1763
  }
1754
- : undefined;
1764
+ : options.thinkingConfig?.type === "disabled"
1765
+ ? { type: "disabled" }
1766
+ : undefined;
1767
+ // See the generate path: `disabled` is sent, but only ON constrains sampling.
1768
+ const thinkingOn = thinking?.type === "enabled";
1755
1769
  // Wrap the native stream in an OTel span to capture provider-level
1756
1770
  // latency and token usage (same span name as the pre-migration path so
1757
1771
  // dashboards stay continuous).
@@ -1956,7 +1970,7 @@ export class AnthropicProvider extends BaseProvider {
1956
1970
  const streamSamplingParams = resolveSamplingParams("anthropic", modelId, options.temperature !== undefined && options.temperature !== null
1957
1971
  ? { temperature: options.temperature }
1958
1972
  : {}, "anthropic.executeStream");
1959
- if (thinking && streamSamplingParams.temperature !== undefined) {
1973
+ if (thinkingOn && streamSamplingParams.temperature !== undefined) {
1960
1974
  logger.debug("[anthropic] extended thinking is enabled, so temperature is omitted on the stream path — Anthropic rejects any temperature but 1 while thinking is set");
1961
1975
  }
1962
1976
  return {
@@ -1970,7 +1984,7 @@ export class AnthropicProvider extends BaseProvider {
1970
1984
  ...(payload.system ? { system: payload.system } : {}),
1971
1985
  // Same constraint on the streaming path: a temperature alongside
1972
1986
  // `thinking` is rejected outright.
1973
- ...(!thinking && streamSamplingParams.temperature !== undefined
1987
+ ...(!thinkingOn && streamSamplingParams.temperature !== undefined
1974
1988
  ? { temperature: streamSamplingParams.temperature }
1975
1989
  : {}),
1976
1990
  ...(cachedTools && cachedTools.length > 0
@@ -356,10 +356,22 @@ function fitRequestToTarget(payload, targetModel) {
356
356
  logger.warn(`[vertex-anthropic] ${targetModel} rejects tool_choice "${choice.type}"; sending "auto" instead`);
357
357
  }
358
358
  const thinking = payload.thinking;
359
- if (record(thinking) && thinking.display === "updates") {
359
+ if (record(thinking) &&
360
+ thinking.type === "enabled" &&
361
+ targetModel === "claude-sonnet-5-5") {
362
+ // Sonnet 5.5 rejects fixed thinking budgets. Keep the requested display,
363
+ // but use its adaptive mode; a fixed token budget has no Vertex equivalent.
364
+ payload.thinking = {
365
+ type: "adaptive",
366
+ ...(thinking.display !== undefined ? { display: thinking.display } : {}),
367
+ };
368
+ logger.warn(`[vertex-anthropic] ${targetModel} rejects thinking "enabled"; sending adaptive without a fixed budget`);
369
+ }
370
+ const targetThinking = payload.thinking;
371
+ if (record(targetThinking) && targetThinking.display === "updates") {
360
372
  // Claude Code requests live thinking updates, but Vertex accepts only
361
373
  // summarized or omitted adaptive thinking display.
362
- payload.thinking = { ...thinking, display: "summarized" };
374
+ payload.thinking = { ...targetThinking, display: "summarized" };
363
375
  }
364
376
  if (record(thinking) && thinking.type === "disabled") {
365
377
  const outputConfig = payload.output_config;
@@ -4479,7 +4479,7 @@
4479
4479
  {"objectID":"c94689eb04fe3a8bb13cdf4da5967e12e54dc05d23065bd3e3524af01cd4f971","title":"Feature Implementation Workflow","url":"/docs/features/task-manager#feature-implementation-workflow","content":"This example automates: write doc → review → revise → implement → create PR → resolve comments → push.\n\nHow it plays out:\n\n| Run | AI Behavior |\n| --- | -------------------------------------------------------------------------------------- |\n| 1 | Writes docs/auth-design.md using writeFile tool. \"Step 1 complete. Next: review.\" |\n| 2 | Reads the doc, identifies gaps. \"Step 2 complete: found 3 issues. Next: revise.\" |\n| 3 | Rewrites sections. \"Step 3 complete. Doc is ready. Next: implement.\" |\n| 4 | Reads doc, writes code across multiple files. \"Step 4 complete. Next: create PR.\" |\n| 5 | Uses GitHub MCP to create PR. \"Step 5 complete. PR #42 created. Next: check comments.\" |\n| 6 | Reads PR comments via GitHub MCP. \"2 comments found. Next: address them.\" |\n| 7 | Pushes fixes, re-checks. \"All comments resolved. ALL STEPS COMPLETE.\" |\n| — | onSuccess callback detects completion, pauses the task. |\n\nBecause this is continuation mode, the AI has full context of every previous run — it knows what it wrote, what was reviewed, and what comments were left. No external state management needed.","hierarchy":{"lvl0":"Features","lvl1":"TaskManager - Scheduled & Self-Running Tasks","lvl2":"Feature Implementation Workflow","lvl3":""}},
4480
4480
  {"objectID":"1ed0cf5cb87ec5d23bf366e3b3d3c81407802f490fb50d3fef44230ef5c3fc6f","title":"Existing Code Impact","url":"/docs/features/task-manager#existing-code-impact","content":"TaskManager is implemented as a new module (src/lib/tasks/). Minimal changes to existing code:\n\n| Existing File | Change | Lines |\n| ------------------------------ | ----------------------------------- | ----- |\n| src/lib/neurolink.ts | Add tasks getter property | ~10 |\n| src/lib/types/index.ts | Re-export task types | ~2 |\n| src/lib/agent/directTools.ts | Import and spread task tools | ~3 |\n| src/cli/index.ts | Register task CLI command | ~1 |\n| package.json | Add bullmq, croner dependencies | ~2 |\n\nEverything else is new files in src/lib/tasks/. No refactoring, no restructuring of existing code.","hierarchy":{"lvl0":"Features","lvl1":"TaskManager - Scheduled & Self-Running Tasks","lvl2":"Existing Code Impact","lvl3":""}},
4481
4481
  {"objectID":"e937a3f76bbe1a5494c610c87139c64ed299320dc8364078c0849a6231a023b8","title":"FAQ","url":"/docs/features/task-manager#faq","content":"Q: Do I need Redis to use TaskManager?\nA: No. Set backend: \"node-timeout\" for a zero-dependency setup. Redis is only required for the BullMQ backend (the default). When using BullMQ, Redis stores both job scheduling state and task definitions/run logs — no file I/O at all.\n\nQ: Will tasks stay in Redis forever?\nA: No. Active/paused tasks persist as long as they're running. Once a task reaches a terminal state (completed, failed, cancelled), it auto-expires based on taskRetention config — defaults: 30 days for completed, 7 days for failed/cancelled. Run logs are capped at maxRunLogs (default 2000) per task via LTRIM, and individual entries can have a TTL. You can also manually delete tasks via tasks.delete() or neurolink task delete.\n\nQ: Can the AI schedule tasks without user intervention?\nA: Yes. The built-in createTask tool allows the AI to self-schedule tasks during any conversation. If HITL is enabled, the user will be prompted for approval.\n\nQ: How does continuation mode handle growing context?\nA: It uses NeuroLink's existing context compaction system. When conversation history exceeds the model's context budget, BudgetChecker triggers automatic summarization.\n\nQ: Can I use TaskManager in a serverless environment?\nA: The BullMQ backend works in serverless with a persistent Redis instance — no local filesystem needed. The NodeTimeout backend requires a long-running process with filesystem access.\n\nQ: What happens when I switch backends?\nA: Tasks stored in Redis (BullMQ) and tasks stored on disk (NodeTimeout) are independent. Switching backends does not migrate data. If you need to migrate, use tasks.list() on the old backend and tasks.create() on the new one.\n\nQ: How do I monitor task health?\nA: Use neurolink.tasks.list() / neurolink task list for status overview, neurolink.tasks.runs(taskId) / neurolink task logs <id> for run history, and subscribe to task:* events for real-time monitoring.","hierarchy":{"lvl0":"Features","lvl1":"TaskManager - Scheduled & Self-Running Tasks","lvl2":"FAQ","lvl3":""}},
4482
- {"objectID":"5597f3996aaaa278b6fc9cb9310ea7f35b65373b35043abf05f0b33ebe8d5d82","title":"Extended Thinking Configuration","url":"/docs/features/thinking-configuration","content":"Extended Thinking Configuration\n\nEnable extended thinking/reasoning modes for AI models that support deeper reasoning capabilities. This feature allows models to \"think through\" complex problems before providing a response.\n\nOverview\n\nNeuroLink supports extended thinking/reasoning configuration for models that provide this capability. Extended thinking enables models to perform more thorough reasoning, particularly useful for complex tasks like mathematical proofs, coding problems, and multi-step analysis.\n\nSupported Models\n\nGemini 3 Models (Google Vertex AI / AI Studio)\ngemini-3.1-pro - Full thinking support with high token budgets (up to 100,000)\ngemini-3-flash-preview - Fast thinking with support for \"minimal\" level (up to 50,000)\n\nGemini 2.5 Models (Google Vertex AI / AI Studio)\ngemini-2.5-pro - Supports thinking configuration (up to 32,000 tokens)\ngemini-2.5-flash - Supports thinking configuration (up to 32,000 tokens)\n\nClaude Models (Anthropic)\n\nAll Claude 4.0+ models support extended thinking via budget tokens:\nclaude-sonnet-4-20250514 (Claude Sonnet 4)\nclaude-opus-4-20250514 (Claude Opus 4)\nclaude-opus-4-1-20250805 (Claude Opus 4.1)\nclaude-sonnet-4-5-20250929 (Claude Sonnet 4.5)\nclaude-opus-4-5-20251101 (Claude Opus 4.5)\nclaude-haiku-4-5-20251001 (Claude Haiku 4.5)\nclaude-sonnet-4-6 (Claude Sonnet 4.6)\nclaude-opus-4-6 (Claude Opus 4.6)\n\nQuick Start\n\nGemini 3 Thinking Configuration\n\nFor Gemini 3 models, use thinkingLevel to control reasoning depth:\n\nThinking Levels\n\n| Level | Description | Best For |\n| --------- | -------------------------------------- | ------------------------------- |\n| minimal | Near-zero thinking (Flash models only) | Simple queries requiring speed |\n| low | Fast reasoning for simple tasks | Quick analysis, summaries |\n| medium | Balanced reasoning/latency trade-off | General-purpose tasks |\n| high | Maximum reasoning depth | Complex reasoning, math, coding |\n\nMaximum Token Budgets by Model\n\n| Model | Max Thinking Budget |\n| --------------------- | ------------------- |\n| gemini-3-pro-* | 100,000 tokens |\n| gemini-3-flash-* | 50,000 tokens |\n| gemini-2.5-* | 32,000 tokens |\n| claude-opus-4-6 | 100,000 tokens |\n| claude-sonnet-4-6 | 100,000 tokens |\n| claude-opus-4-5-* | 100,000 tokens |\n| claude-sonnet-4-5-* | 100,000 tokens |\n| claude-haiku-4-5-* | 100,000 tokens |\n| claude-opus-4-1-* | 100,000 tokens |\n| claude-opus-4-* | 100,000 tokens |\n| claude-sonnet-4-* | 100,000 tokens |\n\nAnthropic Claude Thinking Configuration\n\nFor Claude models, use budgetTokens to set the thinking token budget:\n\nBudget Token Guidelines\nMinimum: 5,000 tokens\nMaximum: 100,000 tokens\nRecommended for simple tasks: 5,000-10,000 tokens\nRecommended for complex reasoning: 20,000-50,000 tokens\nMaximum depth: 50,000-100,000 tokens\n\nConfiguration Options\n\nThe thinkingConfig object supports the following options:\n\nCLI Usage\n\nExtended thinking is also available via the CLI:\n\nCLI Options\n\n| Option | Description | Default |\n| ------------------ | ----------------------------------------------------- | ------- |\n| --thinking | Enable extended thinking | false |\n| --thinkingBudget | Token budget (Anthropic: 5000-100000) | 10000 |\n| --thinkingLevel | Thinking level (Gemini 3: minimal, low, medium, high) | medium |\n\nBest Practices\n\nWhen to Use High Thinking\nComplex mathematical proofs and calculations\nMulti-step coding problems and debugging\nDetailed analysis requiring multiple considerations\nTasks where accuracy is more important than speed\n\nWhen to Use Low/Minimal Thinking\nSimple queries where speed matters\nStraightforward information retrieval\nQuick summaries and formatting tasks\nHigh-volume, latency-sensitive applications\n\nGeneral Guidelines\nStart with medium: Use medium as your default and adjust based on results\nMatch model to task: Use Pro models for complex tasks, Flash for speed\nMonitor token usage: Higher thinking levels consume more tokens\nTest performance: Compare response quality vs. latency for your use case\n\nExample: Complex Reasoning Task\n\nModel Detection Utilities\n\nNeuroLink provides utilities to check thinking support:\n\nImportant Notes\nProvider compatibility: Thinking configuration is provider-specific. Gemini uses thinkingLevel, Claude uses budgetTokens\nToken consumption: Extended thinking uses additional tokens beyond the response\nLatency impact: Higher thinking levels increase response time\nNot all models support thinking: Check supportsThinkingConfig() before enabling\nStreaming support: Thinking configuration works with both generate() and stream()\n\nSee Also\nAPI Reference\nProvider Configuration\nStreaming","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"","lvl3":""}},
4482
+ {"objectID":"5597f3996aaaa278b6fc9cb9310ea7f35b65373b35043abf05f0b33ebe8d5d82","title":"Extended Thinking Configuration","url":"/docs/features/thinking-configuration","content":"Extended Thinking Configuration\n\nEnable extended thinking/reasoning modes for AI models that support deeper reasoning capabilities. This feature allows models to \"think through\" complex problems before providing a response.\n\nOverview\n\nNeuroLink supports extended thinking/reasoning configuration for models that provide this capability. Extended thinking enables models to perform more thorough reasoning, particularly useful for complex tasks like mathematical proofs, coding problems, and multi-step analysis.\n\nSupported Models\n\nGemini 3 Models (Google Vertex AI / AI Studio)\ngemini-3.1-pro - Full thinking support with high token budgets (up to 100,000)\ngemini-3-flash-preview - Fast thinking with support for \"minimal\" level (up to 50,000)\n\nGemini 2.5 Models (Google Vertex AI / AI Studio)\ngemini-2.5-pro - Supports thinking configuration (up to 32,000 tokens)\ngemini-2.5-flash - Supports thinking configuration (up to 32,000 tokens)\n\nClaude Models (Anthropic)\n\nAll Claude 4.0+ models support extended thinking via budget tokens:\nclaude-sonnet-4-20250514 (Claude Sonnet 4)\nclaude-opus-4-20250514 (Claude Opus 4)\nclaude-opus-4-1-20250805 (Claude Opus 4.1)\nclaude-sonnet-4-5-20250929 (Claude Sonnet 4.5)\nclaude-opus-4-5-20251101 (Claude Opus 4.5)\nclaude-haiku-4-5-20251001 (Claude Haiku 4.5)\nclaude-sonnet-4-6 (Claude Sonnet 4.6)\nclaude-opus-4-6 (Claude Opus 4.6)\n\nQuick Start\n\nGemini 3 Thinking Configuration\n\nFor Gemini 3 models, use thinkingLevel to control reasoning depth:\n\nThinking Levels\n\n| Level | Description | Best For |\n| --------- | -------------------------------------- | ------------------------------- |\n| minimal | Near-zero thinking (Flash models only) | Simple queries requiring speed |\n| low | Fast reasoning for simple tasks | Quick analysis, summaries |\n| medium | Balanced reasoning/latency trade-off | General-purpose tasks |\n| high | Maximum reasoning depth | Complex reasoning, math, coding |\n\nMaximum Token Budgets by Model\n\n| Model | Max Thinking Budget |\n| --------------------- | ------------------- |\n| gemini-3-pro-* | 100,000 tokens |\n| gemini-3-flash-* | 50,000 tokens |\n| gemini-2.5-* | 32,000 tokens |\n| claude-opus-4-6 | 100,000 tokens |\n| claude-sonnet-4-6 | 100,000 tokens |\n| claude-opus-4-5-* | 100,000 tokens |\n| claude-sonnet-4-5-* | 100,000 tokens |\n| claude-haiku-4-5-* | 100,000 tokens |\n| claude-opus-4-1-* | 100,000 tokens |\n| claude-opus-4-* | 100,000 tokens |\n| claude-sonnet-4-* | 100,000 tokens |\n\nAnthropic Claude Thinking Configuration\n\nFor Claude models, use budgetTokens to set the thinking token budget:\n\nBudget Token Guidelines\nMinimum: 5,000 tokens\nMaximum: 100,000 tokens\nRecommended for simple tasks: 5,000-10,000 tokens\nRecommended for complex reasoning: 20,000-50,000 tokens\nMaximum depth: 50,000-100,000 tokens\n\nTurning thinking off\n\nSome Claude models, claude-sonnet-5 among them, think before answering even when\nno thinkingConfig is given, and that thinking counts against the request's\nmax_tokens. To turn it off for a call, pass type: \"disabled\":\n\nNeuroLink sends thinking: { type: \"disabled\" } on both generate() and\nstream(). Turning thinking off does not change which sampling parameters a\nmodel accepts. On a model that takes a temperature, NeuroLink still sends it\nwith thinking disabled; it is dropped only while thinking is on. Some models,\nclaude-sonnet-5 among them, do not accept a temperature at all, and NeuroLink\nleaves it off for them whatever the thinking setting.\n\nenabled: false, or no thinkingConfig at all, sends nothing, so the model's own\ndefault applies. If enabled: true and budgetTokens are also set, thinking is\nenabled, as before.\n\nConfiguration Options\n\nThe thinkingConfig object supports the following options:\n\nCLI Usage\n\nExtended thinking is also available via the CLI:\n\nCLI Options\n\n| Option | Description | Default |\n| ------------------ | ----------------------------------------------------- | ------- |\n| --thinking | Enable extended thinking | false |\n| --thinkingBudget | Token budget (Anthropic: 5000-100000) | 10000 |\n| --thinkingLevel | Thinking level (Gemini 3: minimal, low, medium, high) | medium |\n\nBest Practices\n\nWhen to Use High Thinking\nComplex mathematical proofs and calculations\nMulti-step coding problems and debugging\nDetailed analysis requiring multiple considerations\nTasks where accuracy is more important than speed\n\nWhen to Use Low/Minimal Thinking\nSimple queries where speed matters\nStraightforward information retrieval\nQuick summaries and formatting tasks\nHigh-volume, latency-sensitive applications\n\nGeneral Guidelines\nStart with medium: Use medium as your default and adjust based on results\nMatch model to task: Use Pro models for complex tasks, ","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"","lvl3":""}},
4483
4483
  {"objectID":"b1a3fc87278e92aa39a0271b6f2eb465b62008b51d064acce63cf3af3f5c9673","title":"Extended Thinking Configuration","url":"/docs/features/thinking-configuration#extended-thinking-configuration","content":"Enable extended thinking/reasoning modes for AI models that support deeper reasoning capabilities. This feature allows models to \"think through\" complex problems before providing a response.","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Extended Thinking Configuration","lvl3":""}},
4484
4484
  {"objectID":"5e898a7f44534e174e959788be122e3ba4d1ee14def3b6214209393edf08cbae","title":"Overview","url":"/docs/features/thinking-configuration#overview","content":"NeuroLink supports extended thinking/reasoning configuration for models that provide this capability. Extended thinking enables models to perform more thorough reasoning, particularly useful for complex tasks like mathematical proofs, coding problems, and multi-step analysis.","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Overview","lvl3":""}},
4485
4485
  {"objectID":"3c3340ac962c9488fd2f05b80b29b47a3a272754a135742aa678ed7dc1845462","title":"Gemini 3 Models (Google Vertex AI / AI Studio)","url":"/docs/features/thinking-configuration#gemini-3-models-google-vertex-ai-ai-studio","content":"gemini-3.1-pro - Full thinking support with high token budgets (up to 100,000)\ngemini-3-flash-preview - Fast thinking with support for \"minimal\" level (up to 50,000)","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Gemini 3 Models (Google Vertex AI / AI Studio)","lvl3":""}},
@@ -4490,6 +4490,7 @@
4490
4490
  {"objectID":"d29afbd5be885a8dfae9576498c586034610e698e65e0020c32f504a6ffb0b4d","title":"Maximum Token Budgets by Model","url":"/docs/features/thinking-configuration#maximum-token-budgets-by-model","content":"| Model | Max Thinking Budget |\n| --------------------- | ------------------- |\n| gemini-3-pro-* | 100,000 tokens |\n| gemini-3-flash-* | 50,000 tokens |\n| gemini-2.5-* | 32,000 tokens |\n| claude-opus-4-6 | 100,000 tokens |\n| claude-sonnet-4-6 | 100,000 tokens |\n| claude-opus-4-5-* | 100,000 tokens |\n| claude-sonnet-4-5-* | 100,000 tokens |\n| claude-haiku-4-5-* | 100,000 tokens |\n| claude-opus-4-1-* | 100,000 tokens |\n| claude-opus-4-* | 100,000 tokens |\n| claude-sonnet-4-* | 100,000 tokens |","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Maximum Token Budgets by Model","lvl3":""}},
4491
4491
  {"objectID":"a1b9be5a0a0a16cff259e6051df668ddc07f75a6ae77ebba4121f649746eb25e","title":"Anthropic Claude Thinking Configuration","url":"/docs/features/thinking-configuration#anthropic-claude-thinking-configuration","content":"For Claude models, use budgetTokens to set the thinking token budget:","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Anthropic Claude Thinking Configuration","lvl3":""}},
4492
4492
  {"objectID":"942ce04a601afc6269d1765ad4da7295a802070a5b036c93dd360e92478e3be3","title":"Budget Token Guidelines","url":"/docs/features/thinking-configuration#budget-token-guidelines","content":"Minimum: 5,000 tokens\nMaximum: 100,000 tokens\nRecommended for simple tasks: 5,000-10,000 tokens\nRecommended for complex reasoning: 20,000-50,000 tokens\nMaximum depth: 50,000-100,000 tokens","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Budget Token Guidelines","lvl3":""}},
4493
+ {"objectID":"43d4815c3e1af5de7858131d9b25bcf7e59ef2dee4327c46cf613cbdd0f704d9","title":"Turning thinking off","url":"/docs/features/thinking-configuration#turning-thinking-off","content":"Some Claude models, claude-sonnet-5 among them, think before answering even when\nno thinkingConfig is given, and that thinking counts against the request's\nmax_tokens. To turn it off for a call, pass type: \"disabled\":\n\nNeuroLink sends thinking: { type: \"disabled\" } on both generate() and\nstream(). Turning thinking off does not change which sampling parameters a\nmodel accepts. On a model that takes a temperature, NeuroLink still sends it\nwith thinking disabled; it is dropped only while thinking is on. Some models,\nclaude-sonnet-5 among them, do not accept a temperature at all, and NeuroLink\nleaves it off for them whatever the thinking setting.\n\nenabled: false, or no thinkingConfig at all, sends nothing, so the model's own\ndefault applies. If enabled: true and budgetTokens are also set, thinking is\nenabled, as before.","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Turning thinking off","lvl3":""}},
4493
4494
  {"objectID":"2b5576316a6208f5cfec1c81bc1e6fef5b0183103738313b707f4f56e5cfa57a","title":"Configuration Options","url":"/docs/features/thinking-configuration#configuration-options","content":"The thinkingConfig object supports the following options:","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Configuration Options","lvl3":""}},
4494
4495
  {"objectID":"a8d5868d4d30b359f7c8882f700ef9b1930d1be223f54728849a4634314aa07f","title":"CLI Usage","url":"/docs/features/thinking-configuration#cli-usage","content":"Extended thinking is also available via the CLI:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"CLI Usage","lvl3":""}},
4495
4496
  {"objectID":"89ef76b888510f16b5214e2da51842acf293f9c6b751ba484a0a1261f5a82bbd","title":"Enable thinking with default settings","url":"/docs/features/thinking-configuration#enable-thinking-with-default-settings","content":"neurolink generate \"Solve this problem\" --thinking","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"Enable thinking with default settings","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.43.1",
3
+ "version": "12.43.3",
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": {
@@ -102,6 +102,7 @@
102
102
  "test:openai-compat-streaming-retry": "pnpm exec tsx test/continuous-test-suite-openai-compat-streaming-retry.ts",
103
103
  "test:anthropic-streaming-retry": "pnpm exec tsx test/continuous-test-suite-anthropic-streaming-retry.ts",
104
104
  "test:anthropic-silent-truncation": "pnpm exec tsx test/continuous-test-suite-anthropic-silent-truncation.ts",
105
+ "test:anthropic-thinking-disabled": "pnpm exec tsx test/continuous-test-suite-anthropic-thinking-disabled.ts",
105
106
  "test:cache-cost-accounting": "pnpm exec tsx test/continuous-test-suite-cache-cost-accounting.ts",
106
107
  "test:adjust-body-after-400": "pnpm exec tsx test/continuous-test-suite-adjust-body-after-400.ts",
107
108
  "test:zod3-schema-native-path": "pnpm exec tsx test/continuous-test-suite-zod3-schema-native-path.ts",