@juspay/neurolink 13.12.4 → 13.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/dist/browser/neurolink.min.js +440 -440
- package/dist/evaluation/scorers/rule/formatScorer.d.ts +8 -0
- package/dist/evaluation/scorers/rule/formatScorer.js +75 -6
- package/dist/neurolink.js +36 -6
- package/dist/providers/anthropic/client.js +96 -8
- package/dist/providers/openaiChatCompletionsBase.js +3 -2
- package/dist/providers/openaiChatCompletionsClient.js +53 -1
- package/dist/types/openaiCompatible.d.ts +6 -1
- package/dist/types/providers.d.ts +10 -0
- package/dist/types/stt.d.ts +6 -0
- package/dist/types/transcribe.d.ts +2 -0
- package/dist/utils/sttProcessor.d.ts +6 -0
- package/dist/utils/sttProcessor.js +39 -5
- package/docs-site/static/search-index.json +3 -2
- package/package.json +4 -1
|
@@ -4041,7 +4041,7 @@
|
|
|
4041
4041
|
{"objectID":"b09d53aab5231e5f44f2c4df7a1d0cbf1c3f6e07ac586dfe8294eca0948441b1","title":"CLI Equivalent","url":"/docs/features/task-manager#cli-equivalent","content":"CLI Equivalent","hierarchy":{"lvl0":"Features","lvl1":"TaskManager - Scheduled & Self-Running Tasks","lvl2":"CLI Equivalent","lvl3":""}},
|
|
4042
4042
|
{"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":""}},
|
|
4043
4043
|
{"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":""}},
|
|
4044
|
-
{"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\
|
|
4044
|
+
{"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\nWhen thinking is left off a request\n\nAnthropic rejects some requests that carry thinking, so on the anthropic\nprovider NeuroLink drops the thinking block from those requests and logs a\nwarning, instead of sending a request that would fail with a 400. (Claude on\nvertex does the same for generate({ schema }) and caps the budget the same\nway.)\n\nDropping the block is not the same as type: \"disabled\". The request then\ncarries no thinking field, so the model's own default applies, as described\nin Turning thinking off: a model that thinks by\ndefault may still think. NeuroLink never sends type: \"disabled\" in place of a\nbudget you asked for.\nA forced tool choice. toolChoice: \"required\", a named tool, a choice\n forced on a step by prepareStep or toolChoiceSteps, and generate({ schema })\n without tools (which forces a JSON tool) all force tool use, and Anthropic does\n not allow thinking with that. \"auto\" and \"none\" keep thinking.\nThe rest of a tool turn that started without thinking. Thinking cannot\n start partway through a tool call. While the last assistant message calls a\n tool and does not open with a thinking block, the block stays off, including","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"","lvl3":""}},
|
|
4045
4045
|
{"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":""}},
|
|
4046
4046
|
{"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":""}},
|
|
4047
4047
|
{"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":""}},
|
|
@@ -4054,6 +4054,7 @@
|
|
|
4054
4054
|
{"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":""}},
|
|
4055
4055
|
{"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":""}},
|
|
4056
4056
|
{"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":""}},
|
|
4057
|
+
{"objectID":"589e6cd4ac1d5c1827711b20f0b060ee0abc8a71533970a146c97fde65dc2672","title":"When thinking is left off a request","url":"/docs/features/thinking-configuration#when-thinking-is-left-off-a-request","content":"Anthropic rejects some requests that carry thinking, so on the anthropic\nprovider NeuroLink drops the thinking block from those requests and logs a\nwarning, instead of sending a request that would fail with a 400. (Claude on\nvertex does the same for generate({ schema }) and caps the budget the same\nway.)\n\nDropping the block is not the same as type: \"disabled\". The request then\ncarries no thinking field, so the model's own default applies, as described\nin Turning thinking off: a model that thinks by\ndefault may still think. NeuroLink never sends type: \"disabled\" in place of a\nbudget you asked for.\nA forced tool choice. toolChoice: \"required\", a named tool, a choice\n forced on a step by prepareStep or toolChoiceSteps, and generate({ schema })\n without tools (which forces a JSON tool) all force tool use, and Anthropic does\n not allow thinking with that. \"auto\" and \"none\" keep thinking.\nThe rest of a tool turn that started without thinking. Thinking cannot\n start partway through a tool call. While the last assistant message calls a\n tool and does not open with a thinking block, the block stays off, including\n when a new prompt follows tool results replayed from history. It comes back\n on the first request after the model answers without calling a tool.\nA budget that cannot fit. budgetTokens is capped at the request's\n maxTokens minus 1,024, which leaves room for the answer. When that cap is\n under Anthropic's 1,024-token minimum, the block is dropped.\nA budget that is not a finite number. A budgetTokens of Infinity, a\n negative number or a non-number is dropped rather than sent. A fractional\n budget is rounded down.","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"When thinking is left off a request","lvl3":""}},
|
|
4057
4058
|
{"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":""}},
|
|
4058
4059
|
{"objectID":"a8d5868d4d30b359f7c8882f700ef9b1930d1be223f54728849a4634314aa07f","title":"CLI Usage","url":"/docs/features/thinking-configuration#cli-usage","content":"Extended thinking is also available via the CLI:","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"CLI Usage","lvl3":""}},
|
|
4059
4060
|
{"objectID":"dff15a38f63c9eaa7de8aea3b61211b551702585d6a3eacf6631abd0bf985805","title":"CLI Options","url":"/docs/features/thinking-configuration#cli-options","content":"| 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 |","hierarchy":{"lvl0":"Features","lvl1":"Extended Thinking Configuration","lvl2":"CLI Options","lvl3":""}},
|
|
@@ -6860,7 +6861,7 @@
|
|
|
6860
6861
|
{"objectID":"227e33113855fae825493b60851693beeb2467f4f71008248886477e27fbbd27","title":"Streaming","url":"/docs/getting-started/providers/whistle#streaming","content":"Whistle streams natively. transcribeStream() takes PCM16LE mono frames (at\nsampleRate, default 16 kHz, any frame size), feeds the engine about a second\nat a time, and yields:\na final segment whenever the engine commits words (two consecutive\n passes agreed on them), with word timings measured from the start of the\n stream — join the finals with a space for the transcript;\nan interim segment carrying the unconfirmed tail whenever it changes.\n\nEach stream runs on a worker of its own, so it never interleaves with batch\ncalls on the same handler.","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Streaming","lvl3":""}},
|
|
6861
6862
|
{"objectID":"c292466ae8a0e9b28914ed9e6010c07ebb8425559e229ecdd1dfe36c352b0d89","title":"Audio formats","url":"/docs/getting-started/providers/whistle#audio-formats","content":"| Format | Decoded by |\n| --------------------------------------------------------------------- | -------------- |\n| WAV — 8/16/24/32-bit PCM, 32/64-bit float, any rate and channel count | Whistle itself |\n| raw pcm16 | Whistle itself |\n| mp3, m4a, mp4, ogg, opus, webm, flac, mpeg | ffmpeg |\n\nCompressed formats need ffmpeg: FFMPEG_PATH, the optional ffmpeg-static\npackage (pnpm add ffmpeg-static), or ffmpeg on PATH. Without one, the\ncall fails with an error that names the formats Whistle can read by itself.","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Audio formats","lvl3":""}},
|
|
6862
6863
|
{"objectID":"9429c5e0a71ffbdc447014b203905467c61b374d5583cb17a0e5cb90d96dcd93","title":"Environment variables","url":"/docs/getting-started/providers/whistle#environment-variables","content":"| Variable | Default | Meaning |\n| --------------------------------- | ------- | --------------------------------------------------------------- |\n| NEUROLINK_WHISTLE_DIR | — | Directory holding the three files |\n| NEUROLINK_MODEL_DIR | — | Parent directory for local models; Whistle uses <dir>/whistle |\n| NEUROLINK_WHISTLE_AUTO_DOWNLOAD | 1 | 0 forbids the first-use download |\n| NEUROLINK_WHISTLE_KEYWORDS | 0 | 1 enables keyword biasing from vocabulary |\n| FFMPEG_PATH | — | ffmpeg binary for compressed formats |","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Environment variables","lvl3":""}},
|
|
6863
|
-
{"objectID":"4b33ae49583501e03d79b64042c6a88b3e5272910a29161dcd353593af1a1424","title":"Runtime behaviour","url":"/docs/getting-started/providers/whistle#runtime-behaviour","content":"One warm worker thread per WhistleSTT instance holds the engine and the\n model (~0.2 s to start); requests are answered in order. The worker is\n unreferenced while idle, so it never keeps your process alive; call\n dispose() to stop it early.\nIf the worker crashes, the requests it held fail with an STTError, and the\n next call starts a fresh worker.","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Runtime behaviour","lvl3":""}},
|
|
6864
|
+
{"objectID":"4b33ae49583501e03d79b64042c6a88b3e5272910a29161dcd353593af1a1424","title":"Runtime behaviour","url":"/docs/getting-started/providers/whistle#runtime-behaviour","content":"One warm worker thread per WhistleSTT instance holds the engine and the\n model (~0.2 s to start); requests are answered in order. The worker is\n unreferenced while idle, so it never keeps your process alive; call\n dispose() to stop it early.\nA call that passes credentials.stt.whistle builds its own WhistleSTT; the\n SDK disposes it when the call ends. Only a handler you create or register\n yourself needs your dispose().\nIf the worker crashes, the requests it held fail with an STTError, and the\n next call starts a fresh worker.","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Runtime behaviour","lvl3":""}},
|
|
6864
6865
|
{"objectID":"4a9a4c2f798b0fcb3745e1c3d957b8e72b8ec103e51747d673f447ed1433e265","title":"Accuracy","url":"/docs/getting-started/providers/whistle#accuracy","content":"Whistle is a 17 MB model. It is accurate on clear speech in its seven\nlanguages, but it is noticeably behind cloud engines (Deepgram, ElevenLabs\nScribe, Google, Azure) and large Whisper-class models on accents,\nbackground noise, overlapping speakers, rare names and domain jargon, and it\ndoes not diarize. It is a sensible default for development, offline use and\nprivacy-sensitive audio; configure a cloud or self-hosted provider where\naccuracy matters, or add a dictionary and the correction layer of\ntranscribe().","hierarchy":{"lvl0":"Getting Started","lvl1":"Whistle (Built-in Local STT)","lvl2":"Accuracy","lvl3":""}},
|
|
6865
6866
|
{"objectID":"884ee0aaccf14df2941d0048aa7934768312271d2cfbd663d43599769dea63cc","title":"xAI Grok Provider Guide","url":"/docs/getting-started/providers/xai","content":"xAI Grok Provider Guide\n\nText + vision generation with the Grok family through a single API\n\nOverview\n\nxAI hosts Elon Musk's Grok family of models behind an OpenAI-compatible\nchat-completions endpoint. NeuroLink wraps api.x.ai/v1 so the same\ngenerate / stream contract used by every other provider works for Grok\nwithout translation.\ngrok-3 — flagship; best for complex reasoning, math, coding\ngrok-3-mini — faster + cheaper variant of Grok 3\ngrok-2-latest — previous flagship; still supported\ngrok-2-vision-latest — multimodal (text + images)\ngrok-beta — pre-release / experimental access\n\nKey Facts\nProtocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.x.ai/v1\nDefault model: grok-3\nContext window: 131K tokens (32K on grok-2-vision-latest)\nVision: Yes — grok-2-vision-latest accepts image inputs\nStreaming: Supported\nTool calling: Supported\nReasoning trace: Not exposed (use Grok-3 for natively-strong reasoning)\n\nQuick Start\nGet an API Key\n\nSign up at https://console.x.ai/ and create an\nAPI key under API Keys.\nConfigure Environment\n\nAdd to your .env file:\nInstall NeuroLink\nGenerate Your First Response\n\nSupported Models\n\n| Model ID | Family | Context | Vision | Notes |\n| ---------------------- | ------------- | ------- | ------ | -------------------------- |\n| grok-3 | Grok 3 | 131K | No | Default; best reasoning |\n| grok-3-mini | Grok 3 Mini | 131K | No | Faster + cheaper Grok 3 |\n| grok-2-latest | Grok 2 | 131K | No | Previous flagship |\n| grok-2-vision-latest | Grok 2 Vision | 32K | Yes | Multimodal text + image |\n| grok-beta | Beta | 131K | No | Pre-release / experimental |\n\nPass any model ID via --model (CLI) or model: (SDK).\n\nSDK Usage\n\nBasic Generation\n\nVision Input (Grok 2 Vision)\n\nStreaming\n\nTool Calling\n\nPer-Call Credential Override\n\nCLI Usage\n\nBasic Commands\n\nProvider Aliases\n\n| Alias | Example |\n| ------ | ----------------- |\n| xai | --provider xai |\n| grok | --provider grok |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default | Description |\n| -------------------- | -------- | --------------------- | ------------------------------- |\n| XAI_API_KEY | Yes | — | xAI API key |\n| XAI_MODEL | No | grok-3 | Default model to use |\n| XAI_BASE_URL | No | https://api.x.ai/v1 | Base URL (override for proxies) |\n\nFeature Support Matrix\n\n| Feature | grok-3 | grok-3-mini | grok-2-latest | grok-2-vision | grok-beta |\n| ----------------- | ------ | ----------- | ------------- | ------------- | --------- |\n| Text generation | Yes | Yes | Yes | Yes | Yes |\n| Streaming | Yes | Yes | Yes | Yes | Yes |\n| Tool calling | Yes | Yes | Yes | Yes | Yes |\n| Structured output | Yes | Yes | Yes | Yes | Yes |\n| Vision / images | No | No | No | Yes | No |\n| Embeddings | No | No | No | No | No |\n\nTroubleshooting\n\n\"Invalid xAI API key\"\n\nThe XAI_API_KEY is missing or incorrect.\n\nGet or rotate keys at https://console.x.ai/.\n\n\"xAI rate limit exceeded\"\n\nToo many requests in a short window. Implement exponential backoff or\nreduce concurrency. Free-tier limits are tight; consider upgrading at\nhttps://console.x.ai/.\n\n\"xAI account has insufficient quota\"\n\nTop up at https://console.x.ai/.\n\n\"Model not found\"\n\nUse one of the documented model IDs above. Custom fine-tunes are not\nexposed through the public API at this time.\n\nSee Also\nAdding a new LLM provider — internal reference for the integration pattern this provider follows\nDeepSeek Provider — sibling OpenAI-compat provider with reasoning models\nGroq Provider — sibling OpenAI-compat provider with sub-100ms inference\n\nNeed Help? Open a GitHub Discussion or issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"xAI Grok Provider Guide","lvl2":"","lvl3":""}},
|
|
6866
6867
|
{"objectID":"f15e86375a87a665a10229f6826884c69484bcf7465db56c3c727ea4c881b1f0","title":"xAI Grok Provider Guide","url":"/docs/getting-started/providers/xai#xai-grok-provider-guide","content":"Text + vision generation with the Grok family through a single API","hierarchy":{"lvl0":"Getting Started","lvl1":"xAI Grok Provider Guide","lvl2":"xAI Grok Provider Guide","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.6",
|
|
4
4
|
"packageManager": "pnpm@10.34.9+sha512.f49b5a8ea0fdedb44bb3c0c1d6575092a53c2950d95b7ad15df11f17974877a2de3a01c07e934e9b28ce716e51c09a94962c7306d09be2e1e4b18a8c8762fd32",
|
|
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": {
|
|
@@ -108,9 +108,12 @@
|
|
|
108
108
|
"test:multimodal-text-content-fold": "pnpm exec tsx test/continuous-test-suite-multimodal-text-content-fold.ts",
|
|
109
109
|
"test:proxy-sharing": "pnpm run build && pnpm exec tsx test/continuous-test-suite-proxy-sharing.ts",
|
|
110
110
|
"test:openai-compat-streaming-retry": "pnpm exec tsx test/continuous-test-suite-openai-compat-streaming-retry.ts",
|
|
111
|
+
"test:openai-compat-stream-truncation": "pnpm exec tsx test/continuous-test-suite-openai-compat-stream-truncation.ts",
|
|
112
|
+
"test:openai-compat-stream-cancel": "pnpm exec tsx test/continuous-test-suite-openai-compat-stream-cancel.ts",
|
|
111
113
|
"test:anthropic-streaming-retry": "pnpm exec tsx test/continuous-test-suite-anthropic-streaming-retry.ts",
|
|
112
114
|
"test:anthropic-silent-truncation": "pnpm exec tsx test/continuous-test-suite-anthropic-silent-truncation.ts",
|
|
113
115
|
"test:anthropic-thinking-disabled": "pnpm exec tsx test/continuous-test-suite-anthropic-thinking-disabled.ts",
|
|
116
|
+
"test:anthropic-thinking-forced-tool": "pnpm exec tsx test/continuous-test-suite-anthropic-thinking-forced-tool.ts",
|
|
114
117
|
"test:cache-cost-accounting": "pnpm exec tsx test/continuous-test-suite-cache-cost-accounting.ts",
|
|
115
118
|
"test:agent:cost": "pnpm exec tsx test/continuous-test-suite-agent-cost.ts",
|
|
116
119
|
"test:adjust-body-after-400": "pnpm exec tsx test/continuous-test-suite-adjust-body-after-400.ts",
|