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/UIResourceEvent.md
UIResourceEvent
Defined in: packages/ai/src/types.ts:1857
Emitted when an MCP tool returns a ui:// resource (MCP Apps). Reconciled into a UIResourcePart on the assistant UIMessage. Never enters model input.
Extends#
Properties#
metadata?#
ts
optional metadata?: Record<string, any>;Defined in: packages/ai/src/types.ts:1814
Extra information attached to this event.
Inherited from#
name#
ts
name: "ui-resource";Defined in: packages/ai/src/types.ts:1858
What this custom event is. Required: without it a consumer cannot route the value.
Overrides#
ts
CustomEvent.nametype#
ts
type: "CUSTOM";Defined in: packages/ai/src/types.ts:1813
Inherited from#
value#
ts
value: object;Defined in: packages/ai/src/types.ts:1859
The payload. Any JSON value, and required.
meta?#
ts
optional meta?: Record<string, unknown>;resource#
ts
resource: object;resource.blob?#
ts
optional blob?: string;resource.mimeType#
ts
mimeType: string;resource.text?#
ts
optional text?: string;resource.uri#
ts
uri: string;serverId?#
ts
optional serverId?: string;toolCallId#
ts
toolCallId: string;toolName#
ts
toolName: string;Overrides#
ts
CustomEvent.value