@juspay/neurolink 12.37.1 → 12.37.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.
package/dist/neurolink.js CHANGED
@@ -8774,6 +8774,21 @@ Current user's request: ${currentInput}`;
8774
8774
  let availableTools = await this.getAllAvailableTools();
8775
8775
  // Apply per-call tool filtering for system prompt tool descriptions
8776
8776
  availableTools = this.applyToolInfoFiltering(availableTools, options);
8777
+ // M3: a provider whose descriptor declares toolSupport "none" can never
8778
+ // call a tool in ANY form — not natively, not via prompt injection — so
8779
+ // `availableTools` here is dead weight, not a signal. Left non-empty, it
8780
+ // still drives createToolAwareSystemPrompt()'s prompt-injection branch
8781
+ // (that branch triggers on `!provider.supportsTools()`, which is also
8782
+ // true for these providers) and inflates the stream budget check below
8783
+ // via `toolDefinitions`, so an image-generation-only provider like
8784
+ // Recraft can fail a fabricated "exceeds model budget" check before its
8785
+ // own request-kind routing (BaseProvider.stream() -> resolveRequestKind)
8786
+ // ever runs. Clearing it here restores the provider's real outcome —
8787
+ // its own refusal, a genuine vendor error, or success — as what
8788
+ // surfaces, without touching the budget check for any text provider.
8789
+ if (ProviderFactory.getDescriptor(providerName)?.toolSupport === "none") {
8790
+ availableTools = [];
8791
+ }
8777
8792
  // Skip tool prompt injection if skipToolPromptInjection is true.
8778
8793
  // For providers with native tool calling (instance truth via
8779
8794
  // supportsTools()), the listing is skipped and only the short damping
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.37.1",
3
+ "version": "12.37.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": {