@juspay/neurolink 13.12.5 → 13.13.0
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 +6 -4
- package/dist/adapters/tts/cartesiaHandler.js +4 -1
- package/dist/browser/neurolink.min.js +444 -444
- package/dist/core/constants.d.ts +11 -0
- package/dist/core/constants.js +11 -0
- package/dist/neurolink.d.ts +3 -0
- package/dist/neurolink.js +78 -2
- package/dist/providers/openaiChatCompletionsBase.js +3 -2
- package/dist/providers/openaiChatCompletionsClient.js +53 -1
- package/dist/proxy/proxyFetch.d.ts +29 -4
- package/dist/proxy/proxyFetch.js +95 -15
- package/dist/server/voice/voiceServerApp.js +4 -1
- package/dist/server/voice/voiceWebSocketHandler.js +30 -1
- package/dist/telemetry/jevRoutingAudit.d.ts +3 -0
- package/dist/telemetry/jevRoutingAudit.js +55 -0
- package/dist/types/openaiCompatible.d.ts +6 -1
- package/dist/types/proxy.d.ts +11 -0
- package/dist/types/toolRouting.d.ts +36 -0
- package/dist/utils/jevRoutingAudit.d.ts +5 -0
- package/dist/utils/jevRoutingAudit.js +145 -0
- package/dist/voice/livekit/realtimeModel.js +34 -0
- package/dist/voice/livekit/voiceAgent.js +7 -0
- package/dist/voice/providers/DeepgramSTT.js +2 -0
- package/dist/voice/providers/GeminiLive.js +2 -0
- package/dist/voice/providers/OpenAIRealtime.js +2 -0
- package/docs-site/static/search-index.json +10 -7
- package/package.json +6 -2
|
@@ -1553,13 +1553,15 @@
|
|
|
1553
1553
|
{"objectID":"895156731037a945cf1a19ab6a6e3c1eca36f1fdb3e4877684906225988e9193","title":"Minimal Setup (Google AI)","url":"/docs/deployment/configuration#minimal-setup-google-ai","content":"Minimal Setup (Google AI)","hierarchy":{"lvl0":"Deployment","lvl1":"⚙️ NeuroLink Configuration Guide","lvl2":"Minimal Setup (Google AI)","lvl3":""}},
|
|
1554
1554
|
{"objectID":"a63b60b395ad8774c7beb3be4b7eca9e61fabdf250398b7719019a6d98fb335e","title":"Multi-Provider Setup","url":"/docs/deployment/configuration#multi-provider-setup","content":"Multi-Provider Setup","hierarchy":{"lvl0":"Deployment","lvl1":"⚙️ NeuroLink Configuration Guide","lvl2":"Multi-Provider Setup","lvl3":""}},
|
|
1555
1555
|
{"objectID":"8c4194c033676b414a9cbcb896eb7d8ced6cdd8c282e081d9f65a35935a8d5ae","title":"Development Setup","url":"/docs/deployment/configuration#development-setup","content":"💡 For most users, setting GOOGLE_AI_API_KEY is sufficient to get started with NeuroLink and test all MCP functionality!","hierarchy":{"lvl0":"Deployment","lvl1":"⚙️ NeuroLink Configuration Guide","lvl2":"Development Setup","lvl3":""}},
|
|
1556
|
-
{"objectID":"941610580ad261eef95ac397ab4379c749dbdb2273196044111181d77204dee6","title":"🏢 Enterprise & Proxy Setup Guide","url":"/docs/deployment/enterprise-proxy","content":"🏢 Enterprise & Proxy Setup Guide\n\nNeuroLink routes supported HTTP request paths through configured proxies. Native AWS requests, Google authentication and Live WebSockets have separate transport rules described below.\n\n✨ Configure HTTP Proxy Routes\n\nSet the proxy environment variables before creating clients. Request paths that use NeuroLink's proxy-aware HTTP fetch read these settings; they do not establish proxy routing for every SDK or WebSocket transport.\n\nQuick Setup\n\n🔧 Environment Variables\n\nRequired Proxy Variables\n\n| Variable | Description | Example |\n| ------------- | ------------------------------- | ------------------------------- |\n| HTTPS_PROXY | Proxy server for HTTPS requests | http://proxy.company.com:8080 |\n| HTTP_PROXY | Proxy server for HTTP requests | http://proxy.company.com:8080 |\n\nOptional Proxy Variables\n\n| Variable
|
|
1556
|
+
{"objectID":"941610580ad261eef95ac397ab4379c749dbdb2273196044111181d77204dee6","title":"🏢 Enterprise & Proxy Setup Guide","url":"/docs/deployment/enterprise-proxy","content":"🏢 Enterprise & Proxy Setup Guide\n\nNeuroLink routes supported HTTP request paths through configured proxies. Native AWS requests, Google authentication and Live WebSockets have separate transport rules described below.\n\n✨ Configure HTTP Proxy Routes\n\nSet the proxy environment variables before creating clients. Request paths that use NeuroLink's proxy-aware HTTP fetch read these settings; they do not establish proxy routing for every SDK or WebSocket transport.\n\nQuick Setup\n\n🔧 Environment Variables\n\nRequired Proxy Variables\n\n| Variable | Description | Example |\n| ------------- | ------------------------------- | ------------------------------- |\n| HTTPS_PROXY | Proxy server for HTTPS requests | http://proxy.company.com:8080 |\n| HTTP_PROXY | Proxy server for HTTP requests | http://proxy.company.com:8080 |\n\nOptional Proxy Variables\n\n| Variable | Description | Default |\n| ------------------------ | --------------------------------------------------------------------------------------- | ------- |\n| NO_PROXY | Domains to bypass proxy. Nothing is exempt by default, loopback included | unset |\n| NEUROLINK_PROXY_STRICT | true makes a request whose proxy attempt failed fail, instead of retrying it directly | unset |\n\nFail-Closed (Strict) Mode\n\nBy default, when a request through the proxy fails (the proxy is unreachable or refuses it, its URL cannot be parsed, or it is a SOCKS URL), NeuroLink logs a warning and retries the request once over a direct connection. That keeps requests working, but it can expose the host's address and bypass a network policy that only allows egress through the proxy.\n\nSet NEUROLINK_PROXY_STRICT=true (1, yes and on also work) to fail closed: the request fails with the proxy error and no direct connection is attempted. The variable applies to every request sent through NeuroLink's proxy-aware fetch. Strict mode does not block hosts listed in NO_PROXY, or requests made while no proxy variable is set: those go direct by design. NeuroLink applies no built-in NO_PROXY default, so localhost and 127.0.0.1 targets also go through the proxy (and fail in strict mode when it does) unless you list them in NO_PROXY; this includes the loopback WebSocket endpoints of local voice services, which strict mode refuses until they are listed. Provider-returned media downloads never fall back, with or without the variable.\n\nThe voice WebSockets listed in the table below cannot go through a proxy at all, so under strict mode they are refused whenever a proxy applies to their endpoint: the voice providers throw before connecting, the LiveKit agent refuses to build the realtime model or the STT/TTS plugin, and the voice server closes a client session with code 1011 before allocating it.\n\nWhat strict mode does not cover, because those transports never use NeuroLink's fetch:\nNative AWS SDK clients (Bedrock runtime and control): their requests neither go through the proxy-aware fetch nor are blocked by NEUROLINK_PROXY_STRICT.\nGoogle ADC token acquisition and refresh (google-auth-library / gaxios): the token requests behind Vertex are outside the fetch hook and are not blocked either.\nThe LiveKit room and worker connection to the LiveKit server (@livekit/rtc-node and the agents worker): it is not checked against the proxy policy.\n\nIf your network must not allow any direct egress, enforce that at the network layer as well; strict mode is a guarantee about NeuroLink's own HTTP fetch and the WebSockets named here.\n\nSOCKS Proxies\n\nSOCKS_PROXY and socks4:// / socks5:// URLs in ALL_PROXY are recognized but not supported: no SOCKS client ships with the package. Such a request falls back to a direct connection with a warning, or fails under NEUROLINK_PROXY_STRICT. Use an HTTP(S) proxy, or an HTTP-to-SOCKS bridge in front of the SOCKS proxy.\n\n🌐 Provider-Specific Proxy Support\n\nTransport Coverage and Limits\n\n| Transport | Integration | Coverage limit |\n| ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Google AI Studio / Vertex @google/genai model HTTP | SDK HTTP fetch hook | The owned HTTP proxy suite covers AI Studio, Vertex Express and the direct web-search tool; it excludes ADC token requests and Live WebSockets. |\n| Other fetch-backed","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"","lvl3":""}},
|
|
1557
1557
|
{"objectID":"43028d624902e4bac6a20a616166ca1fa966694eab7b659e78c59265e5b70bf3","title":"🏢 Enterprise & Proxy Setup Guide","url":"/docs/deployment/enterprise-proxy#-enterprise-proxy-setup-guide","content":"NeuroLink routes supported HTTP request paths through configured proxies. Native AWS requests, Google authentication and Live WebSockets have separate transport rules described below.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"🏢 Enterprise & Proxy Setup Guide","lvl3":""}},
|
|
1558
1558
|
{"objectID":"045b2887b689ff5a60a9ec402681dac7c029843ee7c2607975ac6711b400f8fa","title":"✨ Configure HTTP Proxy Routes","url":"/docs/deployment/enterprise-proxy#-configure-http-proxy-routes","content":"Set the proxy environment variables before creating clients. Request paths that use NeuroLink's proxy-aware HTTP fetch read these settings; they do not establish proxy routing for every SDK or WebSocket transport.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"✨ Configure HTTP Proxy Routes","lvl3":""}},
|
|
1559
1559
|
{"objectID":"42b6a32e42e7b8a8f427fedf294a8e4a5c2b1d78ea959bbdc2b92d54a8ba6b34","title":"Quick Setup","url":"/docs/deployment/enterprise-proxy#quick-setup","content":"Quick Setup","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Quick Setup","lvl3":""}},
|
|
1560
1560
|
{"objectID":"4711bbfc48705c1a5e70543eea8a53cb87c0fb60ca8126d4b9f865397ad95203","title":"Required Proxy Variables","url":"/docs/deployment/enterprise-proxy#required-proxy-variables","content":"| Variable | Description | Example |\n| ------------- | ------------------------------- | ------------------------------- |\n| HTTPS_PROXY | Proxy server for HTTPS requests | http://proxy.company.com:8080 |\n| HTTP_PROXY | Proxy server for HTTP requests | http://proxy.company.com:8080 |","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Required Proxy Variables","lvl3":""}},
|
|
1561
|
-
{"objectID":"b81676839c9dd3f6d9e1b28f9da0145833f9843030ded65492f3eeedfd8bf5d4","title":"Optional Proxy Variables","url":"/docs/deployment/enterprise-proxy#optional-proxy-variables","content":"| Variable
|
|
1562
|
-
{"objectID":"
|
|
1561
|
+
{"objectID":"b81676839c9dd3f6d9e1b28f9da0145833f9843030ded65492f3eeedfd8bf5d4","title":"Optional Proxy Variables","url":"/docs/deployment/enterprise-proxy#optional-proxy-variables","content":"| Variable | Description | Default |\n| ------------------------ | --------------------------------------------------------------------------------------- | ------- |\n| NO_PROXY | Domains to bypass proxy. Nothing is exempt by default, loopback included | unset |\n| NEUROLINK_PROXY_STRICT | true makes a request whose proxy attempt failed fail, instead of retrying it directly | unset |","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Optional Proxy Variables","lvl3":""}},
|
|
1562
|
+
{"objectID":"52da32786292241f4c2a8a4416e0fd52099ab0f8c363a7a0f57b6d88146c766c","title":"Fail-Closed (Strict) Mode","url":"/docs/deployment/enterprise-proxy#fail-closed-strict-mode","content":"By default, when a request through the proxy fails (the proxy is unreachable or refuses it, its URL cannot be parsed, or it is a SOCKS URL), NeuroLink logs a warning and retries the request once over a direct connection. That keeps requests working, but it can expose the host's address and bypass a network policy that only allows egress through the proxy.\n\nSet NEUROLINK_PROXY_STRICT=true (1, yes and on also work) to fail closed: the request fails with the proxy error and no direct connection is attempted. The variable applies to every request sent through NeuroLink's proxy-aware fetch. Strict mode does not block hosts listed in NO_PROXY, or requests made while no proxy variable is set: those go direct by design. NeuroLink applies no built-in NO_PROXY default, so localhost and 127.0.0.1 targets also go through the proxy (and fail in strict mode when it does) unless you list them in NO_PROXY; this includes the loopback WebSocket endpoints of local voice services, which strict mode refuses until they are listed. Provider-returned media downloads never fall back, with or without the variable.\n\nThe voice WebSockets listed in the table below cannot go through a proxy at all, so under strict mode they are refused whenever a proxy applies to their endpoint: the voice providers throw before connecting, the LiveKit agent refuses to build the realtime model or the STT/TTS plugin, and the voice server closes a client session with code 1011 before allocating it.\n\nWhat strict mode does not cover, because those transports never use NeuroLink's fetch:\nNative AWS SDK clients (Bedrock runtime and control): their requests neither go through the proxy-aware fetch nor are blocked by NEUROLINK_PROXY_STRICT.\nGoogle ADC token acquisition and refresh (google-auth-library / gaxios): the token requests behind Vertex are outside the fetch hook and are not blocked either.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Fail-Closed (Strict) Mode","lvl3":""}},
|
|
1563
|
+
{"objectID":"0c0e23e63b089746e1621b9481be70689163746e446a17cef87f3c6a80dc5501","title":"SOCKS Proxies","url":"/docs/deployment/enterprise-proxy#socks-proxies","content":"SOCKS_PROXY and socks4:// / socks5:// URLs in ALL_PROXY are recognized but not supported: no SOCKS client ships with the package. Such a request falls back to a direct connection with a warning, or fails under NEUROLINK_PROXY_STRICT. Use an HTTP(S) proxy, or an HTTP-to-SOCKS bridge in front of the SOCKS proxy.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"SOCKS Proxies","lvl3":""}},
|
|
1564
|
+
{"objectID":"497dcba2174216e845c677240c77cbf228f3b12c37aec0537d152ba937ab4875","title":"Transport Coverage and Limits","url":"/docs/deployment/enterprise-proxy#transport-coverage-and-limits","content":"| Transport | Integration | Coverage limit |\n| ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Google AI Studio / Vertex @google/genai model HTTP | SDK HTTP fetch hook | The owned HTTP proxy suite covers AI Studio, Vertex Express and the direct web-search tool; it excludes ADC token requests and Live WebSockets. |\n| Other fetch-backed model requests | Provider-specific proxy-aware fetch | Check the actual provider request path; a configured variable or successful response alone is not routing proof. |\n| Native AWS SDK clients, including Bedrock runtime/control clients | AWS request handler and runtime configuration | Current native Bedrock constructors do not inject NeuroLink's proxy handler. Handler/agent/runtime behavior and bypass semantics need separate route tests. |\n| Voice WebSockets (Gemini Live, OpenAI Realtime, Deepgram streaming STT, Cartesia TTS, Soniox) | ws, built without a proxy agent | Always connect directly. With a proxy configured for the endpoint a warning is logged; under NEUROLINK_PROXY_STRICT the connection is refused instead.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Transport Coverage and Limits","lvl3":""}},
|
|
1563
1565
|
{"objectID":"c93810e1dbaea09a4a375a8b4743948cc0c7fe2328177e98b518a32a35ef22d9","title":"Test Proxy Configuration","url":"/docs/deployment/enterprise-proxy#test-proxy-configuration","content":"Test Proxy Configuration","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Test Proxy Configuration","lvl3":""}},
|
|
1564
1566
|
{"objectID":"16976d27e64bfdac1383c61cd5b36d02c01ab9be1d362e8a23b57fc8afc4f19f","title":"Verify Proxy Usage","url":"/docs/deployment/enterprise-proxy#verify-proxy-usage","content":"When proxy is working correctly, you should see:\n✅ The intended inference request appears in the proxy logs; a successful response alone does not prove routing\n✅ Proxy server logs showing intercepted connections\n✅ Proxy/bypass controls confirm the expected direct or proxied route for each transport\n✅ Enterprise MCP tools work alongside proxy","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Verify Proxy Usage","lvl3":""}},
|
|
1565
1567
|
{"objectID":"0558a41556980b7401c9369c35d7b4f5985fea7af25a1757c09beae801ca777c","title":"Owned HTTP Routing Tests","url":"/docs/deployment/enterprise-proxy#owned-http-routing-tests","content":"After building the package, run the current credential-free Google HTTP proxy suite:\n\nIt uses owned forward/direct stand-ins and request counters, with proxy-only response markers and proxy/bypass controls. Its source records the exact covered public paths. It does not certify all providers, native AWS routing, Gemini Live WebSockets or ADC token refresh. Test those transports separately with owned endpoints before relying on them in a constrained network.","hierarchy":{"lvl0":"Deployment","lvl1":"🏢 Enterprise & Proxy Setup Guide","lvl2":"Owned HTTP Routing Tests","lvl3":""}},
|
|
@@ -4070,6 +4072,7 @@
|
|
|
4070
4072
|
{"objectID":"0b9203bc3ddca1d61b578f4bea25de508f6a241da96f270ca4742163bd99884a","title":"One question per server","url":"/docs/features/tool-routing-decision-model#one-question-per-server","content":"Each routable server gets its own boolean question, built from its\ndescription (or, absent one, its tool names):\n\nA server is excluded only on a confident false — minDropConfidence\ndefaults to 0.6. undefined (unanswered, malformed, or too close to a\ncoin flip) and a confident true both keep the server. This is the same\nasymmetry as the classifier's upgrade/downgrade bars: keeping an unneeded\nserver costs a few hundred tokens of tool definitions; dropping a needed one\nbreaks the turn outright, because the model can never call a tool it was\nnever shown and has no way to ask for it back.\n\nTwo size guards bound the request: at most 200 servers are asked about\nin one batch (MAX_SERVERS), and the query text sent as state is capped at\n10,000 characters. Servers past the cap are never asked about and are\ntherefore always kept — a server that was not offered to the model must\nnever be silently dropped by its own absence from the question set.\n\nNeuroLink refuses a state it estimates at more than 16,000 tokens with\nmax_tokens_exceeded. A query long enough to be estimated above that is refused,\nand routing falls through to the generative router, as it does on any failure.","hierarchy":{"lvl0":"Features","lvl1":"Tool / MCP routing by decision model","lvl2":"One question per server","lvl3":""}},
|
|
4071
4073
|
{"objectID":"19352c9bf82d208bbd76e4303e3e35ac7d4f7497562a4f1ee006d8cf1fae5f6b","title":"The wording that made this work: a measured A/B result","url":"/docs/features/tool-routing-decision-model#the-wording-that-made-this-work-a-measured-ab-result","content":"The first phrasing tried was the obvious one: \"answering this request will\nrequire calling at least one tool from this server,\" with false meaning\n\"this server is unrelated, OR the request needs no tool at all.\" Measured\nagainst a 10-request × 5-server labelled set, it separated correctly but\nweakly — unrelated servers averaged p = 0.31 and reached as high as\n0.80, so at the 0.6 drop bar only 12 of 39 unneeded servers were\nactually dropped.\n\nThree changes fixed it: naming the server explicitly, asking in the present\ntense about what carrying out the request involves rather than what\n\"will require,\" and splitting the bundled false criterion (which was\nreally two separate claims joined by \"or\") into one single claim. That\nmoved unrelated servers to a mean of p = 0.03 with a maximum of 0.35\n— 37 of 39 dropped at the same 0.6 bar, still with zero wrong drops.\n\nThe lesson generalises past this one question: a decision model reads\nliterally, and an \"or\" in a criterion is two questions wearing one coat. Each\nhalf of a compound criterion pulls the answer toward the middle whenever\nonly one half is true, which is exactly the muddy, hard-to-gate signal the\nfirst version produced.","hierarchy":{"lvl0":"Features","lvl1":"Tool / MCP routing by decision model","lvl2":"The wording that made this work: a measured A/B result","lvl3":""}},
|
|
4072
4074
|
{"objectID":"9c9af1c1ff58051674501cb10c371fdcf50758c935a2dfa168df9719969bb7af","title":"What this is bad at","url":"/docs/features/tool-routing-decision-model#what-this-is-bad-at","content":"It reasons about servers, not individual tools. The unit of decision is\n a whole MCP server; a server with twenty tools where the request needs one\n is kept or dropped as a unit, not tool-by-tool.\nThe description quality bounds the question quality. A server with no\n declared description falls back to a comma-joined list of its own tool\n names, which carries much less signal than a well-written one-line\n description — the wording fix above only helps once the server's own text\n is legible to a literal reader.\nA close call still resolves to \"keep.\" There is no partial exclusion;\n anything from a coin flip up to just under 0.6 confidence is treated\n identically to a confident true.\nIt shares the base model's general limits — literal reading, no\n arithmetic, accuracy sensitive to a noisy or oversized state — all\n described in\n what decide is bad at.\nThe query is untrusted input sent as state, and this module does not\n sanitize it. The reach is deliberately bounded, not zero. Server ids are\n never read back off the wire (answers are matched by position, not by name),\n so a crafted query cannot name a tool that was not already registered, and\n the result is only a denylist appended to excludeTools. It can still steer\n a verdict: a confident false (0.6 by default) withholds that server's\n tools for the turn. Do not rely on this router as a security control; see\n the Untrusted input bullet under\n what decide is bad at.","hierarchy":{"lvl0":"Features","lvl1":"Tool / MCP routing by decision model","lvl2":"What this is bad at","lvl3":""}},
|
|
4075
|
+
{"objectID":"3c0ce381d408891bbe8ce0bb38598a966b1087d8531c2a66b5fb318cfece2c5c","title":"Opt-in JEV routing audits","url":"/docs/features/tool-routing-decision-model#opt-in-jev-routing-audits","content":"Hosts can record routing evidence for an offline judge without another inference\ncall. Collection is off by default because queries and server descriptions\nmay contain user data. Enable collection explicitly; a feature flag is optional:\n\nAfter successful TypeSafe/JEV server routing, NeuroLink creates one native\njev-routing-audit child on the existing active trace. The existing exporter\nsends it; this also works when the host owns the OpenTelemetry provider. There\nis no separate environment, Langfuse client or audit exporter to configure.\nInput: the actual context-enriched decision query, candidate server\n descriptions, catalogue fingerprint and evidence-completeness flag. Tool\n schemas, credentials and unrelated state are not copied.\nOutput: final retained/excluded candidate servers after routing guards,\n excluded tool count, strategy, outcome and evaluable.\nBounds: 6,000 query characters, 64 candidates, 256 characters per ID,\n 1,000 per description and 24,000 serialized input characters. Truncated\n evidence is non-evaluable; an oversized serialized payload is omitted.\nCache hits, generative fallback, other decision providers, unapplied/cancelled\n decisions and non-recording traces do not create a JEV audit. Existing manual\n exclusions and partial server availability are non-evaluable so a judge cannot\n falsely attribute policy removals to JEV. This is server-level routing evidence,\n not a check of arguments, executed tools or the final answer.\n\nIn Langfuse, filter observations by name jev-routing-audit and the host's\nexisting environment. Map evaluator variables to that observation's input and\noutput; an evaluator must treat evaluable: false as unknown. Judge execution is\nconfigured separately in Langfuse and is not triggered by this SDK option alone.\n\nWhen adopting this SDK support, remove any application-level decision wrapper\nand synthetic audit-span processor before enabling it. Running both would\nduplicate audit children.","hierarchy":{"lvl0":"Features","lvl1":"Tool / MCP routing by decision model","lvl2":"Opt-in JEV routing audits","lvl3":""}},
|
|
4073
4076
|
{"objectID":"b55a36dccb54a184ce24fa850942a8f5455cbe7f4391a23fc94f326aebeae19e","title":"See also","url":"/docs/features/tool-routing-decision-model#see-also","content":"The decide inference type\nModel routing with a decision model\nRelevance-driven compaction","hierarchy":{"lvl0":"Features","lvl1":"Tool / MCP routing by decision model","lvl2":"See also","lvl3":""}},
|
|
4074
4077
|
{"objectID":"868aff1102e3175cc67c89cc4d5bc4a20b86b1666dcd8d010b976d4b16364ece","title":"The transcribe inference type","url":"/docs/features/transcribe","content":"The transcribe inference type\n\nNeuroLink has four inference types. transcribe is the one that starts from audio:\n\n| Type | Call | Produces |\n| ---------------- | --------------------------------------------------- | -------------------------------- |\n| generate | neurolink.generate() | text |\n| stream | neurolink.stream() | text, incrementally |\n| decide | neurolink.decide() | typed judgements |\n| transcribe | neurolink.transcribe() / transcribeStream() | text from audio, with timing |\n\nIt runs through any registered speech-to-text (STT) engine and adds the layers\nthat make an engine usable on real speech: a dictionary of names and\njargon, a correction pass guarded by the decision model and finished by an\nLLM rewrite, a second-opinion engine, a fallback engine for audio the\nfirst one cannot read, and client-side streaming for engines that only\ntake whole files.\n\nZero configuration. With no STT provider configured, transcribe() uses\nWhistle, the built-in local engine: it runs on this machine, needs no key\nand no network; its model files (about 18 MB) ship inside the package.\nWhistle reads English, German, French, Spanish, Italian, Dutch and Polish; for\nother languages, accents, noisy rooms or heavy jargon, configure a cloud or\nself-hosted engine, or add a dictionary and correction.\n\nSDK\n\nSecurity: audio given as a URL must be HTTPS to a public host (set\nattachments.allowInsecureUrls / allowPrivateNetwork on the instance to\nrelax that) and is capped while it downloads; audio given as a path is\nbounded by attachments.allowedRoots when configured. See\nAttachment Security.\n\naudio accepts bytes (Buffer, ArrayBuffer, Uint8Array), a path, a\nfile:// URL or an http(s):// URL. The container is inferred from the path\nor the bytes; pass format (\"wav\", \"mp3\", \"m4a\", \"ogg\", \"opus\",\n\"webm\", \"flac\", \"mp4\", \"pcm16\" …) for a buffer it cannot be read from.\n\nOptions\n\n| Option | Meaning |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| provider | STT provider name or alias. Default: NEUROLINK_STT_PROVIDER, then the first configured provider, then Whistle. |\n| model | Model of that provider. Default: NEUROLINK_STT_MODEL, only when the provider also came from the environment. |\n| language | Language code or locale, or \"auto\". Default: NEUROLINK_STT_LANGUAGE, else the engine detects it. |\n| prompt | Context prompt for engines that bias on one; dictionary terms are appended to it. |\n| diarization | Label speakers, on engines that diarize. |\n| wordTimestamps | Ask for word-level timings. |\n| dictionary | Names and jargon, see Dictionary. |\n| correction | The correction layer, see Correction. |\n| fallback | { provider, model?, when? }, see Fallback. |\n| streaming | Tuning for transcribeStream(), see Streaming. |\n| timeoutMs | Whole-call timeout. |\n| credentials | Per-call credentials; the stt slice (credentials.stt.whisper.apiKey, credentials.stt.deepgram.apiKey …) beats the env vars. |\n\nResult\n\nTranscribeResult is the engine's STTResult (text, confidence,\nlanguage, duration, words, segments, speakers, metadata) plus what\nthe layers did:\n\n| Field | Meaning |\n| ------------------ | -------------------------------------------------------------------------------------------------------- |\n| raw | The engine's text before any correction. |\n| text | The final text — the corrected text when correction changed it, else raw. |\n| corrected | Present only when correction changed the text. |\n| languageDetected | false when the engine repo","hierarchy":{"lvl0":"Features","lvl1":"The transcribe inference type","lvl2":"","lvl3":""}},
|
|
4075
4078
|
{"objectID":"022bf9f0cc0df8253fa229c043dc4762f656ee2c7d69e782484cb8425973befb","title":"The transcribe inference type","url":"/docs/features/transcribe#the-transcribe-inference-type","content":"NeuroLink has four inference types. transcribe is the one that starts from audio:\n\n| Type | Call | Produces |\n| ---------------- | --------------------------------------------------- | -------------------------------- |\n| generate | neurolink.generate() | text |\n| stream | neurolink.stream() | text, incrementally |\n| decide | neurolink.decide() | typed judgements |\n| transcribe | neurolink.transcribe() / transcribeStream() | text from audio, with timing |\n\nIt runs through any registered speech-to-text (STT) engine and adds the layers\nthat make an engine usable on real speech: a dictionary of names and\njargon, a correction pass guarded by the decision model and finished by an\nLLM rewrite, a second-opinion engine, a fallback engine for audio the\nfirst one cannot read, and client-side streaming for engines that only\ntake whole files.\n\nZero configuration. With no STT provider configured, transcribe() uses\nWhistle, the built-in local engine: it runs on this machine, needs no key\nand no network; its model files (about 18 MB) ship inside the package.\nWhistle reads English, German, French, Spanish, Italian, Dutch and Polish; for\nother languages, accents, noisy rooms or heavy jargon, configure a cloud or\nself-hosted engine, or add a dictionary and correction.","hierarchy":{"lvl0":"Features","lvl1":"The transcribe inference type","lvl2":"The transcribe inference type","lvl3":""}},
|
|
@@ -4357,7 +4360,7 @@
|
|
|
4357
4360
|
{"objectID":"431689ba499d41494c0a196cc9c7164e411c111a6531803ebae6b06becc05acd","title":"Cost Optimization","url":"/docs/getting-started/environment-variables#cost-optimization","content":"NEUROLINK_EVALUATION_PREFER_CHEAP: Cost optimization preference\nOptions: true, false\nDefault: true\nUsage: When enabled, prioritizes cheaper providers and models\n\nNEUROLINK_EVALUATION_MAX_COST_PER_EVAL: Cost limit per evaluation\nFormat: Decimal number (USD)\nDefault: 0.01 ($0.01)\nUsage: Prevents expensive evaluations, switches to cheaper providers if needed","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Cost Optimization","lvl3":""}},
|
|
4358
4361
|
{"objectID":"eeeacca406ec6853eed300ca8ac80a44cb3b9c55ace573ac8bcae5743cd1ea1c","title":"Complete Universal Evaluation Example","url":"/docs/getting-started/environment-variables#complete-universal-evaluation-example","content":"Complete Universal Evaluation Example","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Complete Universal Evaluation Example","lvl3":""}},
|
|
4359
4362
|
{"objectID":"74acbb4ca3eca5d3470e4b492e32a95b1a180d01b3850c1d512d52757bab05fa","title":"Testing Universal Evaluation","url":"/docs/getting-started/environment-variables#testing-universal-evaluation","content":"Testing Universal Evaluation","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Testing Universal Evaluation","lvl3":""}},
|
|
4360
|
-
{"objectID":"6cce8afe8128b6c9013bc983c389eb925ade55d2d0709c415c9c3e35b1a7826c","title":"Proxy Environment Variables","url":"/docs/getting-started/environment-variables#proxy-environment-variables","content":"| Variable
|
|
4363
|
+
{"objectID":"6cce8afe8128b6c9013bc983c389eb925ade55d2d0709c415c9c3e35b1a7826c","title":"Proxy Environment Variables","url":"/docs/getting-started/environment-variables#proxy-environment-variables","content":"| Variable | Description | Example |\n| ------------------------ | --------------------------------------------------------------------------------- | ---------------------------------- |\n| HTTPS_PROXY | Proxy server for HTTPS requests | http://proxy.company.com:8080 |\n| HTTP_PROXY | Proxy server for HTTP requests | http://proxy.company.com:8080 |\n| NO_PROXY | Domains to bypass proxy | localhost,127.0.0.1,.company.com |\n| NEUROLINK_PROXY_STRICT | true: fail a request whose proxy attempt failed instead of retrying it directly | true |\n\nThe shared HTTP proxy fetch accepts comma- or whitespace-separated NO_PROXY entries. Entries are case-insensitive: * bypasses all; example.com, .example.com and *.example.com cover the host and its subdomains; example.com:8443 restricts a match to that effective port (HTTP defaults to 80, HTTPS to 443). One trailing dot is normalized for domain names. IPv4/IPv6 literals match exactly, including [::1]:8080; IPv4 CIDR entries apply only to literal IPv4 targets, and IPv6 CIDR is unsupported. Dot-only entries (. or ..) match nothing.\n\nThese rules apply to request paths that use NeuroLink's HTTP proxy fetch. Native AWS handlers, Gemini Live WebSockets and Vertex ADC token requests use separate transports/dependency rules. See Enterprise & Proxy Setup for those limits. The legacy AWS proxy selector uses a smaller comma-separated matcher; it supports exact hosts, leading-dot subdomain suffixes and *, without the full port/wildcard/CIDR syntax. It is not automatically injected into the native Bedrock constructors.","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Proxy Environment Variables","lvl3":""}},
|
|
4361
4364
|
{"objectID":"d5cabd5bf6ae965d7bf7274d74934ba63f7d8b3567bc4b54317270dade223d44","title":"Authenticated Proxy","url":"/docs/getting-started/environment-variables#authenticated-proxy","content":"All NeuroLink providers automatically use proxy settings when configured.\n\nFor detailed proxy setup → See Enterprise & Proxy Setup Guide","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Authenticated Proxy","lvl3":""}},
|
|
4362
4365
|
{"objectID":"96f097f6d9469424006fdd38df37a1bdfbfdc10da5309f7c27b1704e2294f4d9","title":"Required Variables","url":"/docs/getting-started/environment-variables#required-variables","content":"Required Variables","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Required Variables","lvl3":""}},
|
|
4363
4366
|
{"objectID":"9597f43959ce65fa68b84de379c49cfbecae2c07154799c41161f0082e8f6c6a","title":"Optional Variables","url":"/docs/getting-started/environment-variables#optional-variables","content":"Optional Variables","hierarchy":{"lvl0":"Getting Started","lvl1":"🔧 Environment Variables Configuration Guide","lvl2":"Optional Variables","lvl3":""}},
|
|
@@ -6253,10 +6256,10 @@
|
|
|
6253
6256
|
{"objectID":"e2d66c098b27a18e31a0985c2b41817ec2896b37532ec07b38e09f1ed760c1b7","title":"\"OpenAI TTS request timed out after 30 seconds\"","url":"/docs/getting-started/providers/openai-tts#openai-tts-request-timed-out-after-30-seconds","content":"A network issue or overloaded API caused the request to time out. Retry the request — the error is marked retriable by NeuroLink's error system.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI TTS Provider Guide","lvl2":"\"OpenAI TTS request timed out after 30 seconds\"","lvl3":""}},
|
|
6254
6257
|
{"objectID":"9a54f6363be2937d7c7f9328a1e90b4e1945f5d0c31f3e66477c6468d131b099","title":"Audio sounds distorted at high speed","url":"/docs/getting-started/providers/openai-tts#audio-sounds-distorted-at-high-speed","content":"Speeds above 2.0 can introduce artifacts. Use speed: 1.0 – 1.5 for natural-sounding output.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI TTS Provider Guide","lvl2":"Audio sounds distorted at high speed","lvl3":""}},
|
|
6255
6258
|
{"objectID":"f98d39032204ab3aed29744d24a667388d714a7e1214577e166e2d377469d80e","title":"See Also","url":"/docs/getting-started/providers/openai-tts#see-also","content":"TTS Integration Guide — complete multi-provider TTS reference\nAudio Input (STT) — speech-to-text counterpart\nOpenAI Provider Guide — full OpenAI text generation provider\nElevenLabs Provider Guide — alternative TTS provider with voice cloning\n\nNeed Help? Join the GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI TTS Provider Guide","lvl2":"See Also","lvl3":""}},
|
|
6256
|
-
{"objectID":"988dc021ae1e24ac074ba6ccd12141310a44053f1327466076993828c5bf0d61","title":"OpenAI Provider Guide","url":"/docs/getting-started/providers/openai","content":"OpenAI Provider Guide\n\nAccess GPT-5.4, GPT-5, GPT-4o, o-series reasoning models, and embedding models through the OpenAI API\n\nOverview\n\nOpenAI provides API access to the GPT model family, including the GPT-6 family, the GPT-5.4 series, GPT-5 series, GPT-4o multimodal models, and o-series reasoning models. NeuroLink talks to the OpenAI HTTP API directly — generation, streaming, tool calling, vision and embeddings are all served by NeuroLink's own client, with no third-party model SDK in the path.\n\nKey Benefits\nGPT-5.4 Series: Flagship models (March 2026) with 1.05M context (gpt-5.4, gpt-5.4-pro; mini and nano 400K)\nGPT-5 Series: Flagship models with up to 400K context windows\nGPT-4.1 Series: 1M context window models for large document processing\nGPT-4o: Multimodal model with vision support\no-Series Reasoning: o3, o3-pro, and o4-mini for deep reasoning tasks\nEmbeddings: text-embedding-3-small and other embedding models\nTool/Function Calling: Full support for agent workflows\nStreaming: Real-time streaming responses with tool execution\nProxy Support: Route requests through HTTP/HTTPS
|
|
6259
|
+
{"objectID":"988dc021ae1e24ac074ba6ccd12141310a44053f1327466076993828c5bf0d61","title":"OpenAI Provider Guide","url":"/docs/getting-started/providers/openai","content":"OpenAI Provider Guide\n\nAccess GPT-5.4, GPT-5, GPT-4o, o-series reasoning models, and embedding models through the OpenAI API\n\nOverview\n\nOpenAI provides API access to the GPT model family, including the GPT-6 family, the GPT-5.4 series, GPT-5 series, GPT-4o multimodal models, and o-series reasoning models. NeuroLink talks to the OpenAI HTTP API directly — generation, streaming, tool calling, vision and embeddings are all served by NeuroLink's own client, with no third-party model SDK in the path.\n\nKey Benefits\nGPT-5.4 Series: Flagship models (March 2026) with 1.05M context (gpt-5.4, gpt-5.4-pro; mini and nano 400K)\nGPT-5 Series: Flagship models with up to 400K context windows\nGPT-4.1 Series: 1M context window models for large document processing\nGPT-4o: Multimodal model with vision support\no-Series Reasoning: o3, o3-pro, and o4-mini for deep reasoning tasks\nEmbeddings: text-embedding-3-small and other embedding models\nTool/Function Calling: Full support for agent workflows\nStreaming: Real-time streaming responses with tool execution\nProxy Support: Route requests through HTTP/HTTPS proxies\n\nProvider Aliases\n\nYou can reference this provider using any of the following names:\n\n| Alias | Usage |\n| --------- | --------------------------- |\n| openai | Canonical provider name |\n| gpt | Short alias for convenience |\n| chatgpt | Alternative alias |\n\nThese aliases are registered in src/lib/factories/providerRegistry.ts.\n\nQuick Start\nGet Your API Key\nVisit platform.openai.com/api-keys\nSign in or create an account\nClick Create new secret key\nCopy your new API key (starts with sk-)\nConfigure Environment\n\nAdd to your .env file:\n\nOPENAI_API_KEY also configures decisions. The same variable configures the\nOpenAI Decisions provider (openai-decisions, which\nserves decide()). So setting it for chat also lets NeuroLink's built-in\nfeatures send decision requests to OpenAI when no TypeSafe, Laya, XOR, SubQ,\nPerplexity or Cloudflare Clef provider is configured, and context compaction\nneeds no other opt-in to do so. Those are paid calls, and they fail open. To\navoid that, pass the key through the SDK as credentials.openai.apiKey instead\nof the environment, and keep it out of .env too: the SDK and the CLI load that\nfile into the environment, so an OPENAI_API_KEY line like the one above would\nstill configure decisions. See\nWhat is sent to OpenAI and\nOne key, two providers.\nIf you point the chat provider at a gateway (LiteLLM, vLLM and the like) with\nOPENAI_BASE_URL, OPENAI_API_BASE or credentials.openai.baseURL, the key is the gateway's and is not\nused for decisions by default: while any of them names a host other than\nhttps://api.openai.com, NeuroLink's built-in features send nothing to OpenAI's\nDecisions API (only a call that names openai-decisions does, with that key). See\nA gateway's key.\nTest the Setup\n\nSupported Models\n\nAvailable Models (from OpenAIModels enum)\n\n| Enum Key | Model ID | Series | Context Window | Notes |\n| --------------------- | --------------------- | ------------ | -------------- | ------------------------ |\n| GPT_6_ASTRA | gpt-6-astra | GPT-6 | 1.05M | New (September 2026) |\n| GPT_6_SOL | gpt-6-sol | GPT-6 | 1.05M | New (September 2026) |\n| GPT_6_LUNA | gpt-6-luna | GPT-6 | 1.05M | New (September 2026) |\n| GPT_5_4 | gpt-5.4 | GPT-5.4 | 1.05M | New (March 2026) |\n| GPT_5_4_MINI | gpt-5.4-mini | GPT-5.4 | 400K | New (March 2026) |\n| GPT_5_4_NANO | gpt-5.4-nano | GPT-5.4 | 400K | New (March 2026) |\n| GPT_5_3_CODEX | gpt-5.3-codex | GPT-5.3 | 400K | |\n| GPT_5_2 | gpt-5.2 | GPT-5.2 | 400K | |\n| GPT_5_2_CHAT_LATEST | gpt-5.2-chat-latest | GPT-5.2 | 128K | |\n| GPT_5_2_PRO | gpt-5.2-pro | GPT-5.2 | 400K | |\n| GPT_5_2_CODEX | gpt-5.2-codex | GPT-5.2 | 400K | |\n| GPT_5_1 | gpt-5.1 | GPT-5.1 | 400K | |\n| GPT_5_1_CHAT_LATEST | gpt-5.1-chat-latest | GPT-5.1 | 128K | |\n| GPT_5_1_CODEX | gpt-5.1-codex | GPT-5.1 | 400K | |\n| GPT_5_1_CODEX_MAX | gpt-5.1-codex-max | GPT-5.1 | 400K | |\n| GPT_5_1_CODEX_MINI | gpt-5.1-codex-mini | GPT-5.1 | 400K | |\n| GPT_5 | gpt-5 | GPT-5 | 400K | |\n| GPT_5_MINI | gpt-5-mini | GPT-5 | 400K | ","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"","lvl3":""}},
|
|
6257
6260
|
{"objectID":"09a56d9dc91320ff37eda19c92d08529dc6471dd3b273124ca539bf8c68cf8eb","title":"OpenAI Provider Guide","url":"/docs/getting-started/providers/openai#openai-provider-guide","content":"Access GPT-5.4, GPT-5, GPT-4o, o-series reasoning models, and embedding models through the OpenAI API","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"OpenAI Provider Guide","lvl3":""}},
|
|
6258
6261
|
{"objectID":"00a9eec16078fe5bf845c9876ae67265e060b64f3150a402681173526d5f9037","title":"Overview","url":"/docs/getting-started/providers/openai#overview","content":"OpenAI provides API access to the GPT model family, including the GPT-6 family, the GPT-5.4 series, GPT-5 series, GPT-4o multimodal models, and o-series reasoning models. NeuroLink talks to the OpenAI HTTP API directly — generation, streaming, tool calling, vision and embeddings are all served by NeuroLink's own client, with no third-party model SDK in the path.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Overview","lvl3":""}},
|
|
6259
|
-
{"objectID":"7ef3ddd9cd1195ba96e4a45b2019a85d9ef0f4aa77585f4cff3f58140d40ea8e","title":"Key Benefits","url":"/docs/getting-started/providers/openai#key-benefits","content":"GPT-5.4 Series: Flagship models (March 2026) with 1.05M context (gpt-5.4, gpt-5.4-pro; mini and nano 400K)\nGPT-5 Series: Flagship models with up to 400K context windows\nGPT-4.1 Series: 1M context window models for large document processing\nGPT-4o: Multimodal model with vision support\no-Series Reasoning: o3, o3-pro, and o4-mini for deep reasoning tasks\nEmbeddings: text-embedding-3-small and other embedding models\nTool/Function Calling: Full support for agent workflows\nStreaming: Real-time streaming responses with tool execution\nProxy Support: Route requests through HTTP/HTTPS
|
|
6262
|
+
{"objectID":"7ef3ddd9cd1195ba96e4a45b2019a85d9ef0f4aa77585f4cff3f58140d40ea8e","title":"Key Benefits","url":"/docs/getting-started/providers/openai#key-benefits","content":"GPT-5.4 Series: Flagship models (March 2026) with 1.05M context (gpt-5.4, gpt-5.4-pro; mini and nano 400K)\nGPT-5 Series: Flagship models with up to 400K context windows\nGPT-4.1 Series: 1M context window models for large document processing\nGPT-4o: Multimodal model with vision support\no-Series Reasoning: o3, o3-pro, and o4-mini for deep reasoning tasks\nEmbeddings: text-embedding-3-small and other embedding models\nTool/Function Calling: Full support for agent workflows\nStreaming: Real-time streaming responses with tool execution\nProxy Support: Route requests through HTTP/HTTPS proxies","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Key Benefits","lvl3":""}},
|
|
6260
6263
|
{"objectID":"266efd96b42e82eae06984fdf0aaa0e27101a28514514b7349737efe2274beb5","title":"Provider Aliases","url":"/docs/getting-started/providers/openai#provider-aliases","content":"You can reference this provider using any of the following names:\n\n| Alias | Usage |\n| --------- | --------------------------- |\n| openai | Canonical provider name |\n| gpt | Short alias for convenience |\n| chatgpt | Alternative alias |\n\nThese aliases are registered in src/lib/factories/providerRegistry.ts.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Provider Aliases","lvl3":""}},
|
|
6261
6264
|
{"objectID":"769a8aea5668e683c64e455fc484af87c547264189eaed08c2ff047dfc535167","title":"1. Get Your API Key","url":"/docs/getting-started/providers/openai#1-get-your-api-key","content":"Visit platform.openai.com/api-keys\nSign in or create an account\nClick Create new secret key\nCopy your new API key (starts with sk-)","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"1. Get Your API Key","lvl3":""}},
|
|
6262
6265
|
{"objectID":"c2df7c52c3715cfca6e8c91fd43d047a5c50e2fd573e9ca5b78784aa4b98068c","title":"2. Configure Environment","url":"/docs/getting-started/providers/openai#2-configure-environment","content":"Add to your .env file:\n\nOPENAI_API_KEY also configures decisions. The same variable configures the\nOpenAI Decisions provider (openai-decisions, which\nserves decide()). So setting it for chat also lets NeuroLink's built-in\nfeatures send decision requests to OpenAI when no TypeSafe, Laya, XOR, SubQ,\nPerplexity or Cloudflare Clef provider is configured, and context compaction\nneeds no other opt-in to do so. Those are paid calls, and they fail open. To\navoid that, pass the key through the SDK as credentials.openai.apiKey instead\nof the environment, and keep it out of .env too: the SDK and the CLI load that\nfile into the environment, so an OPENAI_API_KEY line like the one above would\nstill configure decisions. See\nWhat is sent to OpenAI and\nOne key, two providers.\nIf you point the chat provider at a gateway (LiteLLM, vLLM and the like) with\nOPENAI_BASE_URL, OPENAI_API_BASE or credentials.openai.baseURL, the key is the gateway's and is not\nused for decisions by default: while any of them names a host other than\nhttps://api.openai.com, NeuroLink's built-in features send nothing to OpenAI's\nDecisions API (only a call that names openai-decisions does, with that key). See\nA gateway's key.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"2. Configure Environment","lvl3":""}},
|
|
@@ -6277,7 +6280,7 @@
|
|
|
6277
6280
|
{"objectID":"6e454ac3ebb2e9c2046fd5918ef41c3aaae2ce4cc21985a6bedb539fe3ecec7b","title":"Tool Validation","url":"/docs/getting-started/providers/openai#tool-validation","content":"The provider performs OpenAI-specific validation on each tool before sending:\nTools must have a description (string) and execute (function)\nParameters must be either a Zod schema or a valid JSON schema with type: \"object\"\nInvalid tools are filtered out with a warning log","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Tool Validation","lvl3":""}},
|
|
6278
6281
|
{"objectID":"b42a4afac0149ade47fdccc1bfa2d1f5bc78690ad153b8199a58dded6644b3fa","title":"Streaming Responses","url":"/docs/getting-started/providers/openai#streaming-responses","content":"The streaming implementation is NeuroLink's own HTTP + SSE client (src/lib/providers/openaiChatCompletionsBase.ts), which parses the server-sent event stream directly and handles both text and tool-call chunks. Multi-step tool execution is supported with configurable maxSteps.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Streaming Responses","lvl3":""}},
|
|
6279
6282
|
{"objectID":"f8b1c63b3fad5fd576d6f714964fd3fd9ead360b8c44eb475c1363f4a22258a1","title":"CLI Streaming","url":"/docs/getting-started/providers/openai#cli-streaming","content":"CLI Streaming","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"CLI Streaming","lvl3":""}},
|
|
6280
|
-
{"objectID":"8b63ec7f7470e29162879dc1d522b98f0cb9991cf780e0f3dfd4534651530b35","title":"Proxy Support","url":"/docs/getting-started/providers/openai#proxy-support","content":"The OpenAI provider uses createProxyFetch() to route API requests through a proxy when configured. The proxy is detected from standard environment variables:\n\nPriority order: protocol-specific (HTTPS_PROXY / HTTP_PROXY) > ALL_PROXY
|
|
6283
|
+
{"objectID":"8b63ec7f7470e29162879dc1d522b98f0cb9991cf780e0f3dfd4534651530b35","title":"Proxy Support","url":"/docs/getting-started/providers/openai#proxy-support","content":"The OpenAI provider uses createProxyFetch() to route API requests through a proxy when configured. The proxy is detected from standard environment variables:\n\nPriority order: protocol-specific (HTTPS_PROXY / HTTP_PROXY) > ALL_PROXY. SOCKS proxies (SOCKS_PROXY, or a socks5:// URL) are not supported: the request falls back to a direct connection with a warning, or fails when NEUROLINK_PROXY_STRICT=true. See Enterprise & Proxy Setup.\n\nBoth the generation/streaming requests and embedding requests use proxy-aware fetch.","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Proxy Support","lvl3":""}},
|
|
6281
6284
|
{"objectID":"156a01f128adae2c6cb8d49f38f15e2facb3de4296b0385e7b4c794aa9423faa","title":"Environment Variables","url":"/docs/getting-started/providers/openai#environment-variables","content":"| Variable | Description | Default | Required |\n| ------------------------ | ------------------------------------------ | ------------------------ | -------- |\n| OPENAI_API_KEY | API key for authentication | - | Yes |\n| OPENAI_MODEL | Default model to use | gpt-4o-mini | No |\n| OPENAI_EMBEDDING_MODEL | Default embedding model | text-embedding-3-small | No |\n| OPENAI_MAX_TOOLS | Maximum number of tools per request | 150 | No |\n| HTTPS_PROXY | HTTPS proxy URL | - | No |\n| HTTP_PROXY | HTTP proxy URL | - | No |\n| ALL_PROXY | Catch-all proxy URL | - | No |\n| NO_PROXY | Comma-separated list of proxy bypass hosts | - | No |","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Environment Variables","lvl3":""}},
|
|
6282
6285
|
{"objectID":"1a40503c2dbba4c5ba98ee6014fa83b11ebdcfe413fe5a0e0a5dd25a1617803e","title":"CLI Provider Options","url":"/docs/getting-started/providers/openai#cli-provider-options","content":"| Flag | Values | Description |\n| ------------------- | -------------------------- | --------------------- |\n| --provider / -p | openai, gpt, chatgpt | Use OpenAI provider |\n| --model / -m | model ID string | Specific model to use |\n| --temperature | 0.0 - 2.0 | Sampling temperature |\n| --max-tokens | integer | Maximum output tokens |","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"CLI Provider Options","lvl3":""}},
|
|
6283
6286
|
{"objectID":"5e5f8c659d605863130813b6d5f81a9725fcc70b3a45cd40569ba2126836d593","title":"Error Handling","url":"/docs/getting-started/providers/openai#error-handling","content":"The OpenAI provider maps errors to specific error types:\n\n| Error Type | Condition |\n| --------------------- | -------------------------------------------------------- |\n| AuthenticationError | Invalid API key (API_KEY_INVALID or invalid_api_key) |\n| RateLimitError | Rate limit exceeded (rate_limit_error) |\n| InvalidModelError | Model not found (model_not_found) |\n| NetworkError | Timeout errors |\n| ProviderError | All other OpenAI API errors |","hierarchy":{"lvl0":"Getting Started","lvl1":"OpenAI Provider Guide","lvl2":"Error Handling","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.13.0",
|
|
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,6 +108,8 @@
|
|
|
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",
|
|
@@ -281,7 +283,8 @@
|
|
|
281
283
|
"test:reasoning-parity-live": "pnpm exec tsx test/continuous-test-suite-reasoning-parity-live.ts",
|
|
282
284
|
"test:ci": "pnpm run test && pnpm run test:client && pnpm run test:hitl",
|
|
283
285
|
"// CI tier — fast, no live AI calls, safe for every commit (test:unit; also see the separate provider-safety-net CI job, which runs build + test:providers-mocked + test:provider-structure + test:error-classifier-contract on every PR)": "",
|
|
284
|
-
"test:tool-routing": "pnpm exec tsx test/continuous-test-suite-tool-routing.ts",
|
|
286
|
+
"test:tool-routing": "pnpm exec tsx test/continuous-test-suite-tool-routing.ts && pnpm run test:jev-routing-audit",
|
|
287
|
+
"test:jev-routing-audit": "pnpm exec tsx test/continuous-test-suite-jev-routing-audit.ts && pnpm exec tsx test/continuous-test-suite-jev-routing-audit-privacy.ts",
|
|
285
288
|
"test:tool-routing-semantic": "pnpm exec tsx test/continuous-test-suite-tool-routing-semantic.ts",
|
|
286
289
|
"test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:registry && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:archive:security && pnpm run test:office && pnpm run test:office:security && pnpm run test:image-exif && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp && pnpm run test:retired-model-defaults && pnpm run test:cli-fallback && pnpm run test:embedding-response-validation && pnpm run test:xiaomi-mimo-pilot && pnpm run test:rag-bounds && pnpm run test:longcat-pilot && pnpm run test:runinfra-pilot && pnpm run test:catalog-output-ceiling && pnpm run test:package-declarations && pnpm run test:realtime-voice",
|
|
287
290
|
"// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit; test:matrix, a different suite covering the full provider capability matrix, runs nightly via .github/workflows/live-matrix.yml — test:providers itself is still only wired into test:live, not any GitHub Actions workflow)": "",
|
|
@@ -372,6 +375,7 @@
|
|
|
372
375
|
"test:anthropic-execution-control": "tsx test/continuous-test-suite-anthropic-execution-control.ts",
|
|
373
376
|
"test:aistudio-loop-characterization": "tsx test/continuous-test-suite-aistudio-loop-characterization.ts",
|
|
374
377
|
"test:google-genai-proxy": "tsx test/continuous-test-suite-google-genai-proxy.ts",
|
|
378
|
+
"test:proxy-strict": "pnpm run build && pnpm exec tsx test/continuous-test-suite-proxy-strict.ts",
|
|
375
379
|
"test:google-genai-sdk": "tsx test/continuous-test-suite-google-genai-sdk.ts",
|
|
376
380
|
"test:docs-mcp": "pnpm exec tsx test/continuous-test-suite-docs-mcp.ts",
|
|
377
381
|
"test:docs-search-index": "pnpm exec tsx test/continuous-test-suite-docs-search-index.ts",
|