@juspay/neurolink 9.9.0 → 9.10.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 -0
- package/README.md +13 -11
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/core/modules/GenerationHandler.js +6 -2
- package/dist/lib/core/modules/GenerationHandler.js +6 -2
- package/dist/lib/neurolink.js +3 -0
- package/dist/lib/types/generateTypes.d.ts +97 -1
- package/dist/neurolink.js +3 -0
- package/dist/types/generateTypes.d.ts +97 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [9.10.0](https://github.com/juspay/neurolink/compare/v9.9.0...v9.10.0) (2026-02-20)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **(generateText):** add prepareStep and toolChoice passthrough support for multi-step agentic generation ([4cd340a](https://github.com/juspay/neurolink/commit/4cd340af7d39f72006d09fe86569232d751dcd8d))
|
|
6
|
+
|
|
1
7
|
## [9.9.0](https://github.com/juspay/neurolink/compare/v9.8.0...v9.9.0) (2026-02-17)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/README.md
CHANGED
|
@@ -35,17 +35,18 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal
|
|
|
35
35
|
|
|
36
36
|
## What's New (Q1 2026)
|
|
37
37
|
|
|
38
|
-
| Feature | Version | Description | Guide
|
|
39
|
-
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
-
| **Context Window Management** | v9.2.0 | 4-stage compaction pipeline with auto-detection, budget gate at 80% usage, per-provider token estimation | [Context Compaction Guide](docs/features/context-compaction.md)
|
|
41
|
-
| **
|
|
42
|
-
| **
|
|
43
|
-
| **
|
|
44
|
-
| **
|
|
45
|
-
| **
|
|
46
|
-
| **
|
|
47
|
-
| **
|
|
48
|
-
| **
|
|
38
|
+
| Feature | Version | Description | Guide |
|
|
39
|
+
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
40
|
+
| **Context Window Management** | v9.2.0 | 4-stage compaction pipeline with auto-detection, budget gate at 80% usage, per-provider token estimation | [Context Compaction Guide](docs/features/context-compaction.md) |
|
|
41
|
+
| **Tool Execution Control** | v9.3.0 | `prepareStep` and `toolChoice` support for per-step tool enforcement in multi-step agentic loops. API-level control over tool calls. | [API Reference](docs/api/type-aliases/GenerateOptions.md#preparestep) |
|
|
42
|
+
| **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) |
|
|
43
|
+
| **RAG with generate()/stream()** | v9.2.0 | Pass `rag: { files }` to generate/stream for automatic document chunking, embedding, and AI-powered search. 10 chunking strategies, hybrid search, reranking. | [RAG Guide](docs/features/rag.md) |
|
|
44
|
+
| **External TracerProvider Support** | v8.43.0 | Integrate NeuroLink with existing OpenTelemetry instrumentation. Prevents duplicate registration conflicts. | [Observability Guide](docs/features/observability.md) |
|
|
45
|
+
| **Server Adapters** | v8.43.0 | Multi-framework HTTP server with Hono, Express, Fastify, Koa support. Full CLI for server management with foreground/background modes. | [Server Adapters Guide](docs/guides/server-adapters/index.md) |
|
|
46
|
+
| **Title Generation Events** | v8.38.0 | Emit `conversation:titleGenerated` event when conversation title is generated. Supports custom title prompts via `NEUROLINK_TITLE_PROMPT`. | [Conversation Memory Guide](docs/conversation-memory.md) |
|
|
47
|
+
| **Video Generation with Veo** | v8.32.0 | Video generation using Veo 3.1 (`veo-3.1`). Realistic video generation with many parameter options | [Video Generation Guide](docs/features/video-generation.md) |
|
|
48
|
+
| **Image Generation with Gemini** | v8.31.0 | Native image generation using Gemini 2.0 Flash Experimental (`imagen-3.0-generate-002`). High-quality image synthesis directly from Google AI. | [Image Generation Guide](docs/image-generation-streaming.md) |
|
|
49
|
+
| **HTTP/Streamable HTTP Transport** | v8.29.0 | Connect to remote MCP servers via HTTP with authentication headers, automatic retry with exponential backoff, and configurable rate limiting. | [HTTP Transport Guide](docs/mcp-http-transport.md) |
|
|
49
50
|
|
|
50
51
|
- **External TracerProvider Support** – Integrate NeuroLink with applications that already have OpenTelemetry instrumentation. Supports auto-detection and manual configuration. → [Observability Guide](docs/features/observability.md)
|
|
51
52
|
- **Server Adapters** – Deploy NeuroLink as an HTTP API server with your framework of choice (Hono, Express, Fastify, Koa). Full CLI support with `serve` and `server` commands for foreground/background modes, route management, and OpenAPI generation. → [Server Adapters Guide](docs/guides/server-adapters/index.md)
|
|
@@ -56,6 +57,7 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal
|
|
|
56
57
|
- **RAG with generate()/stream()** – Just pass `rag: { files: ["./docs/guide.md"] }` to `generate()` or `stream()`. NeuroLink auto-chunks, embeds, and creates a search tool the AI can invoke. 10 chunking strategies, hybrid search, 5 reranker types. → [RAG Guide](docs/features/rag.md)
|
|
57
58
|
- **HTTP/Streamable HTTP Transport for MCP** – Connect to remote MCP servers via HTTP with authentication headers, retry logic, and rate limiting. → [HTTP Transport Guide](docs/mcp-http-transport.md)
|
|
58
59
|
- 🧠 **Gemini 3 Preview Support** - Full support for gemini-3-flash-preview and gemini-3-pro-preview with extended thinking capabilities
|
|
60
|
+
- 🎯 **Tool Execution Control** – Use `prepareStep` to enforce specific tool calls, change the LLM models per step in multi-step agentic executions. Prevents LLMs from skipping required tools. Use `toolChoice` for static control, or `prepareStep` for dynamic per-step logic. → [GenerateOptions Reference](docs/api/type-aliases/GenerateOptions.md#preparestep)
|
|
59
61
|
- **Structured Output with Zod Schemas** – Type-safe JSON generation with automatic validation using `schema` + `output.format: "json"` in `generate()`. → [Structured Output Guide](docs/features/structured-output.md)
|
|
60
62
|
- **CSV File Support** – Attach CSV files to prompts for AI-powered data analysis with auto-detection. → [CSV Guide](docs/features/multimodal-chat.md#csv-file-support)
|
|
61
63
|
- **PDF File Support** – Process PDF documents with native visual analysis for Vertex AI, Anthropic, Bedrock, AI Studio. → [PDF Guide](docs/features/pdf-support.md)
|
|
@@ -5,4 +5,4 @@ import type { TextGenerationOptions } from "../../lib/types/generateTypes.js";
|
|
|
5
5
|
* This object provides metadata for validation and help text in the CLI loop.
|
|
6
6
|
* It is derived from the main TextGenerationOptions interface to ensure consistency.
|
|
7
7
|
*/
|
|
8
|
-
export declare const textGenerationOptionsSchema: Record<keyof Omit<TextGenerationOptions, "prompt" | "input" | "schema" | "tools" | "context" | "conversationHistory" | "conversationMessages" | "conversationMemoryConfig" | "originalPrompt" | "middleware" | "expectedOutcome" | "evaluationCriteria" | "region" | "csvOptions" | "tts" | "thinkingConfig" | "fileRegistry" | "abortSignal" | "toolFilter" | "excludeTools">, OptionSchema>;
|
|
8
|
+
export declare const textGenerationOptionsSchema: Record<keyof Omit<TextGenerationOptions, "prompt" | "input" | "schema" | "tools" | "context" | "conversationHistory" | "conversationMessages" | "conversationMemoryConfig" | "originalPrompt" | "middleware" | "expectedOutcome" | "evaluationCriteria" | "region" | "csvOptions" | "tts" | "thinkingConfig" | "fileRegistry" | "abortSignal" | "toolFilter" | "excludeTools" | "toolChoice" | "prepareStep">, OptionSchema>;
|
|
@@ -49,8 +49,12 @@ export class GenerationHandler {
|
|
|
49
49
|
model,
|
|
50
50
|
messages,
|
|
51
51
|
...(shouldUseTools && Object.keys(tools).length > 0 && { tools }),
|
|
52
|
-
maxSteps: options.maxSteps
|
|
53
|
-
...(shouldUseTools &&
|
|
52
|
+
maxSteps: options.maxSteps ?? DEFAULT_MAX_STEPS,
|
|
53
|
+
...(shouldUseTools &&
|
|
54
|
+
options.toolChoice && { toolChoice: options.toolChoice }),
|
|
55
|
+
...(options.prepareStep && {
|
|
56
|
+
experimental_prepareStep: options.prepareStep,
|
|
57
|
+
}),
|
|
54
58
|
temperature: options.temperature,
|
|
55
59
|
maxTokens: options.maxTokens,
|
|
56
60
|
abortSignal: options.abortSignal,
|
|
@@ -49,8 +49,12 @@ export class GenerationHandler {
|
|
|
49
49
|
model,
|
|
50
50
|
messages,
|
|
51
51
|
...(shouldUseTools && Object.keys(tools).length > 0 && { tools }),
|
|
52
|
-
maxSteps: options.maxSteps
|
|
53
|
-
...(shouldUseTools &&
|
|
52
|
+
maxSteps: options.maxSteps ?? DEFAULT_MAX_STEPS,
|
|
53
|
+
...(shouldUseTools &&
|
|
54
|
+
options.toolChoice && { toolChoice: options.toolChoice }),
|
|
55
|
+
...(options.prepareStep && {
|
|
56
|
+
experimental_prepareStep: options.prepareStep,
|
|
57
|
+
}),
|
|
54
58
|
temperature: options.temperature,
|
|
55
59
|
maxTokens: options.maxTokens,
|
|
56
60
|
abortSignal: options.abortSignal,
|
package/dist/lib/neurolink.js
CHANGED
|
@@ -1570,6 +1570,9 @@ Current user's request: ${currentInput}`;
|
|
|
1570
1570
|
disableTools: options.disableTools,
|
|
1571
1571
|
toolFilter: options.toolFilter,
|
|
1572
1572
|
excludeTools: options.excludeTools,
|
|
1573
|
+
maxSteps: options.maxSteps,
|
|
1574
|
+
toolChoice: options.toolChoice,
|
|
1575
|
+
prepareStep: options.prepareStep,
|
|
1573
1576
|
enableAnalytics: options.enableAnalytics,
|
|
1574
1577
|
enableEvaluation: options.enableEvaluation,
|
|
1575
1578
|
context: options.context,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Schema, Tool } from "ai";
|
|
1
|
+
import type { Schema, Tool, ToolChoice, StepResult, LanguageModel } from "ai";
|
|
2
2
|
import type { AIProviderName } from "../constants/enums.js";
|
|
3
3
|
import type { RAGConfig } from "../rag/types.js";
|
|
4
4
|
import type { AnalyticsData, TokenUsage } from "./analytics.js";
|
|
@@ -248,6 +248,55 @@ export type GenerateOptions = {
|
|
|
248
248
|
* Default: false (backward compatible — tool schemas are injected into system prompt).
|
|
249
249
|
*/
|
|
250
250
|
skipToolPromptInjection?: boolean;
|
|
251
|
+
/** Maximum number of tool execution steps (default: 200) */
|
|
252
|
+
maxSteps?: number;
|
|
253
|
+
/**
|
|
254
|
+
* Tool choice configuration for the generation.
|
|
255
|
+
* Controls whether and which tools the model must call.
|
|
256
|
+
*
|
|
257
|
+
* - `"auto"` (default): the model can choose whether and which tools to call
|
|
258
|
+
* - `"none"`: no tool calls allowed
|
|
259
|
+
* - `"required"`: the model must call at least one tool
|
|
260
|
+
* - `{ type: "tool", toolName: string }`: the model must call the specified tool
|
|
261
|
+
*
|
|
262
|
+
* Note: When used without `prepareStep`, this applies to **every step** in the
|
|
263
|
+
* `maxSteps` loop. Using `"required"` or `{ type: "tool" }` without `prepareStep`
|
|
264
|
+
* will cause infinite tool calls until `maxSteps` is exhausted.
|
|
265
|
+
*/
|
|
266
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
267
|
+
/**
|
|
268
|
+
* Optional callback that runs before each step in a multi-step generation.
|
|
269
|
+
* Allows dynamically changing `toolChoice` and available tools per step.
|
|
270
|
+
*
|
|
271
|
+
* This is the recommended way to enforce specific tool calls on certain steps
|
|
272
|
+
* while allowing the model freedom on others.
|
|
273
|
+
*
|
|
274
|
+
* Maps to Vercel AI SDK's `experimental_prepareStep`.
|
|
275
|
+
*
|
|
276
|
+
* @example Force a specific tool on step 0, then switch to auto:
|
|
277
|
+
* ```typescript
|
|
278
|
+
* prepareStep: ({ stepNumber, steps }) => {
|
|
279
|
+
* if (stepNumber === 0) {
|
|
280
|
+
* return {
|
|
281
|
+
* toolChoice: { type: 'tool', toolName: 'myTool' }
|
|
282
|
+
* };
|
|
283
|
+
* }
|
|
284
|
+
* return { toolChoice: 'auto' };
|
|
285
|
+
* }
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @see https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text#parameters
|
|
289
|
+
*/
|
|
290
|
+
prepareStep?: (options: {
|
|
291
|
+
steps: StepResult<Record<string, Tool>>[];
|
|
292
|
+
stepNumber: number;
|
|
293
|
+
maxSteps: number;
|
|
294
|
+
model: LanguageModel;
|
|
295
|
+
}) => PromiseLike<{
|
|
296
|
+
model?: LanguageModel;
|
|
297
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
298
|
+
experimental_activeTools?: string[];
|
|
299
|
+
} | undefined>;
|
|
251
300
|
enableEvaluation?: boolean;
|
|
252
301
|
enableAnalytics?: boolean;
|
|
253
302
|
context?: StandardRecord;
|
|
@@ -569,6 +618,53 @@ export type TextGenerationOptions = {
|
|
|
569
618
|
toolFilter?: string[];
|
|
570
619
|
/** Exclude these tools by name (blacklist). Applied after toolFilter. */
|
|
571
620
|
excludeTools?: string[];
|
|
621
|
+
/**
|
|
622
|
+
* Tool choice configuration for the generation.
|
|
623
|
+
* Controls whether and which tools the model must call.
|
|
624
|
+
*
|
|
625
|
+
* - `"auto"` (default): the model can choose whether and which tools to call
|
|
626
|
+
* - `"none"`: no tool calls allowed
|
|
627
|
+
* - `"required"`: the model must call at least one tool
|
|
628
|
+
* - `{ type: "tool", toolName: string }`: the model must call the specified tool
|
|
629
|
+
*
|
|
630
|
+
* Note: When used without `prepareStep`, this applies to **every step** in the
|
|
631
|
+
* `maxSteps` loop. Using `"required"` or `{ type: "tool" }` without `prepareStep`
|
|
632
|
+
* will cause infinite tool calls until `maxSteps` is exhausted.
|
|
633
|
+
*/
|
|
634
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
635
|
+
/**
|
|
636
|
+
* Optional callback that runs before each step in a multi-step generation.
|
|
637
|
+
* Allows dynamically changing `toolChoice` and available tools per step.
|
|
638
|
+
*
|
|
639
|
+
* This is the recommended way to enforce specific tool calls on certain steps
|
|
640
|
+
* while allowing the model freedom on others.
|
|
641
|
+
*
|
|
642
|
+
* Maps to Vercel AI SDK's `experimental_prepareStep`.
|
|
643
|
+
*
|
|
644
|
+
* @example Force a specific tool on step 0, then switch to auto:
|
|
645
|
+
* ```typescript
|
|
646
|
+
* prepareStep: ({ stepNumber, steps }) => {
|
|
647
|
+
* if (stepNumber === 0) {
|
|
648
|
+
* return {
|
|
649
|
+
* toolChoice: { type: 'tool', toolName: 'myTool' }
|
|
650
|
+
* };
|
|
651
|
+
* }
|
|
652
|
+
* return { toolChoice: 'auto' };
|
|
653
|
+
* }
|
|
654
|
+
* ```
|
|
655
|
+
*
|
|
656
|
+
* @see https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text#parameters
|
|
657
|
+
*/
|
|
658
|
+
prepareStep?: (options: {
|
|
659
|
+
steps: StepResult<Record<string, Tool>>[];
|
|
660
|
+
stepNumber: number;
|
|
661
|
+
maxSteps: number;
|
|
662
|
+
model: LanguageModel;
|
|
663
|
+
}) => PromiseLike<{
|
|
664
|
+
model?: LanguageModel;
|
|
665
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
666
|
+
experimental_activeTools?: string[];
|
|
667
|
+
} | undefined>;
|
|
572
668
|
/**
|
|
573
669
|
* Text-to-Speech (TTS) configuration
|
|
574
670
|
*
|
package/dist/neurolink.js
CHANGED
|
@@ -1570,6 +1570,9 @@ Current user's request: ${currentInput}`;
|
|
|
1570
1570
|
disableTools: options.disableTools,
|
|
1571
1571
|
toolFilter: options.toolFilter,
|
|
1572
1572
|
excludeTools: options.excludeTools,
|
|
1573
|
+
maxSteps: options.maxSteps,
|
|
1574
|
+
toolChoice: options.toolChoice,
|
|
1575
|
+
prepareStep: options.prepareStep,
|
|
1573
1576
|
enableAnalytics: options.enableAnalytics,
|
|
1574
1577
|
enableEvaluation: options.enableEvaluation,
|
|
1575
1578
|
context: options.context,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Schema, Tool } from "ai";
|
|
1
|
+
import type { Schema, Tool, ToolChoice, StepResult, LanguageModel } from "ai";
|
|
2
2
|
import type { AIProviderName } from "../constants/enums.js";
|
|
3
3
|
import type { RAGConfig } from "../rag/types.js";
|
|
4
4
|
import type { AnalyticsData, TokenUsage } from "./analytics.js";
|
|
@@ -248,6 +248,55 @@ export type GenerateOptions = {
|
|
|
248
248
|
* Default: false (backward compatible — tool schemas are injected into system prompt).
|
|
249
249
|
*/
|
|
250
250
|
skipToolPromptInjection?: boolean;
|
|
251
|
+
/** Maximum number of tool execution steps (default: 200) */
|
|
252
|
+
maxSteps?: number;
|
|
253
|
+
/**
|
|
254
|
+
* Tool choice configuration for the generation.
|
|
255
|
+
* Controls whether and which tools the model must call.
|
|
256
|
+
*
|
|
257
|
+
* - `"auto"` (default): the model can choose whether and which tools to call
|
|
258
|
+
* - `"none"`: no tool calls allowed
|
|
259
|
+
* - `"required"`: the model must call at least one tool
|
|
260
|
+
* - `{ type: "tool", toolName: string }`: the model must call the specified tool
|
|
261
|
+
*
|
|
262
|
+
* Note: When used without `prepareStep`, this applies to **every step** in the
|
|
263
|
+
* `maxSteps` loop. Using `"required"` or `{ type: "tool" }` without `prepareStep`
|
|
264
|
+
* will cause infinite tool calls until `maxSteps` is exhausted.
|
|
265
|
+
*/
|
|
266
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
267
|
+
/**
|
|
268
|
+
* Optional callback that runs before each step in a multi-step generation.
|
|
269
|
+
* Allows dynamically changing `toolChoice` and available tools per step.
|
|
270
|
+
*
|
|
271
|
+
* This is the recommended way to enforce specific tool calls on certain steps
|
|
272
|
+
* while allowing the model freedom on others.
|
|
273
|
+
*
|
|
274
|
+
* Maps to Vercel AI SDK's `experimental_prepareStep`.
|
|
275
|
+
*
|
|
276
|
+
* @example Force a specific tool on step 0, then switch to auto:
|
|
277
|
+
* ```typescript
|
|
278
|
+
* prepareStep: ({ stepNumber, steps }) => {
|
|
279
|
+
* if (stepNumber === 0) {
|
|
280
|
+
* return {
|
|
281
|
+
* toolChoice: { type: 'tool', toolName: 'myTool' }
|
|
282
|
+
* };
|
|
283
|
+
* }
|
|
284
|
+
* return { toolChoice: 'auto' };
|
|
285
|
+
* }
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @see https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text#parameters
|
|
289
|
+
*/
|
|
290
|
+
prepareStep?: (options: {
|
|
291
|
+
steps: StepResult<Record<string, Tool>>[];
|
|
292
|
+
stepNumber: number;
|
|
293
|
+
maxSteps: number;
|
|
294
|
+
model: LanguageModel;
|
|
295
|
+
}) => PromiseLike<{
|
|
296
|
+
model?: LanguageModel;
|
|
297
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
298
|
+
experimental_activeTools?: string[];
|
|
299
|
+
} | undefined>;
|
|
251
300
|
enableEvaluation?: boolean;
|
|
252
301
|
enableAnalytics?: boolean;
|
|
253
302
|
context?: StandardRecord;
|
|
@@ -569,6 +618,53 @@ export type TextGenerationOptions = {
|
|
|
569
618
|
toolFilter?: string[];
|
|
570
619
|
/** Exclude these tools by name (blacklist). Applied after toolFilter. */
|
|
571
620
|
excludeTools?: string[];
|
|
621
|
+
/**
|
|
622
|
+
* Tool choice configuration for the generation.
|
|
623
|
+
* Controls whether and which tools the model must call.
|
|
624
|
+
*
|
|
625
|
+
* - `"auto"` (default): the model can choose whether and which tools to call
|
|
626
|
+
* - `"none"`: no tool calls allowed
|
|
627
|
+
* - `"required"`: the model must call at least one tool
|
|
628
|
+
* - `{ type: "tool", toolName: string }`: the model must call the specified tool
|
|
629
|
+
*
|
|
630
|
+
* Note: When used without `prepareStep`, this applies to **every step** in the
|
|
631
|
+
* `maxSteps` loop. Using `"required"` or `{ type: "tool" }` without `prepareStep`
|
|
632
|
+
* will cause infinite tool calls until `maxSteps` is exhausted.
|
|
633
|
+
*/
|
|
634
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
635
|
+
/**
|
|
636
|
+
* Optional callback that runs before each step in a multi-step generation.
|
|
637
|
+
* Allows dynamically changing `toolChoice` and available tools per step.
|
|
638
|
+
*
|
|
639
|
+
* This is the recommended way to enforce specific tool calls on certain steps
|
|
640
|
+
* while allowing the model freedom on others.
|
|
641
|
+
*
|
|
642
|
+
* Maps to Vercel AI SDK's `experimental_prepareStep`.
|
|
643
|
+
*
|
|
644
|
+
* @example Force a specific tool on step 0, then switch to auto:
|
|
645
|
+
* ```typescript
|
|
646
|
+
* prepareStep: ({ stepNumber, steps }) => {
|
|
647
|
+
* if (stepNumber === 0) {
|
|
648
|
+
* return {
|
|
649
|
+
* toolChoice: { type: 'tool', toolName: 'myTool' }
|
|
650
|
+
* };
|
|
651
|
+
* }
|
|
652
|
+
* return { toolChoice: 'auto' };
|
|
653
|
+
* }
|
|
654
|
+
* ```
|
|
655
|
+
*
|
|
656
|
+
* @see https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text#parameters
|
|
657
|
+
*/
|
|
658
|
+
prepareStep?: (options: {
|
|
659
|
+
steps: StepResult<Record<string, Tool>>[];
|
|
660
|
+
stepNumber: number;
|
|
661
|
+
maxSteps: number;
|
|
662
|
+
model: LanguageModel;
|
|
663
|
+
}) => PromiseLike<{
|
|
664
|
+
model?: LanguageModel;
|
|
665
|
+
toolChoice?: ToolChoice<Record<string, Tool>>;
|
|
666
|
+
experimental_activeTools?: string[];
|
|
667
|
+
} | undefined>;
|
|
572
668
|
/**
|
|
573
669
|
* Text-to-Speech (TTS) configuration
|
|
574
670
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.0",
|
|
4
4
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|