AI Docs
API
Class References
Function References
- text
- textOptions
- combineStrategies
- convertMessagesToModelMessages
- convertZodToJsonSchema
- createReplayStream
- embedding
- generateMessageId
- maxIterations
- messages
- modelMessageToUIMessage
- modelMessagesToUIMessages
- normalizeToUIMessage
- parsePartialJSON
- summarize
- toServerSentEventsStream
- toServerSentEventsResponse
- toolDefinition
- uiMessageToModelMessages
- realtimeToken
- untilFinishReason
Interface References
- AIAdapter
- AIAdapterConfig
- AgentLoopState
- AudioPart
- AudioVisualization
- BaseStreamChunk
- TextCompletionChunk
- TextOptions
- ChunkRecording
- ChunkStrategy
- ClientTool
- ContentPartSource
- ContentStreamChunk
- DefaultMessageMetadataByModality
- DocumentPart
- DoneStreamChunk
- EmbeddingOptions
- EmbeddingResult
- ErrorStreamChunk
- ImagePart
- InternalToolCallState
- JSONParser
- ModelMessage
- ProcessorResult
- ProcessorState
- RealtimeAdapter
- RealtimeClientOptions
- RealtimeConnection
- RealtimeMessage
- RealtimeSessionConfig
- RealtimeToken
- RealtimeTokenAdapter
- RealtimeTokenOptions
- ResponseFormat
- ServerTool
- StreamProcessorEvents
- StreamProcessorHandlers
- StreamProcessorOptions
- SummarizationOptions
- SummarizationResult
- TextPart
- ThinkingPart
- ThinkingStreamChunk
- Tool
- ToolCall
- ToolCallPart
- ToolCallStreamChunk
- ToolConfig
- ToolDefinition
- ToolDefinitionConfig
- ToolDefinitionInstance
- ToolInputAvailableStreamChunk
- ToolResultPart
- ToolResultStreamChunk
- UIMessage
- VideoPart
Type Alias References
- AgentLoopStrategy
- AnyClientTool
- TextStreamOptionsForModel
- TextStreamOptionsUnion
- ConstrainedContent
- ConstrainedModelMessage
- ContentPart
- ContentPartForModalities
- ExtractModalitiesForModel
- ExtractModelsFromAdapter
- InferToolInput
- InferToolName
- InferToolOutput
- MessagePart
- RealtimeEvent
- RealtimeMessagePart
- RealtimeMode
- RealtimeStatus
- ModalitiesArrayToUnion
- Modality
- StreamChunk
- ToolCallState
- ToolResultState
Variable References
AI/LLM: This documentation page is available in plain markdown format at/ai/latest/docs/reference/interfaces/ToolPhaseCompleteInfo.md
ToolPhaseCompleteInfo
Defined in: packages/ai/src/activities/chat/middleware/types.ts:546
Aggregate information passed to onToolPhaseComplete after all tool calls in an iteration have been processed.
Properties#
needsApproval#
ts
needsApproval: object[];Defined in: packages/ai/src/activities/chat/middleware/types.ts:557
Tools that need user approval
approvalId#
ts
approvalId: string;input#
ts
input: unknown;toolCallId#
ts
toolCallId: string;toolName#
ts
toolName: string;needsClientExecution#
ts
needsClientExecution: object[];Defined in: packages/ai/src/activities/chat/middleware/types.ts:564
Tools that need client-side execution
input#
ts
input: unknown;toolCallId#
ts
toolCallId: string;toolName#
ts
toolName: string;results#
ts
results: object[];Defined in: packages/ai/src/activities/chat/middleware/types.ts:550
Completed tool results
duration?#
ts
optional duration?: number;result#
ts
result: unknown;toolCallId#
ts
toolCallId: string;toolName#
ts
toolName: string;toolCalls#
ts
toolCalls: ToolCall<unknown>[];Defined in: packages/ai/src/activities/chat/middleware/types.ts:548
Tool calls that were assigned to the assistant message