@juspay/neurolink 12.56.1 → 12.58.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 +7 -2
- package/README.md +90 -55
- package/dist/browser/neurolink.min.js +419 -416
- package/dist/cli/commands/decide.d.ts +4 -1
- package/dist/cli/commands/decide.js +6 -3
- package/dist/cli/commands/setup.d.ts +1 -1
- package/dist/cli/commands/setup.js +1 -1
- package/dist/cli/factories/commandFactory.js +1 -1
- package/dist/constants/enums.d.ts +8 -0
- package/dist/constants/enums.js +10 -0
- package/dist/core/factory.d.ts +7 -0
- package/dist/core/factory.js +20 -0
- package/dist/factories/providerDescriptors.js +103 -9
- package/dist/providers/catalog/index.generated.d.ts +1 -1
- package/dist/providers/catalog/index.generated.js +10 -1
- package/dist/providers/catalog/openai-decisions.json +75 -0
- package/dist/providers/catalog/provider-catalog.schema.json +56 -3
- package/dist/providers/catalog/schema.js +92 -11
- package/dist/providers/catalog/subq.json +59 -0
- package/dist/providers/configuredDecision.js +9 -14
- package/dist/providers/decide/dialects/index.js +2 -0
- package/dist/providers/decide/dialects/openaiDecisions.d.ts +2 -0
- package/dist/providers/decide/dialects/openaiDecisions.js +228 -0
- package/dist/providers/decide/dialects/systemOne.js +17 -0
- package/dist/providers/systemOneDecision.js +6 -1
- package/dist/telemetry/attributes.d.ts +10 -3
- package/dist/telemetry/attributes.js +142 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/types/classifierRouter.d.ts +21 -9
- package/dist/types/cli.d.ts +4 -2
- package/dist/types/decision.d.ts +67 -3
- package/dist/types/providerCatalog.d.ts +7 -11
- package/dist/types/providerCatalog.generated.d.ts +2 -2
- package/dist/types/providers.d.ts +16 -1
- package/dist/utils/pricing.js +9 -0
- package/docs-site/static/search-index.json +105 -64
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
## [12.
|
|
1
|
+
## [12.58.0](https://github.com/juspay/neurolink/compare/v12.57.0...v12.58.0) (2026-10-15)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **(decide):** add OpenAI's Decisions API as a catalog provider ([9bdc342](https://github.com/juspay/neurolink/commit/9bdc3428097ab44917aad65239bb28386570b971))
|
|
2
6
|
|
|
3
7
|
### Bug Fixes
|
|
4
8
|
|
|
5
|
-
- **(
|
|
9
|
+
- **(observability):** keep the user's question in trimmed span inputs and make the cap configurable ([2d39413](https://github.com/juspay/neurolink/commit/2d394138094c3b89015975ea3fdce69e4a75a5c9))
|
|
10
|
+
- **(security):** make the gitleaks secret scan run, and fail when it cannot ([467c19f](https://github.com/juspay/neurolink/commit/467c19f5e16bac64d7ad00606c32186448386621)), closes [PKCS#8](https://github.com/juspay/PKCS/issues/8)
|
|
6
11
|
|
|
7
12
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
13
|
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ const decision = await pipe.tryDecide({
|
|
|
47
47
|
|
|
48
48
|
**NeuroLink is the pipe layer of an AI nervous system.** Providers — OpenAI, Anthropic, Google, AWS, Azure, Mistral, local runtimes like Ollama, and dozens more — are the neurons: each generates a different kind of intelligence, at a different cost and latency. NeuroLink is the vascular layer that carries that intelligence, as a stream, to the applications — the organs — that consume it, across three inference types: `generate` and `stream` produce text, `decide` produces a calibrated `boolean`/`choice`/`score` judgment instead. A curated model registry (64 models, 132 aliases) backs metadata, routing, and context-window checks out of the box, and hundreds more models are reachable through aggregator providers — 100+ via LiteLLM, 300+ via OpenRouter.
|
|
49
49
|
|
|
50
|
-
Extracted from production systems at Juspay, NeuroLink provides a practical, TypeScript-first way to plug any application into that nervous system. Switch which neuron answers a request with a single parameter change — OpenAI, Anthropic, Google, AWS Bedrock, Azure, a local runtime, or any provider you add. `decide` is the third inference type — a typed, calibrated judgment instead of text — for the model-routing and gating decisions `generate`/`stream` were never meant to make, powered by a purpose-built decision model (TypeSafe Jev, Perplexity's hosted Decisions API, Cloudflare's hosted Clef, or the open-weights Laya or XOR) rather than a general-purpose LLM: with Jev, routing decisions land in ~400ms for about $0.00002, instead of a full generation call.
|
|
50
|
+
Extracted from production systems at Juspay, NeuroLink provides a practical, TypeScript-first way to plug any application into that nervous system. Switch which neuron answers a request with a single parameter change — OpenAI, Anthropic, Google, AWS Bedrock, Azure, a local runtime, or any provider you add. `decide` is the third inference type — a typed, calibrated judgment instead of text — for the model-routing and gating decisions `generate`/`stream` were never meant to make, powered by a purpose-built decision model (TypeSafe Jev, Perplexity's hosted Decisions API, Cloudflare's hosted Clef, Subquadratic's hosted SubQ Snap, OpenAI's hosted Decisions API, or the open-weights Laya or XOR) rather than a general-purpose LLM: with Jev, routing decisions land in ~400ms for about $0.00002, instead of a full generation call.
|
|
51
51
|
|
|
52
52
|
**Why NeuroLink?** Three genuine inference types, not one dressed up three ways — `generate` and `stream` produce text; `decide` produces a calibrated `boolean`/`choice`/`score` judgment, and which types a provider serves is declared per-provider via `inferenceKinds` rather than inferred from behavior. Every neuron plugs into the same pipe, including 3 fully local runtimes (Ollama, LM Studio, llama.cpp) with per-request credential overrides, and MCP support covers all 4 transports (stdio, HTTP, SSE, WebSocket). Every AI-driven optimization the pipe performs — model routing, context compaction, tool selection — fails open: no key configured behaves exactly like NeuroLink without it, and routing uses asymmetric confidence thresholds (upgrade at 0.3, downgrade at 0.6) rather than a single cutoff, because a wrong downgrade costs more than a wrong upgrade. Switch providers with a single parameter change, leverage built-in tools plus any MCP-compliant tool server, deploy with confidence using enterprise features like Redis memory and multi-provider failover, and optimize costs automatically with intelligent routing. Use it via our professional CLI or TypeScript SDK—whichever fits your workflow.
|
|
53
53
|
|
|
@@ -59,37 +59,37 @@ Extracted from production systems at Juspay, NeuroLink provides a practical, Typ
|
|
|
59
59
|
|
|
60
60
|
## What's New
|
|
61
61
|
|
|
62
|
-
| Feature
|
|
63
|
-
|
|
|
64
|
-
| **`decide` Inference Type + TypeSafe Jev + Laya + XOR + Perplexity + Cloudflare Clef** | next | A third inference type alongside `generate`/`stream`: typed, calibrated judgments (`boolean`, `choice`, `score`) via `neurolink.decide()` / `tryDecide()`, one parallel pass (~400ms and ~$0.00002/decision on Jev). Providers: TypeSafe Jev (`TYPESAFE_API_KEY`, also reachable via the Vercel AI Gateway); [Laya](docs/getting-started/providers/laya.md) (`LAYA_API_KEY` + `LAYA_BASE_URL`), an open-weights model you run yourself; [XOR](docs/getting-started/providers/xor.md) (`XOR_API_KEY` + `XOR_BASE_URL`), Juspay's open-weights model; [Perplexity](docs/getting-started/providers/perplexity-decider.md) (`PERPLEXITY_API_KEY`, the same key as its text provider), a hosted API that also reads images; and [Cloudflare Clef](docs/getting-started/providers/cloudflare-clef.md) (`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`, the same two as the Workers AI text provider), hosted on Workers AI, which also reads images — the first one configured, in that order, runs. Used internally for model routing, context budgeting, relevance compaction and tool routing — fail-open and a no-op when no decision provider is configured. Per-query RAG planning is opt-in via `RAGPipeline`. | [Decide Guide](docs/features/decide-inference-type.md) |
|
|
65
|
-
| **7 More Catalog Providers**
|
|
66
|
-
| **Claude-on-Vertex Proxy Fallback**
|
|
67
|
-
| **Native-Loop V3 Conversation Reclaim**
|
|
68
|
-
| **Multi-Modal Embeddings**
|
|
69
|
-
| **Grok Build Auto-Configuration**
|
|
70
|
-
| **Anthropic Execution-Control Contract**
|
|
71
|
-
| **Catalog Tool Declarations Honoured at Runtime**
|
|
72
|
-
| **Artifact Stores: Redis, Custom, Range Reads, Search**
|
|
73
|
-
| **Local CLI Spend Reading**
|
|
74
|
-
| **Native OpenAI Audio Streaming**
|
|
75
|
-
| **HITL Pending-Confirmation State**
|
|
76
|
-
| **OpenCode + Gemini CLI Proxy Clients**
|
|
77
|
-
| **SambaNova Provider**
|
|
78
|
-
| **Cerebras Provider**
|
|
79
|
-
| **Avatar / Music Modalities + 12 Providers**
|
|
80
|
-
| **Multi-Provider Voice (TTS/STT)**
|
|
81
|
-
| **4 New Providers**
|
|
82
|
-
| **ModelAccessDeniedError**
|
|
83
|
-
| **Provider Fallback Policy**
|
|
84
|
-
| **Per-Request Credentials**
|
|
85
|
-
| **AutoResearch**
|
|
86
|
-
| **Gemini 3 Multi-turn Tool Fix**
|
|
87
|
-
| **MCP Enhancements**
|
|
88
|
-
| **Memory**
|
|
89
|
-
| **Context Window Management**
|
|
90
|
-
| **Tool Execution Control**
|
|
91
|
-
| **File Processor System**
|
|
92
|
-
| **RAG with generate()/stream()**
|
|
62
|
+
| Feature | Version | Description | Guide |
|
|
63
|
+
| ---------------------------------------------------------------------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| **`decide` Inference Type + TypeSafe Jev + Laya + XOR + SubQ + Perplexity + Cloudflare Clef + OpenAI Decisions** | next | A third inference type alongside `generate`/`stream`: typed, calibrated judgments (`boolean`, `choice`, `score`) via `neurolink.decide()` / `tryDecide()`, one parallel pass (~400ms and ~$0.00002/decision on Jev). Providers: TypeSafe Jev (`TYPESAFE_API_KEY`, also reachable via the Vercel AI Gateway); [Laya](docs/getting-started/providers/laya.md) (`LAYA_API_KEY` + `LAYA_BASE_URL`), an open-weights model you run yourself; [XOR](docs/getting-started/providers/xor.md) (`XOR_API_KEY` + `XOR_BASE_URL`), Juspay's open-weights model; [SubQ](docs/getting-started/providers/subq.md) (`SUBQ_API_KEY`), Subquadratic's hosted SubQ Snap; [Perplexity](docs/getting-started/providers/perplexity-decider.md) (`PERPLEXITY_API_KEY`, the same key as its text provider), a hosted API that also reads images; and [Cloudflare Clef](docs/getting-started/providers/cloudflare-clef.md) (`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`, the same two as the Workers AI text provider), hosted on Workers AI, which also reads images; and [OpenAI Decisions](docs/getting-started/providers/openai-decisions.md) (`OPENAI_API_KEY`, the same key as the OpenAI chat provider), OpenAI's Decisions API in public beta, which also reads images — the first one configured, in that order, runs, so an OpenAI key alone makes OpenAI Decisions the last resort. Used internally for model routing, context budgeting, relevance compaction and tool routing — fail-open and a no-op when no decision provider is configured. Per-query RAG planning is opt-in via `RAGPipeline`. | [Decide Guide](docs/features/decide-inference-type.md) |
|
|
65
|
+
| **7 More Catalog Providers** | v12.11.0–v12.16.0 | Baseten, GMI Cloud, Inception Labs, io.net Intelligence, Mancer, Upstage and API Route onboarded as Tier-2 catalog entries — one JSON file each, roster live-verified against the provider's own `/v1/models`. | [Tier 2 Onboarding](docs/provider-integration/tiers/tier-2-catalog-entry.md) |
|
|
66
|
+
| **Claude-on-Vertex Proxy Fallback** | v12.18.0 | The Anthropic proxy pool can fall back to Claude served on Google Vertex, so an agentic turn survives losing its primary backend mid-conversation instead of failing the turn. | [Claude Proxy](docs/features/claude-proxy.md) |
|
|
67
|
+
| **Native-Loop V3 Conversation Reclaim** | v12.17.0 | Reclaims V3 conversations without splitting tool-call/tool-result pairs — the pairing a provider rejects the whole request over. | [Claude Proxy Architecture](docs/features/claude-proxy-architecture.md) |
|
|
68
|
+
| **Multi-Modal Embeddings** | v12.15.0 | `embed()` / `embedMany()` accept images alongside text on providers whose embedding models are multi-modal, for cross-modal retrieval in RAG and custom vector search. | [Embeddings Guide](docs/features/embeddings.md) |
|
|
69
|
+
| **Grok Build Auto-Configuration** | v12.14.0 | The proxy configures Grok Build automatically, deriving context windows and backends from the model catalog rather than hardcoded values. | [Proxy CLI Onboarding](docs/features/proxy-cli-onboarding.md) |
|
|
70
|
+
| **Anthropic Execution-Control Contract** | v12.13.0 | Truthful stream termination plus an opt-in execution-control contract, so a stream that stopped early reports why instead of looking like a clean finish. | [Claude Proxy](docs/features/claude-proxy.md) |
|
|
71
|
+
| **Catalog Tool Declarations Honoured at Runtime** | v12.12.0 | A Tier-2 catalog entry declaring `tools: false` (e.g. Mancer) no longer has tools offered to it at runtime — the JSON declaration is enforced, not just documented. | [Tier 2 Onboarding](docs/provider-integration/tiers/tier-2-catalog-entry.md) |
|
|
72
|
+
| **Artifact Stores: Redis, Custom, Range Reads, Search** | v12.10.0 | Artifacts can be backed by Redis or a custom store, read by byte range, and searched — instead of being held only in process memory. | [Claude Proxy](docs/features/claude-proxy.md) |
|
|
73
|
+
| **Local CLI Spend Reading** | v12.6.0–v12.9.0 | Reads token usage directly from other coding CLIs' own local stores — Cursor, Grok Build, Hermes Agent and three more — and names them in proxy traffic, so spend is attributed per client. | [Proxy CLI Onboarding](docs/features/proxy-cli-onboarding.md) |
|
|
74
|
+
| **Native OpenAI Audio Streaming** | v12.7.0 | OpenAI TTS audio streams natively rather than being buffered to completion first. | [TTS Guide](docs/features/tts.md) |
|
|
75
|
+
| **HITL Pending-Confirmation State** | v12.5.0 | Exposes whether a human-in-the-loop confirmation is still outstanding, so a caller can distinguish 'waiting on a human' from 'finished'. | [Task Manager](docs/features/task-manager.md) |
|
|
76
|
+
| **OpenCode + Gemini CLI Proxy Clients** | v12.4.0 | OpenCode's generated config is actually loadable, and Gemini CLI is onboarded as a proxy client. | [OpenCode Proxy](docs/features/opencode-proxy-support.md) \| [Proxy CLI Onboarding](docs/features/proxy-cli-onboarding.md) |
|
|
77
|
+
| **SambaNova Provider** | v12.3.0 | RDU-accelerated open-weight flagships: Llama 3.3 70B (default), GPT-OSS 120B, DeepSeek V3.x, MiniMax, Gemma 4 (vision) — OpenAI-compatible Tier 2 catalog entry. Note: new SambaNova accounts require purchased credits. | [SambaNova Guide](docs/getting-started/providers/sambanova.md) |
|
|
78
|
+
| **Cerebras Provider** | v12.1.0 | Wafer-scale inference at ~3000 tok/s: GPT-OSS 120B (default) + Gemma 4 31B, OpenAI-compatible Tier 2 catalog entry, live-verified end to end (generate, stream, tools, structured output). | [Cerebras Guide](docs/getting-started/providers/cerebras.md) |
|
|
79
|
+
| **Avatar / Music Modalities + 12 Providers** | v9.65.0 | New `output: { mode: "avatar" \| "music" }` dispatch with handlers for D-ID, HeyGen, Replicate-MuseTalk (avatar) and Beatoven, ElevenLabs Music, Lyria, Replicate-MusicGen (music). Plus Fish Audio TTS, Kling/Runway/Replicate video, xAI/Groq/Cohere/Together/Fireworks/Perplexity/Cloudflare LLMs, Voyage/Jina embeddings, Stability/Ideogram/Recraft/Replicate image-gen. | [Provider Integration](docs/provider-integration/) |
|
|
80
|
+
| **Multi-Provider Voice (TTS/STT)** | v9.62.0 | 6 TTS providers (OpenAI TTS, ElevenLabs, Google TTS, Azure TTS, Fish Audio, Cartesia) + 4 STT providers (Whisper, Deepgram, Azure STT, Google STT) + 2 realtime APIs (OpenAI Realtime, Gemini Live). | [TTS Guide](docs/features/tts.md) \| [STT Guide](docs/features/audio-input.md) \| [Realtime Guide](docs/features/real-time-services.md) |
|
|
81
|
+
| **4 New Providers** | v9.60.0 | DeepSeek (V3/R1), NVIDIA NIM (400+ catalog), LM Studio (local), llama.cpp (GGUF local). | [Provider Setup](docs/getting-started/provider-setup.md) |
|
|
82
|
+
| **ModelAccessDeniedError** | v9.59.0 | Typed `ModelAccessDeniedError` + `sdk.checkCredentials()` API for proactive credential validation before first call. | [Error Reference](docs/reference/troubleshooting.md) |
|
|
83
|
+
| **Provider Fallback Policy** | v9.58.0 | `providerFallback` callback + `modelChain` config for centralized multi-provider fallback logic. | [Advanced Guide](docs/advanced/index.md) |
|
|
84
|
+
| **Per-Request Credentials** | v9.52.0 | Pass credentials per-call or per-instance for all providers. Per-call overrides instance; instance overrides env vars. | [Credentials Guide](docs/features/per-request-credentials.md) |
|
|
85
|
+
| **AutoResearch** | v9.53.0 | Autonomous AI experiment engine: proposes code changes, runs experiments, evaluates metrics — unattended for hours. | [AutoResearch Guide](docs/features/autoresearch.md) |
|
|
86
|
+
| **Gemini 3 Multi-turn Tool Fix** | v9.49.0 | Fixed multi-step agentic tool calling on Vertex AI Gemini 3. Correct `thoughtSignature` replay, `stepIndex` grouping, `executionId` session isolation, 5-min timeout. | [Vertex AI Guide](docs/getting-started/providers/google-vertex.md) |
|
|
87
|
+
| **MCP Enhancements** | v9.16.0 | Tool routing (6 strategies), result caching (LRU/FIFO/LFU), request batching, annotations, elicitation protocol, multi-server management. | [MCP Enhancements Guide](docs/features/mcp-enhancements.md) |
|
|
88
|
+
| **Memory** | v9.12.0 | Per-user condensed memory across conversations. LLM-powered condensation with S3, Redis, or SQLite. | [Memory Guide](docs/features/memory.md) |
|
|
89
|
+
| **Context Window Management** | v9.2.0 | 5-stage compaction pipeline with budget gate at 80% usage, per-provider token estimation. | [Context Compaction Guide](docs/features/context-compaction.md) |
|
|
90
|
+
| **Tool Execution Control** | v9.3.0 | `prepareStep` and `toolChoice` for per-step tool enforcement in multi-step agentic loops. | [API Reference](docs/api/type-aliases/GenerateOptions.md#preparestep) |
|
|
91
|
+
| **File Processor System** | v9.1.0 | 17+ file type processors with ProcessorRegistry, security sanitization, SVG text injection. | [File Processors Guide](docs/features/file-processors.md) |
|
|
92
|
+
| **RAG with generate()/stream()** | v9.2.0 | Pass `rag: { files }` for automatic document chunking, embedding, and AI-powered search. 10 chunking strategies, hybrid search, reranking, and a choice of 4 vector stores (in-memory, Chroma, PgVector, Pinecone). | [RAG Guide](docs/features/rag.md) |
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
95
|
// decide() — a third inference type: calibrated judgments, not text (next)
|
|
@@ -281,8 +281,9 @@ shorter state than TypeSafe's — about 768 tokens on the default
|
|
|
281
281
|
`typed-decisions` checkpoint (320 on `english`/`auto`), against TypeSafe's
|
|
282
282
|
~33,000 — so it fits short, structured decisions rather than long context.
|
|
283
283
|
Every built-in consumer below asks for the first configured decision provider,
|
|
284
|
-
in the order TypeSafe, Laya, XOR, Perplexity, Cloudflare Clef: with
|
|
285
|
-
configured, TypeSafe runs; with only Laya's key and base URL
|
|
284
|
+
in the order TypeSafe, Laya, XOR, SubQ, Perplexity, Cloudflare Clef, OpenAI Decisions: with
|
|
285
|
+
TypeSafe and Laya both configured, TypeSafe runs; with only Laya's key and base URL
|
|
286
|
+
set, Laya runs.
|
|
286
287
|
|
|
287
288
|
[**XOR**](docs/getting-started/providers/xor.md) is Juspay's Apache-2.0,
|
|
288
289
|
open-weights decision model (`xor-1.1`); setup is on
|
|
@@ -292,19 +293,30 @@ a LiteLLM proxy route (or pass `credentials.xor`). XOR counts only with both its
|
|
|
292
293
|
key and base URL set, and a call can always name it with `provider: "xor"`. It
|
|
293
294
|
accepts images and video, which TypeSafe and Laya refuse.
|
|
294
295
|
|
|
296
|
+
[**SubQ**](docs/getting-started/providers/subq.md) is Subquadratic's hosted
|
|
297
|
+
decision model, SubQ Snap (`subq-snap-preview`, in public preview; provider id
|
|
298
|
+
`subq`, with the aliases `subquadratic` and `subq-snap`). It has a public
|
|
299
|
+
endpoint, so a key alone configures it: `SUBQ_API_KEY`, or `credentials.subq`.
|
|
300
|
+
NeuroLink sends it text only: SubQ's image format is not one the decide catalog
|
|
301
|
+
can describe yet. It comes after TypeSafe, Laya and XOR and ahead of Perplexity
|
|
302
|
+
and Cloudflare Clef: its key belongs to no other provider, so it is set on
|
|
303
|
+
purpose, whereas theirs are shared with text providers and must not displace it.
|
|
304
|
+
Its state window is advisory (reported, never enforced, and not a guarantee); see
|
|
305
|
+
[its limits](docs/getting-started/providers/subq.md#limits).
|
|
306
|
+
|
|
295
307
|
[**Perplexity**](docs/getting-started/providers/perplexity-decider.md) is
|
|
296
308
|
Perplexity's hosted Decisions API (`pplx-decider-v1-27b`, provider id
|
|
297
309
|
`perplexity-decider`) and also reads images, but no video. It has a public
|
|
298
310
|
endpoint, so a key alone configures it: `PERPLEXITY_API_KEY`, or
|
|
299
311
|
`credentials.perplexityDecider`. **That key is shared with the Perplexity text
|
|
300
312
|
provider (Sonar)**, so setting it for Sonar also configures `decide`: built-in
|
|
301
|
-
features then use Perplexity whenever none of TypeSafe, Laya or
|
|
313
|
+
features then use Perplexity whenever none of TypeSafe, Laya, XOR or SubQ is
|
|
302
314
|
configured, and it never displaces one that is. Context compaction needs no other
|
|
303
315
|
opt-in, so earlier conversation text can start going to Perplexity's Decisions API
|
|
304
316
|
once a conversation outgrows its budget. To avoid that, pass the Sonar key as
|
|
305
317
|
`credentials.perplexity` instead of through the environment, and keep it out of
|
|
306
318
|
`.env` too, because the SDK and the CLI load that file into the environment, or
|
|
307
|
-
configure one of TypeSafe, Laya and
|
|
319
|
+
configure one of TypeSafe, Laya, XOR and SubQ; the guide lists
|
|
308
320
|
[what each consumer sends](docs/getting-started/providers/perplexity-decider.md#what-is-sent-to-perplexity)
|
|
309
321
|
and [the exact switches](docs/getting-started/providers/perplexity-decider.md#one-key-two-providers).
|
|
310
322
|
|
|
@@ -315,8 +327,8 @@ but no video. It has a public endpoint, so credentials alone configure it:
|
|
|
315
327
|
`CLOUDFLARE_API_KEY` (Workers AI permission) **and** `CLOUDFLARE_ACCOUNT_ID`, or
|
|
316
328
|
`credentials.cloudflareClef`. **Those are the same two variables the Workers AI
|
|
317
329
|
text provider (`cloudflare`) reads**, so setting them for it also configures
|
|
318
|
-
`decide`: built-in features then use Clef whenever none of TypeSafe, Laya, XOR
|
|
319
|
-
Perplexity is configured, and it never displaces one that is. No switch turns
|
|
330
|
+
`decide`: built-in features then use Clef whenever none of TypeSafe, Laya, XOR,
|
|
331
|
+
SubQ or Perplexity is configured, and it never displaces one that is. No switch turns
|
|
320
332
|
that off while the two variables are set, and `credentials.cloudflare` does not
|
|
321
333
|
configure `decide`. **The Workers AI endpoint ignored text past about 2,048
|
|
322
334
|
tokens until 2026-10-04 and read states of at least 190,153 tokens on
|
|
@@ -326,6 +338,29 @@ built-in consumer treats as "carry on as before". The guide covers
|
|
|
326
338
|
[the limits](docs/getting-started/providers/cloudflare-clef.md#limits) and
|
|
327
339
|
[when NeuroLink uses it](docs/getting-started/providers/cloudflare-clef.md#when-neurolink-uses-it).
|
|
328
340
|
|
|
341
|
+
[**OpenAI Decisions**](docs/getting-started/providers/openai-decisions.md) is
|
|
342
|
+
OpenAI's Decisions API (`gpt-6-luna`, provider id `openai-decisions`), a public
|
|
343
|
+
beta, and also reads images, up to 8 (NeuroLink's own allowance), but no video. It
|
|
344
|
+
has a public endpoint, so a key alone configures it: `OPENAI_API_KEY`, or
|
|
345
|
+
`credentials.openaiDecisions`. **That key is shared with the OpenAI chat
|
|
346
|
+
provider**, so setting it for chat also configures `decide`: built-in features
|
|
347
|
+
then use OpenAI Decisions whenever none of TypeSafe, Laya, XOR, SubQ, Perplexity or
|
|
348
|
+
Cloudflare Clef is configured, as the last resort, and it never displaces one that
|
|
349
|
+
is. A key that sits beside an `OPENAI_BASE_URL`, `OPENAI_API_BASE` or `credentials.openai.baseURL` naming another
|
|
350
|
+
host than `https://api.openai.com` is a gateway's, though, and is never used for
|
|
351
|
+
the default. Those features (model routing, tool routing, relevance compaction, the summary
|
|
352
|
+
gate and RAG planning, plus the speech-to-text correction check for a host that
|
|
353
|
+
passes a dictionary) then make paid decision calls; they still fail open. Context
|
|
354
|
+
compaction needs no other opt-in, so earlier conversation text can start going to
|
|
355
|
+
OpenAI once a conversation outgrows its budget. No switch turns that off while the
|
|
356
|
+
key is set, and `credentials.openai` does not configure `decide`; to avoid it, pass
|
|
357
|
+
the chat key as `credentials.openai` instead of through the environment (and keep
|
|
358
|
+
it out of `.env`), or configure one of the earlier providers. The guide lists
|
|
359
|
+
[what each consumer sends](docs/getting-started/providers/openai-decisions.md#what-is-sent-to-openai),
|
|
360
|
+
[the exact switches](docs/getting-started/providers/openai-decisions.md#one-key-two-providers)
|
|
361
|
+
and [what is not established](docs/getting-started/providers/openai-decisions.md#what-is-not-established)
|
|
362
|
+
about the endpoint.
|
|
363
|
+
|
|
329
364
|
```typescript
|
|
330
365
|
import {
|
|
331
366
|
NeuroLink,
|
|
@@ -423,7 +458,7 @@ Cloudflare Clef, measured on a real account in October 2026: the follow-up of 13
|
|
|
423
458
|
|
|
424
459
|
The [guide's limits section](docs/getting-started/providers/cloudflare-clef.md#limits) has the full table, including tokens per character for each kind of text.
|
|
425
460
|
|
|
426
|
-
**[Decide Guide](docs/features/decide-inference-type.md)** · **[TypeSafe Provider Guide](docs/getting-started/providers/typesafe.md)** · **[Laya Provider Guide](docs/getting-started/providers/laya.md)** · **[XOR Provider Guide](docs/getting-started/providers/xor.md)** · **[Perplexity Provider Guide](docs/getting-started/providers/perplexity-decider.md)** · **[Cloudflare Clef Provider Guide](docs/getting-started/providers/cloudflare-clef.md)**
|
|
461
|
+
**[Decide Guide](docs/features/decide-inference-type.md)** · **[TypeSafe Provider Guide](docs/getting-started/providers/typesafe.md)** · **[Laya Provider Guide](docs/getting-started/providers/laya.md)** · **[XOR Provider Guide](docs/getting-started/providers/xor.md)** · **[Perplexity Provider Guide](docs/getting-started/providers/perplexity-decider.md)** · **[Cloudflare Clef Provider Guide](docs/getting-started/providers/cloudflare-clef.md)** · **[SubQ Provider Guide](docs/getting-started/providers/subq.md)** · **[OpenAI Decisions Provider Guide](docs/getting-started/providers/openai-decisions.md)**
|
|
427
462
|
|
|
428
463
|
## Enterprise Security: Human-in-the-Loop (HITL)
|
|
429
464
|
|
|
@@ -702,7 +737,7 @@ NeuroLink is a comprehensive AI development platform. Every feature below is shi
|
|
|
702
737
|
|
|
703
738
|
### 🤖 AI Provider Integration
|
|
704
739
|
|
|
705
|
-
**Provider neurons behind one API** - Switch providers with a single parameter change. Nearly all serve `generate`/`stream`; TypeSafe Jev, Laya, XOR, Perplexity Decisions
|
|
740
|
+
**Provider neurons behind one API** - Switch providers with a single parameter change. Nearly all serve `generate`/`stream`; TypeSafe Jev, Laya, XOR, SubQ, Perplexity Decisions, Cloudflare Clef and OpenAI Decisions serve `decide` instead. Tool support varies by provider and model (see the provider catalog); embedding-, media- and decision-only providers serve no tools. 3 are fully local runtimes (Ollama, LM Studio, llama.cpp) and need no cloud account or API key. LiteLLM needs no NeuroLink env vars (it defaults to `localhost:4000`) but requires a running LiteLLM proxy, which holds the upstream provider keys for hosted models. 9 providers (OpenAI, Google AI Studio, Google Vertex, Amazon Bedrock, Cohere, Ollama, LiteLLM, Voyage, Jina) expose `embed()`/`embedMany()` natively for RAG and custom vector search.
|
|
706
741
|
|
|
707
742
|
| Provider | Models | Free Tier | Tool Support | Status | Documentation |
|
|
708
743
|
| --------------------- | -------------------------------------------------------------------------- | --------------- | ------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -736,9 +771,9 @@ NeuroLink is a comprehensive AI development platform. Every feature below is shi
|
|
|
736
771
|
|
|
737
772
|
**Media generation** — [Replicate](docs/getting-started/providers/replicate.md) (`REPLICATE_API_TOKEN`) · [Stability AI](docs/getting-started/providers/stability.md) (`STABILITY_API_KEY`) · [Ideogram](docs/getting-started/providers/ideogram.md) (`IDEOGRAM_API_KEY`) · [Recraft](docs/getting-started/providers/recraft.md) (`RECRAFT_API_KEY`)
|
|
738
773
|
|
|
739
|
-
**Decision** — [TypeSafe Jev](docs/getting-started/providers/typesafe.md) (`TYPESAFE_API_KEY`, or `AI_GATEWAY_API_KEY` via the Vercel AI Gateway) · [Laya](docs/getting-started/providers/laya.md) (`LAYA_API_KEY` + `LAYA_BASE_URL`, open-weights, self-hosted) · [XOR](docs/getting-started/providers/xor.md) (`XOR_API_KEY` + `XOR_BASE_URL`, open-weights) · [Perplexity Decisions](docs/getting-started/providers/perplexity-decider.md) (`PERPLEXITY_API_KEY`, hosted; the same key as the Perplexity text provider) · [Cloudflare Clef](docs/getting-started/providers/cloudflare-clef.md) (`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`, hosted on Workers AI; the same two variables as the Cloudflare text provider) — the providers serving `decide` rather than `generate`/`stream`.
|
|
774
|
+
**Decision** — [TypeSafe Jev](docs/getting-started/providers/typesafe.md) (`TYPESAFE_API_KEY`, or `AI_GATEWAY_API_KEY` via the Vercel AI Gateway) · [Laya](docs/getting-started/providers/laya.md) (`LAYA_API_KEY` + `LAYA_BASE_URL`, open-weights, self-hosted) · [XOR](docs/getting-started/providers/xor.md) (`XOR_API_KEY` + `XOR_BASE_URL`, open-weights) · [SubQ](docs/getting-started/providers/subq.md) (`SUBQ_API_KEY`, hosted) · [Perplexity Decisions](docs/getting-started/providers/perplexity-decider.md) (`PERPLEXITY_API_KEY`, hosted; the same key as the Perplexity text provider) · [Cloudflare Clef](docs/getting-started/providers/cloudflare-clef.md) (`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`, hosted on Workers AI; the same two variables as the Cloudflare text provider) · [OpenAI Decisions](docs/getting-started/providers/openai-decisions.md) (`OPENAI_API_KEY`, hosted, public beta; the same key as the OpenAI chat provider) — the providers serving `decide` rather than `generate`/`stream`.
|
|
740
775
|
|
|
741
|
-
**Decision-only providers:** **TypeSafe Jev** (`TYPESAFE_API_KEY`), **Laya** (`LAYA_API_KEY` + `LAYA_BASE_URL`), **XOR** (`XOR_API_KEY` + `XOR_BASE_URL`), **Perplexity Decisions** (`PERPLEXITY_API_KEY`)
|
|
776
|
+
**Decision-only providers:** **TypeSafe Jev** (`TYPESAFE_API_KEY`), **Laya** (`LAYA_API_KEY` + `LAYA_BASE_URL`), **XOR** (`XOR_API_KEY` + `XOR_BASE_URL`), **SubQ** (`SUBQ_API_KEY`), **Perplexity Decisions** (`PERPLEXITY_API_KEY`), **Cloudflare Clef** (`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`) and **OpenAI Decisions** (`OPENAI_API_KEY`) do not appear in the table above because none of them serves `generate`/`stream` — they are the providers for the `decide` inference type, tried in the order TypeSafe, Laya, XOR, SubQ, Perplexity, Cloudflare Clef, OpenAI Decisions when several are configured. Perplexity's key is shared with the Perplexity text provider, Clef's two variables with the Cloudflare Workers AI text provider, and OpenAI Decisions' key with the OpenAI chat provider; all three text providers appear in the table. See [Decide: Calibrated Judgments, Not Text](#decide-calibrated-judgments-not-text).
|
|
742
777
|
|
|
743
778
|
**[📖 Provider Comparison Guide](docs/reference/provider-comparison.md)** - Detailed feature matrix and selection criteria
|
|
744
779
|
**[🔬 Provider Feature Compatibility](docs/reference/provider-feature-compatibility.md)** - Test-based compatibility reference for 19 features (dated snapshot covering a subset of the full provider list)
|
|
@@ -1260,18 +1295,18 @@ Full command and API breakdown lives in [`docs/cli/commands.md`](docs/cli/comman
|
|
|
1260
1295
|
|
|
1261
1296
|
## Platform Capabilities at a Glance
|
|
1262
1297
|
|
|
1263
|
-
| Capability | Highlights
|
|
1264
|
-
| ------------------------ |
|
|
1265
|
-
| **Provider unification** | Provider neurons behind one API, with automatic fallback, cost-aware routing, `providerFallback` policy, `modelChain` config.
|
|
1266
|
-
| **Decision inference** | Third inference type (`decide`) alongside generate/stream: calibrated `boolean`/`choice`/`score` judgments via TypeSafe Jev (~400ms flat, ~$0.00002/decision), Laya, a self-hosted open-weights alternative, XOR, Juspay's open-weights model, Perplexity's hosted Decisions API,
|
|
1267
|
-
| **Multimodal pipeline** | Stream images + CSV data + PDF documents across providers with local/remote assets. Auto-detection for mixed file types.
|
|
1268
|
-
| **Voice pipeline** | TTS (6 providers: Google, OpenAI, ElevenLabs, Azure, Fish Audio, Cartesia) + STT (4 providers) + realtime voice APIs (OpenAI Realtime, Gemini Live).
|
|
1269
|
-
| **Quality & governance** | Auto-evaluation engine (14 scorers), guardrails middleware, HITL workflows, audit logging.
|
|
1270
|
-
| **Memory & context** | Per-user condensed memory (S3/Redis/SQLite), Redis session export, 5-stage context compaction.
|
|
1271
|
-
| **CLI tooling** | 34 commands: loop sessions, setup wizard, config validation, Redis auto-detect, JSON output, TTS/STT flags.
|
|
1272
|
-
| **Enterprise ops** | Claude proxy, OTLP observability, OpenObserve dashboard, regional routing, credential management.
|
|
1273
|
-
| **Tool ecosystem** | MCP auto discovery, HTTP/stdio/SSE/WebSocket transports, LiteLLM hub access, SageMaker custom deployment, web search.
|
|
1274
|
-
| **Engineering rigor** | 129 end-to-end test suites (every suite drives the public `generate`/`stream`/`decide`/CLI surface, never internals), 13 custom ESLint rules enforcing the architecture (no `interface`, unique type names, barrel-only type imports) — all AST-based, no regex heuristics.
|
|
1298
|
+
| Capability | Highlights |
|
|
1299
|
+
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1300
|
+
| **Provider unification** | Provider neurons behind one API, with automatic fallback, cost-aware routing, `providerFallback` policy, `modelChain` config. |
|
|
1301
|
+
| **Decision inference** | Third inference type (`decide`) alongside generate/stream: calibrated `boolean`/`choice`/`score` judgments via TypeSafe Jev (~400ms flat, ~$0.00002/decision), Laya, a self-hosted open-weights alternative, XOR, Juspay's open-weights model, Subquadratic's hosted SubQ Snap, Perplexity's hosted Decisions API, Cloudflare Clef on Workers AI, or OpenAI's Decisions API. Used internally for model routing, context budgeting, relevance compaction and tool routing; per-query RAG planning is opt-in via `RAGPipeline`. |
|
|
1302
|
+
| **Multimodal pipeline** | Stream images + CSV data + PDF documents across providers with local/remote assets. Auto-detection for mixed file types. |
|
|
1303
|
+
| **Voice pipeline** | TTS (6 providers: Google, OpenAI, ElevenLabs, Azure, Fish Audio, Cartesia) + STT (4 providers) + realtime voice APIs (OpenAI Realtime, Gemini Live). |
|
|
1304
|
+
| **Quality & governance** | Auto-evaluation engine (14 scorers), guardrails middleware, HITL workflows, audit logging. |
|
|
1305
|
+
| **Memory & context** | Per-user condensed memory (S3/Redis/SQLite), Redis session export, 5-stage context compaction. |
|
|
1306
|
+
| **CLI tooling** | 34 commands: loop sessions, setup wizard, config validation, Redis auto-detect, JSON output, TTS/STT flags. |
|
|
1307
|
+
| **Enterprise ops** | Claude proxy, OTLP observability, OpenObserve dashboard, regional routing, credential management. |
|
|
1308
|
+
| **Tool ecosystem** | MCP auto discovery, HTTP/stdio/SSE/WebSocket transports, LiteLLM hub access, SageMaker custom deployment, web search. |
|
|
1309
|
+
| **Engineering rigor** | 129 end-to-end test suites (every suite drives the public `generate`/`stream`/`decide`/CLI surface, never internals), 13 custom ESLint rules enforcing the architecture (no `interface`, unique type names, barrel-only type imports) — all AST-based, no regex heuristics. |
|
|
1275
1310
|
|
|
1276
1311
|
## Documentation Map
|
|
1277
1312
|
|
|
@@ -1299,7 +1334,7 @@ Full command and API breakdown lives in [`docs/cli/commands.md`](docs/cli/comman
|
|
|
1299
1334
|
|
|
1300
1335
|
**Decision Inference:**
|
|
1301
1336
|
|
|
1302
|
-
- [Decide Guide](docs/features/decide-inference-type.md) - The `decide` inference type: boolean/choice/score primitives, TypeSafe Jev / Laya / XOR / Perplexity / Cloudflare Clef setup,
|
|
1337
|
+
- [Decide Guide](docs/features/decide-inference-type.md) - The `decide` inference type: boolean/choice/score primitives, TypeSafe Jev / Laya / XOR / SubQ / Perplexity / Cloudflare Clef / OpenAI Decisions setup, and the latency/cost measured for the providers that have it
|
|
1303
1338
|
|
|
1304
1339
|
**Provider Intelligence:**
|
|
1305
1340
|
|