Skip to main content

Interface: TextOptions<TTools>

Defined in: packages/workflow-engine/src/ai/types.ts:387

Type Parameters​

TTools​

TTools extends ToolSet = ToolSet

Properties​

abortSignal?​

optional abortSignal?: AbortSignal

Defined in: packages/workflow-engine/src/ai/types.ts:393

Abort signal to cancel the AI SDK call (pass-through)


maxRetries?​

optional maxRetries?: number

Defined in: packages/workflow-engine/src/ai/types.ts:391

Maximum number of retries for the AI SDK call (pass-through)


maxTokens?​

optional maxTokens?: number

Defined in: packages/workflow-engine/src/ai/types.ts:389


onStepEnd?​

optional onStepEnd?: GenerateTextOnStepEndCallback<NoInfer<ToolSet>, NoInfer<Context>>

Defined in: packages/workflow-engine/src/ai/types.ts:403

Callback fired when each step completes (for collecting tool results)


output?​

optional output?: Output<any, any, any>

Defined in: packages/workflow-engine/src/ai/types.ts:405

Structured output - use with tools for combined tool calling + structured output


providerOptions?​

optional providerOptions?: Record<string, Record<string, unknown>>

Defined in: packages/workflow-engine/src/ai/types.ts:412

Provider-specific options passed directly to the AI SDK call. Use this to control reasoning per call, e.g. { openrouter: { reasoning: { enabled: false } } } or { anthropic: { thinking: { type: "disabled" } } }.


stopWhen?​

optional stopWhen?: Arrayable<StopCondition<NoInfer<ToolSet>, Context>>

Defined in: packages/workflow-engine/src/ai/types.ts:401

Condition to stop tool execution (e.g., stepCountIs(3))


temperature?​

optional temperature?: number

Defined in: packages/workflow-engine/src/ai/types.ts:388


timeoutMs?​

optional timeoutMs?: number

Defined in: packages/workflow-engine/src/ai/types.ts:395

Override the helper-level per-call timeout.


toolChoice?​

optional toolChoice?: ToolChoice<NoInfer<ToolSet>>

Defined in: packages/workflow-engine/src/ai/types.ts:399

Tool choice: 'auto' (default), 'required' (force tool use), 'none', or specific tool name


tools?​

optional tools?: TTools

Defined in: packages/workflow-engine/src/ai/types.ts:397

Tool definitions for the model to use