ai 7.0.101 → 7.0.102
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 +30 -0
- package/dist/index.d.ts +82 -20
- package/dist/index.js +2010 -330
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +1 -1
- package/docs/03-agents/07-workflow-agent.mdx +1 -1
- package/docs/03-ai-sdk-core/36-realtime.mdx +41 -18
- package/docs/04-ai-sdk-ui/21-transport.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +364 -48
- package/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +4 -4
- package/docs/07-reference/05-ai-sdk-errors/index.mdx +131 -36
- package/package.json +12 -12
- package/src/generate-text/execute-tools-from-stream.ts +7 -0
- package/src/generate-text/stream-text.ts +3 -1
- package/src/realtime/__fixtures__/fake-live-websocket.ts +71 -0
- package/src/realtime/__fixtures__/fake-realtime.ts +36 -0
- package/src/realtime/__fixtures__/fake-webrtc.ts +133 -0
- package/src/realtime/browser-realtime-audio.ts +107 -10
- package/src/realtime/browser-realtime-live-websocket.ts +247 -0
- package/src/realtime/browser-realtime-transport.ts +235 -69
- package/src/realtime/browser-realtime-webrtc.ts +582 -0
- package/src/realtime/encode-realtime-frame.ts +33 -0
- package/src/realtime/index.ts +1 -0
- package/src/realtime/realtime-attempt.ts +45 -0
- package/src/realtime/realtime-command-tracker.ts +81 -0
- package/src/realtime/realtime-event-channel.ts +170 -0
- package/src/realtime/realtime-event-reducer.ts +3 -0
- package/src/realtime/realtime-session-state.ts +65 -0
- package/src/realtime/realtime-session.ts +768 -218
- package/src/realtime/realtime-types.ts +1 -1
- package/src/realtime/validate-realtime-setup.ts +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.102
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5c0054d: Add optional browser-direct WebRTC for experimental client-delegated Live conversations alongside the existing WebSocket path. Exchange SDP through an application endpoint with `api.session`, configure server-owned data-channel permissions, and preserve committed React session ownership. Capture follows the selected sender track, borrowed tracks remain caller-owned, and disconnect recovery and finalization stay bounded. Applications continue to handle client delegation and submit context; Live session updates and Responses delegation remain unsupported.
|
|
8
|
+
|
|
9
|
+
Serialize microphone sender changes and close the peer if detachment fails, without stopping borrowed tracks. Validate nonempty SDP setup answers with a bounded response body, and document the same-origin broker authentication contract.
|
|
10
|
+
|
|
11
|
+
- 39535af: Add experimental OpenAI Live provider support through the unified `openai.experimental_realtime` factory for server WebSocket sessions with client delegation. Applications own their agents and tools, receive continuous audio/transcript events and delegation metadata, and return context through validated channels. Support immutable startup options, microphone mute controls, graceful session close, and cumulative voice usage. Responses delegation and Live session updates reject before sending.
|
|
12
|
+
|
|
13
|
+
Route known Live model IDs to Live, allow an OpenAI-specific `api` override for early-access models, and preserve legacy Realtime defaults for unknown IDs. Token minting follows the same selection rules and rejects Live before requesting unsupported credentials. Extend the realtime v4 specification with optional server WebSocket configuration, per-connection raw-event parsers, and model-wide startup/finalization capabilities. This provider layer supplies connection settings and protocol mapping for server adapters; browser lifecycle and UI integration belong to the core runtime and framework hooks.
|
|
14
|
+
|
|
15
|
+
Preserve Realtime client event IDs for session updates and audio appends, and correlate server errors with the originating client event.
|
|
16
|
+
|
|
17
|
+
- 8b92ba9: fix(ai): settle automatically denied tool calls in UI streams
|
|
18
|
+
- 4b306c2: Report abnormal realtime WebSocket close codes and reasons through the session error path.
|
|
19
|
+
- 4b306c2: Add the client-delegation-first realtime WebSocket runtime with session lifecycle, exact final duration, bounded event queues and command acknowledgement tracking, transcripts, context append, and reversible capture. Continuous sessions support PCM16 audio-chunk playback over an application relay with a recoverable live-edge buffer policy. Legacy turn-based WebSockets retain queued playback and frontend tool handling.
|
|
20
|
+
|
|
21
|
+
Remove the deferred managed Responses coordinator, autoContinueTools option, backend usage state, and Live tool-result aliases. Continuous text and delegation handling belong to the application; sendTextMessage and addToolOutput reject continuous sessions. Server-confirmed provider delegation and turn-based audio-delta on the continuous profile fail explicitly. maxPlaybackBufferSeconds is supported only for continuous PCM sessions.
|
|
22
|
+
|
|
23
|
+
Fence callbacks, startup publications, tool results, and teardown by connection attempt. Validate token setup before opening a client-secret socket, require explicit relay transport mode, and include WebSocket URL, protocol values, and runtime timeouts/buffer settings in React session configuration keys.
|
|
24
|
+
|
|
25
|
+
Retain immediate local capture for explicit legacy preconnect streams, including owned-track cleanup and capture continuity through asynchronous setup. Signal transport closing before draining accepted terminal events, share reentrant close settlement, and cancel stale readiness and deadlines. Enforce 128 KiB frame and combined buffered-send budgets only for Live continuous sessions, using actual encoded wire bytes; oversized manual operations remain recoverable while startup and automatic audio failures close the session. Legacy startup, text, tool output, and audio retain their pre-Live behavior without these byte caps. Live pending-audio overflow drains accepted terminal usage within the existing one-second drain window. Validate final provider-transformed WebSocket URL syntax without removing native authentication query parameters.
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [5c0054d]
|
|
28
|
+
- Updated dependencies [39535af]
|
|
29
|
+
- @ai-sdk/provider@4.0.15
|
|
30
|
+
- @ai-sdk/gateway@4.0.82
|
|
31
|
+
- @ai-sdk/provider-utils@5.0.41
|
|
32
|
+
|
|
3
33
|
## 7.0.101
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -8940,23 +8940,63 @@ declare function getRealtimeToolDefinitions<TOOLS extends ToolSet>({ tools, tool
|
|
|
8940
8940
|
toolsContext?: InferToolSetContext<TOOLS>;
|
|
8941
8941
|
}): Promise<RealtimeToolDefinition[]>;
|
|
8942
8942
|
|
|
8943
|
-
type
|
|
8943
|
+
type RealtimeSessionState = {
|
|
8944
|
+
delegationMode?: 'client' | 'provider';
|
|
8945
|
+
sessionId?: string;
|
|
8946
|
+
transcripts: Extract<RealtimeServerEvent, {
|
|
8947
|
+
type: 'transcript-fragment';
|
|
8948
|
+
}>[];
|
|
8949
|
+
delegations: Extract<RealtimeServerEvent, {
|
|
8950
|
+
type: 'delegation-created';
|
|
8951
|
+
}>[];
|
|
8952
|
+
usage?: {
|
|
8953
|
+
seconds: number;
|
|
8954
|
+
};
|
|
8955
|
+
finalization: 'pending' | 'confirmed' | 'unconfirmed';
|
|
8956
|
+
terminationReason?: string;
|
|
8957
|
+
isInputMuted: boolean;
|
|
8958
|
+
};
|
|
8959
|
+
|
|
8960
|
+
type RealtimeStatus = 'disconnected' | 'connecting' | 'connected' | 'closing' | 'error';
|
|
8944
8961
|
interface RealtimeState {
|
|
8945
8962
|
status: RealtimeStatus;
|
|
8946
8963
|
messages: UIMessage[];
|
|
8947
8964
|
events: RealtimeServerEvent[];
|
|
8948
8965
|
isCapturing: boolean;
|
|
8949
8966
|
isPlaying: boolean;
|
|
8967
|
+
session?: RealtimeSessionState;
|
|
8950
8968
|
}
|
|
8951
8969
|
|
|
8952
8970
|
type RealtimeSessionOptions = {
|
|
8953
8971
|
model: RealtimeModel;
|
|
8972
|
+
/** websocket uses a raw-protocol relay; session exchanges SDP; token fetches client-secret setup. */
|
|
8954
8973
|
api: {
|
|
8955
8974
|
token: string;
|
|
8975
|
+
session?: never;
|
|
8976
|
+
websocket?: never;
|
|
8977
|
+
protocols?: never;
|
|
8978
|
+
} | {
|
|
8979
|
+
session: string;
|
|
8980
|
+
token?: never;
|
|
8981
|
+
websocket?: never;
|
|
8982
|
+
protocols?: never;
|
|
8983
|
+
} | {
|
|
8984
|
+
websocket: string;
|
|
8985
|
+
protocols?: string[];
|
|
8986
|
+
token?: never;
|
|
8987
|
+
session?: never;
|
|
8956
8988
|
};
|
|
8957
8989
|
sessionConfig?: Partial<RealtimeSessionConfig>;
|
|
8958
8990
|
sampleRate?: number;
|
|
8959
8991
|
maxEvents?: number;
|
|
8992
|
+
/** Maximum time to establish transport and receive readiness. Default: 30s. */
|
|
8993
|
+
startupTimeoutMs?: number;
|
|
8994
|
+
/** Maximum wait for final usage after close(). Default: 15s. */
|
|
8995
|
+
closeTimeoutMs?: number;
|
|
8996
|
+
/** WebRTC peer disconnect recovery grace period. Default: 5s. */
|
|
8997
|
+
rtcDisconnectTimeoutMs?: number;
|
|
8998
|
+
/** Continuous PCM only: pause at this budget until resumePlayback(). Default: 2s. */
|
|
8999
|
+
maxPlaybackBufferSeconds?: number;
|
|
8960
9000
|
onToolCall?: (args: {
|
|
8961
9001
|
toolCall: {
|
|
8962
9002
|
toolCallId: string;
|
|
@@ -8968,50 +9008,72 @@ type RealtimeSessionOptions = {
|
|
|
8968
9008
|
onError?: (error: Error) => void;
|
|
8969
9009
|
};
|
|
8970
9010
|
declare abstract class AbstractRealtimeSession {
|
|
9011
|
+
private readonly options;
|
|
8971
9012
|
protected state: RealtimeState;
|
|
8972
9013
|
protected maxEvents: number;
|
|
8973
9014
|
onToolCall: RealtimeSessionOptions['onToolCall'];
|
|
8974
|
-
onEvent:
|
|
8975
|
-
onError:
|
|
8976
|
-
private
|
|
8977
|
-
private readonly
|
|
8978
|
-
private readonly
|
|
8979
|
-
private
|
|
8980
|
-
private
|
|
8981
|
-
private
|
|
9015
|
+
onEvent: RealtimeSessionOptions['onEvent'];
|
|
9016
|
+
onError: RealtimeSessionOptions['onError'];
|
|
9017
|
+
private reducer;
|
|
9018
|
+
private readonly sessionLifecycle;
|
|
9019
|
+
private readonly continuous;
|
|
9020
|
+
private attempt?;
|
|
9021
|
+
private commands?;
|
|
9022
|
+
private publication;
|
|
9023
|
+
private transport?;
|
|
9024
|
+
private audio?;
|
|
9025
|
+
private pcm?;
|
|
9026
|
+
private rtc?;
|
|
9027
|
+
private suppliedStream?;
|
|
9028
|
+
private captureGeneration;
|
|
9029
|
+
private captureRequested;
|
|
8982
9030
|
private currentResponseItemId;
|
|
8983
9031
|
private readonly toolCallsInResponse;
|
|
8984
9032
|
private readonly submittedToolOutputs;
|
|
8985
9033
|
private responseToolCallsClosed;
|
|
8986
9034
|
protected abstract setState<K extends keyof RealtimeState>(key: K, value: RealtimeState[K]): void;
|
|
8987
9035
|
constructor(options: RealtimeSessionOptions);
|
|
9036
|
+
private validateConnection;
|
|
8988
9037
|
connect(): Promise<void>;
|
|
9038
|
+
connect(options: {
|
|
9039
|
+
stream?: MediaStream;
|
|
9040
|
+
capture?: boolean;
|
|
9041
|
+
}): Promise<void>;
|
|
9042
|
+
private fail;
|
|
9043
|
+
private drainAttempt;
|
|
9044
|
+
private finishAttempt;
|
|
9045
|
+
private closeFailed;
|
|
8989
9046
|
disconnect(): void;
|
|
8990
|
-
|
|
9047
|
+
/** Wait for final usage when the model supports a session-close acknowledgement. */
|
|
9048
|
+
close(options?: {
|
|
9049
|
+
eventId?: string;
|
|
9050
|
+
}): Promise<void>;
|
|
9051
|
+
private sendTransport;
|
|
9052
|
+
sendEvent(event: RealtimeClientEvent): Promise<void>;
|
|
8991
9053
|
sendTextMessage(text: string): void;
|
|
8992
|
-
sendAudio(
|
|
9054
|
+
sendAudio(audio: string): void;
|
|
8993
9055
|
commitAudio(): void;
|
|
8994
9056
|
clearAudioBuffer(): void;
|
|
8995
9057
|
requestResponse(options?: {
|
|
8996
9058
|
modalities?: string[];
|
|
8997
9059
|
}): void;
|
|
8998
9060
|
cancelResponse(): void;
|
|
9061
|
+
private sendAutomaticAudio;
|
|
8999
9062
|
addToolOutput(callId: string, result: unknown): void;
|
|
9000
|
-
/**
|
|
9001
|
-
* Requests a single response once the tool-bearing response has finished
|
|
9002
|
-
* delivering its tool calls and every one of them has an output. Requesting a
|
|
9003
|
-
* response after each individual output can cause the model to continue
|
|
9004
|
-
* without the full tool context on multi-tool turns.
|
|
9005
|
-
*/
|
|
9006
9063
|
private maybeRequestToolResponse;
|
|
9007
9064
|
startAudioCapture(stream: MediaStream): void;
|
|
9065
|
+
resumeAudioCapture(): Promise<void>;
|
|
9008
9066
|
stopAudioCapture(): void;
|
|
9009
9067
|
stopPlayback(): void;
|
|
9068
|
+
resumePlayback(): Promise<void>;
|
|
9010
9069
|
dispose(): void;
|
|
9070
|
+
private ensureAudio;
|
|
9011
9071
|
private applyState;
|
|
9012
|
-
private
|
|
9072
|
+
private executeTool;
|
|
9013
9073
|
private handleServerEvent;
|
|
9014
9074
|
private handleReducerEffect;
|
|
9075
|
+
private reportError;
|
|
9076
|
+
private notifyEvent;
|
|
9015
9077
|
}
|
|
9016
9078
|
|
|
9017
9079
|
/**
|
|
@@ -9023,7 +9085,7 @@ type RealtimeSetupResponse = {
|
|
|
9023
9085
|
token: string;
|
|
9024
9086
|
url: string;
|
|
9025
9087
|
expiresAt?: number;
|
|
9026
|
-
tools
|
|
9088
|
+
tools?: RealtimeToolDefinition[];
|
|
9027
9089
|
};
|
|
9028
9090
|
|
|
9029
9091
|
/**
|
|
@@ -9876,4 +9938,4 @@ declare function uploadSkill({ api, files, displayTitle, providerOptions, }: {
|
|
|
9876
9938
|
files: UploadSkillFile[];
|
|
9877
9939
|
}): Promise<UploadSkillResult>;
|
|
9878
9940
|
|
|
9879
|
-
export { AI_SDK_TELEMETRY_TRACING_CHANNEL, AbstractChat, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AsyncIterableStream, type CallSettings, type CallWarning, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataUIPart, type DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, type DirectChatTransportOptions, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type EmbedEndEvent, type EmbedManyResult, type EmbedResult, type EmbedStartEvent, type Embedding, type EmbeddingModel, type EmbeddingModelCallEndEvent, type EmbeddingModelCallStartEvent, type EmbeddingModelMiddleware, type EmbeddingModelUsage, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DownloadFunction as Experimental_DownloadFunction, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FileUIPart, type FinishReason, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, HttpChatTransport, type HttpChatTransportInitOptions, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type InferAgentUIMessage, type InferCompleteOutput as InferGenerateOutput, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolApprovalSignatureError, InvalidToolInputError, type JSONValue, JsonToSseTransformStream, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, type LogWarningsFunction, MessageConversionError, MissingToolResultsError, type ModelInfo, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoTranslationGeneratedError, NoVideoGeneratedError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, RetryError, type SafeValidateUIMessagesResult, SerialJobExecutor, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, StreamProviderError, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, TextStreamChatTransport, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, type ToolApprovalConfiguration, type ToolApprovalRequestOutput, type ToolApprovalResponseOutput, type ToolApprovalStatus, ToolCallNotFoundForApprovalError, ToolCallRepairError, type ToolCallRepairFunction, type ToolChoice, ToolChoiceViolationError, type ToolExecutionEndEvent, type ToolExecutionStartEvent, type ToolInputRefinement, ToolLoopAgent, type ToolLoopAgentSettings, type ToolOrder, type ToolOutputErrorUIPart, type ToolUIPart, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStreamPart, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, UIMessageStreamError, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultInstructionsMiddleware, defaultSettingsMiddleware, detectToolDrift, embed, embedMany, cancelBatch as experimental_cancelBatch, experimental_createProviderRegistry, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, experimental_generateVideo, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, experimental_getVideoStatus, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, experimental_startVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, fingerprintTools, generateImage, generateObject, generateSpeech, generateText, getChunkTimeoutMs, getFirstChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolOutputErrorUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetry, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toTextStream, toUIMessageChunk, toUIMessageStream, toolModelMessageSchema, transcribe, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
|
|
9941
|
+
export { AI_SDK_TELEMETRY_TRACING_CHANNEL, AbstractChat, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AsyncIterableStream, type CallSettings, type CallWarning, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataUIPart, type DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, type DirectChatTransportOptions, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type EmbedEndEvent, type EmbedManyResult, type EmbedResult, type EmbedStartEvent, type Embedding, type EmbeddingModel, type EmbeddingModelCallEndEvent, type EmbeddingModelCallStartEvent, type EmbeddingModelMiddleware, type EmbeddingModelUsage, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DownloadFunction as Experimental_DownloadFunction, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FileUIPart, type FinishReason, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, HttpChatTransport, type HttpChatTransportInitOptions, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type InferAgentUIMessage, type InferCompleteOutput as InferGenerateOutput, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolApprovalSignatureError, InvalidToolInputError, type JSONValue, JsonToSseTransformStream, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, type LogWarningsFunction, MessageConversionError, MissingToolResultsError, type ModelInfo, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoTranslationGeneratedError, NoVideoGeneratedError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, RetryError, type SafeValidateUIMessagesResult, SerialJobExecutor, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, StreamProviderError, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, TextStreamChatTransport, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, type ToolApprovalConfiguration, type ToolApprovalRequestOutput, type ToolApprovalResponseOutput, type ToolApprovalStatus, ToolCallNotFoundForApprovalError, ToolCallRepairError, type ToolCallRepairFunction, type ToolChoice, ToolChoiceViolationError, type ToolExecutionEndEvent, type ToolExecutionStartEvent, type ToolInputRefinement, ToolLoopAgent, type ToolLoopAgentSettings, type ToolOrder, type ToolOutputErrorUIPart, type ToolUIPart, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStreamPart, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, UIMessageStreamError, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultInstructionsMiddleware, defaultSettingsMiddleware, detectToolDrift, embed, embedMany, cancelBatch as experimental_cancelBatch, experimental_createProviderRegistry, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, experimental_generateVideo, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, experimental_getVideoStatus, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, experimental_startVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, fingerprintTools, generateImage, generateObject, generateSpeech, generateText, getChunkTimeoutMs, getFirstChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolOutputErrorUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetry, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toTextStream, toUIMessageChunk, toUIMessageStream, toolModelMessageSchema, transcribe, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
|