Interface: EventDelta
@providerprotocol/ai / @providerprotocol/ai / EventDelta
Interface: EventDelta
Section titled “Interface: EventDelta”Defined in: src/types/stream.ts:93
Event delta data payload.
Contains the type-specific data for a streaming event. Different fields are populated depending on the event type:
| Event Type | Fields |
|---|---|
text_delta | text |
reasoning_delta | text |
object_delta | text |
image_delta | data |
audio_delta | data |
video_delta | data |
tool_call_delta | toolCallId, toolName, argumentsJson |
tool_execution_start | toolCallId, toolName, timestamp |
tool_execution_end | toolCallId, toolName, result, isError, timestamp |
stream_retry | attempt, maxAttempts, error, timestamp |
message_start | (none) |
message_stop | (none) |
content_block_start | (none) |
content_block_stop | (none) |
Custom event types (via middleware) may extend EventDelta with additional fields. See @providerprotocol/ai/middleware/flow!FlowStageDelta for an example.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”argumentsJson?
Section titled “argumentsJson?”
optionalargumentsJson:string
Defined in: src/types/stream.ts:107
Incremental JSON arguments string (tool_call_delta)
attempt?
Section titled “attempt?”
optionalattempt:number
Defined in: src/types/stream.ts:119
Current retry attempt number (stream_retry, 1-indexed)
optionaldata:Uint8Array<ArrayBufferLike>
Defined in: src/types/stream.ts:98
Incremental binary data (image_delta, audio_delta, video_delta)
error?
Section titled “error?”
optionalerror:object
Defined in: src/types/stream.ts:125
Error that triggered the retry (stream_retry) - serialized for JSON transport
optionalcode:string
message
Section titled “message”message:
string
isError?
Section titled “isError?”
optionalisError:boolean
Defined in: src/types/stream.ts:113
Whether tool execution resulted in an error (tool_execution_end)
maxAttempts?
Section titled “maxAttempts?”
optionalmaxAttempts:number
Defined in: src/types/stream.ts:122
Maximum number of retry attempts configured (stream_retry)
result?
Section titled “result?”
optionalresult:unknown
Defined in: src/types/stream.ts:110
Tool execution result (tool_execution_end)
optionaltext:string
Defined in: src/types/stream.ts:95
Incremental text content (text_delta, reasoning_delta, object_delta)
timestamp?
Section titled “timestamp?”
optionaltimestamp:number
Defined in: src/types/stream.ts:116
Timestamp in milliseconds (tool_execution_start/end, stream_retry)
toolCallId?
Section titled “toolCallId?”
optionaltoolCallId:string
Defined in: src/types/stream.ts:101
Tool call identifier (tool_call_delta, tool_execution_start/end)
toolName?
Section titled “toolName?”
optionaltoolName:string
Defined in: src/types/stream.ts:104
Tool name (tool_call_delta, tool_execution_start/end)