ai 7.0.101 → 7.0.103

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/index.d.ts +138 -22
  3. package/dist/index.js +2373 -316
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.js +2 -1
  6. package/dist/internal/index.js.map +1 -1
  7. package/dist/test/index.d.ts +16 -2
  8. package/dist/test/index.js +17 -0
  9. package/dist/test/index.js.map +1 -1
  10. package/docs/03-agents/07-workflow-agent.mdx +1 -1
  11. package/docs/03-ai-sdk-core/18-code-mode.mdx +39 -0
  12. package/docs/03-ai-sdk-core/32-evaluation.mdx +110 -0
  13. package/docs/03-ai-sdk-core/36-realtime.mdx +41 -18
  14. package/docs/03-ai-sdk-core/42-batch.mdx +1 -2
  15. package/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +35 -0
  16. package/docs/04-ai-sdk-ui/21-transport.mdx +1 -1
  17. package/docs/06-advanced/11-secure-url-fetching.mdx +8 -2
  18. package/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +54 -0
  19. package/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +12 -0
  20. package/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +12 -0
  21. package/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +364 -48
  22. package/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +12 -0
  23. package/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +4 -4
  24. package/docs/07-reference/05-ai-sdk-errors/ai-evaluation-unsupported-question-type-error.mdx +31 -0
  25. package/docs/07-reference/05-ai-sdk-errors/index.mdx +131 -36
  26. package/package.json +12 -12
  27. package/src/error/index.ts +1 -0
  28. package/src/evaluate/evaluate.ts +112 -0
  29. package/src/evaluate/evaluation-result.ts +39 -0
  30. package/src/evaluate/index.ts +7 -0
  31. package/src/evaluate/validate-evaluation.ts +298 -0
  32. package/src/generate-text/execute-tools-from-stream.ts +7 -0
  33. package/src/generate-text/generate-text.ts +16 -12
  34. package/src/generate-text/stream-text.ts +9 -2
  35. package/src/generate-text/tool-caller-configuration.ts +58 -4
  36. package/src/index.ts +1 -0
  37. package/src/realtime/__fixtures__/fake-live-websocket.ts +71 -0
  38. package/src/realtime/__fixtures__/fake-realtime.ts +36 -0
  39. package/src/realtime/__fixtures__/fake-webrtc.ts +133 -0
  40. package/src/realtime/browser-realtime-audio.ts +107 -10
  41. package/src/realtime/browser-realtime-live-websocket.ts +247 -0
  42. package/src/realtime/browser-realtime-transport.ts +235 -69
  43. package/src/realtime/browser-realtime-webrtc.ts +582 -0
  44. package/src/realtime/encode-realtime-frame.ts +33 -0
  45. package/src/realtime/index.ts +1 -0
  46. package/src/realtime/realtime-attempt.ts +45 -0
  47. package/src/realtime/realtime-command-tracker.ts +81 -0
  48. package/src/realtime/realtime-event-channel.ts +170 -0
  49. package/src/realtime/realtime-event-reducer.ts +3 -0
  50. package/src/realtime/realtime-session-state.ts +65 -0
  51. package/src/realtime/realtime-session.ts +768 -218
  52. package/src/realtime/realtime-types.ts +1 -1
  53. package/src/realtime/validate-realtime-setup.ts +37 -0
  54. package/src/test/evaluation-mock-model-v4.ts +27 -0
  55. package/src/ui/convert-to-model-messages.ts +3 -0
  56. package/src/ui/process-ui-message-stream.ts +4 -0
  57. package/src/ui/ui-messages.ts +5 -1
  58. package/src/ui/validate-ui-messages.ts +3 -0
  59. package/src/ui/warn-if-ui-message-has-deprecated-raw-input.ts +36 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.103
4
+
5
+ ### Patch Changes
6
+
7
+ - 91c2128: feat(ai): add mid conversation tool discovery/updates for code-mode
8
+ - 25a0447: feat(ai): deprecate rawInput in output-error UI message parts
9
+ - 2cd80b3: Keep default Node.js downloads protected by DNS validation and connection pinning when frameworks or instrumentation wrap global fetch before or after the SDK loads.
10
+ - 123d71f: Add `experimental_evaluate` and the isolated experimental v4 evaluation model specification for Choice, Score, and Boolean questions against shared state. Includes typed answers, optional Choice/Score distributions, required Boolean probabilities, validation, retries, cancellation, and `Experimental_EvaluationUnsupportedQuestionTypeError` for unsupported questions.
11
+ - Updated dependencies [91c2128]
12
+ - Updated dependencies [0c9ab5a]
13
+ - Updated dependencies [2cd80b3]
14
+ - Updated dependencies [d06bb2a]
15
+ - Updated dependencies [123d71f]
16
+ - Updated dependencies [2fa5e0e]
17
+ - Updated dependencies [2cce7da]
18
+ - @ai-sdk/provider-utils@5.0.42
19
+ - @ai-sdk/gateway@4.0.83
20
+ - @ai-sdk/provider@4.0.16
21
+
22
+ ## 7.0.102
23
+
24
+ ### Patch Changes
25
+
26
+ - 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.
27
+
28
+ 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.
29
+
30
+ - 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.
31
+
32
+ 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.
33
+
34
+ Preserve Realtime client event IDs for session updates and audio appends, and correlate server errors with the originating client event.
35
+
36
+ - 8b92ba9: fix(ai): settle automatically denied tool calls in UI streams
37
+ - 4b306c2: Report abnormal realtime WebSocket close codes and reasons through the session error path.
38
+ - 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.
39
+
40
+ 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.
41
+
42
+ 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.
43
+
44
+ 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.
45
+
46
+ - Updated dependencies [5c0054d]
47
+ - Updated dependencies [39535af]
48
+ - @ai-sdk/provider@4.0.15
49
+ - @ai-sdk/gateway@4.0.82
50
+ - @ai-sdk/provider-utils@5.0.41
51
+
3
52
  ## 7.0.101
4
53
 
5
54
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { EmbeddingModelV4Embedding, EmbeddingModelV4, EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV2ProviderMetadata, ImageModelV4, ImageModelV3, ImageModelV2, ImageModelV4Middleware, JSONValue as JSONValue$1, LanguageModelV4Source, SharedV4Warning, LanguageModelV4, LanguageModelV3, LanguageModelV2, LanguageModelV4Middleware, RerankingModelV4, RerankingModelV3, SharedV4ProviderMetadata, SharedV4ProviderReference, SpeechModelV4, SpeechModelV3, SpeechModelV2, TranscriptionModelV4, TranscriptionModelV3, TranscriptionModelV2, JSONObject, ImageModelV4Usage, LanguageModelV4CallOptions, LanguageModelV4Prompt, AISDKError, LanguageModelV4ToolCall, JSONSchema7, ProviderV4, ProviderV3, ProviderV2, SharedV4Headers, Experimental_BatchV4Status, Experimental_BatchV4Error, Experimental_BatchV4, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, LanguageModelV4ToolChoice, LanguageModelV4Content, JSONParseError, TypeValidationError, Experimental_VideoModelV4, Experimental_VideoModelV3, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationWebhook, Experimental_VideoModelV4OperationStatusResult, EmbeddingModelV4CallOptions, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4ToolDefinition, FilesV4, SkillsV4, NoSuchModelError, SharedV4AudioFormat, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, FilesV4UploadFileCallOptions, SkillsV4UploadSkillResult, SkillsV4UploadSkillCallOptions, SkillsV4File } from '@ai-sdk/provider';
2
- export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
1
+ import { EmbeddingModelV4Embedding, EmbeddingModelV4, EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV2ProviderMetadata, ImageModelV4, ImageModelV3, ImageModelV2, ImageModelV4Middleware, JSONValue as JSONValue$1, LanguageModelV4Source, SharedV4Warning, LanguageModelV4, LanguageModelV3, LanguageModelV2, LanguageModelV4Middleware, RerankingModelV4, RerankingModelV3, SharedV4ProviderMetadata, SharedV4ProviderReference, SpeechModelV4, SpeechModelV3, SpeechModelV2, TranscriptionModelV4, TranscriptionModelV3, TranscriptionModelV2, JSONObject, ImageModelV4Usage, LanguageModelV4CallOptions, LanguageModelV4Prompt, AISDKError, LanguageModelV4ToolCall, JSONSchema7, ProviderV4, ProviderV3, ProviderV2, SharedV4Headers, Experimental_BatchV4Status, Experimental_BatchV4Error, Experimental_BatchV4, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, LanguageModelV4ToolChoice, LanguageModelV4Content, Experimental_EvaluationModelV4Question, Experimental_EvaluationModelV4, Experimental_EvaluationModelV4Result, Experimental_EvaluationModelV4CallOptions, JSONParseError, TypeValidationError, Experimental_VideoModelV4, Experimental_VideoModelV3, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationWebhook, Experimental_VideoModelV4OperationStatusResult, EmbeddingModelV4CallOptions, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4ToolDefinition, FilesV4, SkillsV4, NoSuchModelError, SharedV4AudioFormat, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, FilesV4UploadFileCallOptions, SkillsV4UploadSkillResult, SkillsV4UploadSkillCallOptions, SkillsV4File } from '@ai-sdk/provider';
2
+ export { AISDKError, APICallError, EmptyResponseBodyError, Experimental_EvaluationUnsupportedQuestionTypeError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
3
3
  import { GatewayModelId } from '@ai-sdk/gateway';
4
4
  export { GatewayAsyncJobMetadata, GatewayModelId, GatewayProviderMetadata, createGateway, gateway } from '@ai-sdk/gateway';
5
5
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
@@ -2100,6 +2100,10 @@ type UIToolInvocation<TOOL extends UITool | Tool> = {
2100
2100
  } | {
2101
2101
  state: 'output-error';
2102
2102
  input: asUITool<TOOL>['input'] | undefined;
2103
+ /**
2104
+ * @deprecated Use `input` instead. This field will be removed in the next
2105
+ * major version.
2106
+ */
2103
2107
  rawInput?: unknown;
2104
2108
  output?: never;
2105
2109
  errorText: string;
@@ -7598,6 +7602,56 @@ declare class RetryError extends AISDKError {
7598
7602
  static isInstance(error: unknown): error is RetryError;
7599
7603
  }
7600
7604
 
7605
+ type EvaluationModel = Experimental_EvaluationModelV4;
7606
+ type EvaluationQuestion = Experimental_EvaluationModelV4Question;
7607
+ type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
7608
+ type: 'choice';
7609
+ criteria: infer CRITERIA;
7610
+ } ? {
7611
+ type: 'choice';
7612
+ choice: Extract<keyof CRITERIA, string>;
7613
+ probabilities?: Record<Extract<keyof CRITERIA, string>, number>;
7614
+ } : QUESTION extends {
7615
+ type: 'score';
7616
+ } ? {
7617
+ type: 'score';
7618
+ score: number;
7619
+ probabilities?: Record<string, number>;
7620
+ } : {
7621
+ type: 'boolean';
7622
+ probability: number;
7623
+ };
7624
+ type EvaluationResult<QUESTIONS extends Record<string, EvaluationQuestion>> = {
7625
+ readonly answers: {
7626
+ [ID in keyof QUESTIONS]: EvaluationAnswer<QUESTIONS[ID]>;
7627
+ };
7628
+ readonly usage: {
7629
+ inputTokens: number | undefined;
7630
+ outputTokens: number | undefined;
7631
+ totalTokens: number | undefined;
7632
+ };
7633
+ readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
7634
+ readonly rounding: Experimental_EvaluationModelV4Result['rounding'];
7635
+ readonly providerMetadata: Experimental_EvaluationModelV4Result['providerMetadata'];
7636
+ readonly response: NonNullable<Experimental_EvaluationModelV4Result['response']> & {
7637
+ timestamp: Date;
7638
+ modelId: string;
7639
+ };
7640
+ };
7641
+
7642
+ /** Evaluate typed questions against one shared state. Experimental. */
7643
+ declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuestion>>({ model, state, questions, maxRetries, abortSignal, headers, providerOptions, }: {
7644
+ /** An evaluation model instance. String model resolution is not yet supported. */
7645
+ model: EvaluationModel;
7646
+ state: Experimental_EvaluationModelV4CallOptions['state'];
7647
+ questions: QUESTIONS;
7648
+ /** Maximum retries for transient provider failures. Defaults to 2. */
7649
+ maxRetries?: number;
7650
+ abortSignal?: AbortSignal;
7651
+ headers?: Record<string, string>;
7652
+ providerOptions?: ProviderOptions;
7653
+ }): Promise<EvaluationResult<QUESTIONS>>;
7654
+
7601
7655
  /**
7602
7656
  * The result of a `generateObject` call.
7603
7657
  */
@@ -8940,23 +8994,63 @@ declare function getRealtimeToolDefinitions<TOOLS extends ToolSet>({ tools, tool
8940
8994
  toolsContext?: InferToolSetContext<TOOLS>;
8941
8995
  }): Promise<RealtimeToolDefinition[]>;
8942
8996
 
8943
- type RealtimeStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
8997
+ type RealtimeSessionState = {
8998
+ delegationMode?: 'client' | 'provider';
8999
+ sessionId?: string;
9000
+ transcripts: Extract<RealtimeServerEvent, {
9001
+ type: 'transcript-fragment';
9002
+ }>[];
9003
+ delegations: Extract<RealtimeServerEvent, {
9004
+ type: 'delegation-created';
9005
+ }>[];
9006
+ usage?: {
9007
+ seconds: number;
9008
+ };
9009
+ finalization: 'pending' | 'confirmed' | 'unconfirmed';
9010
+ terminationReason?: string;
9011
+ isInputMuted: boolean;
9012
+ };
9013
+
9014
+ type RealtimeStatus = 'disconnected' | 'connecting' | 'connected' | 'closing' | 'error';
8944
9015
  interface RealtimeState {
8945
9016
  status: RealtimeStatus;
8946
9017
  messages: UIMessage[];
8947
9018
  events: RealtimeServerEvent[];
8948
9019
  isCapturing: boolean;
8949
9020
  isPlaying: boolean;
9021
+ session?: RealtimeSessionState;
8950
9022
  }
8951
9023
 
8952
9024
  type RealtimeSessionOptions = {
8953
9025
  model: RealtimeModel;
9026
+ /** websocket uses a raw-protocol relay; session exchanges SDP; token fetches client-secret setup. */
8954
9027
  api: {
8955
9028
  token: string;
9029
+ session?: never;
9030
+ websocket?: never;
9031
+ protocols?: never;
9032
+ } | {
9033
+ session: string;
9034
+ token?: never;
9035
+ websocket?: never;
9036
+ protocols?: never;
9037
+ } | {
9038
+ websocket: string;
9039
+ protocols?: string[];
9040
+ token?: never;
9041
+ session?: never;
8956
9042
  };
8957
9043
  sessionConfig?: Partial<RealtimeSessionConfig>;
8958
9044
  sampleRate?: number;
8959
9045
  maxEvents?: number;
9046
+ /** Maximum time to establish transport and receive readiness. Default: 30s. */
9047
+ startupTimeoutMs?: number;
9048
+ /** Maximum wait for final usage after close(). Default: 15s. */
9049
+ closeTimeoutMs?: number;
9050
+ /** WebRTC peer disconnect recovery grace period. Default: 5s. */
9051
+ rtcDisconnectTimeoutMs?: number;
9052
+ /** Continuous PCM only: pause at this budget until resumePlayback(). Default: 2s. */
9053
+ maxPlaybackBufferSeconds?: number;
8960
9054
  onToolCall?: (args: {
8961
9055
  toolCall: {
8962
9056
  toolCallId: string;
@@ -8968,50 +9062,72 @@ type RealtimeSessionOptions = {
8968
9062
  onError?: (error: Error) => void;
8969
9063
  };
8970
9064
  declare abstract class AbstractRealtimeSession {
9065
+ private readonly options;
8971
9066
  protected state: RealtimeState;
8972
9067
  protected maxEvents: number;
8973
9068
  onToolCall: RealtimeSessionOptions['onToolCall'];
8974
- onEvent: ((event: RealtimeServerEvent) => void) | undefined;
8975
- onError: ((error: Error) => void) | undefined;
8976
- private readonly model;
8977
- private readonly api;
8978
- private readonly sessionConfig;
8979
- private readonly reducer;
8980
- private readonly transport;
8981
- private readonly audio;
9069
+ onEvent: RealtimeSessionOptions['onEvent'];
9070
+ onError: RealtimeSessionOptions['onError'];
9071
+ private reducer;
9072
+ private readonly sessionLifecycle;
9073
+ private readonly continuous;
9074
+ private attempt?;
9075
+ private commands?;
9076
+ private publication;
9077
+ private transport?;
9078
+ private audio?;
9079
+ private pcm?;
9080
+ private rtc?;
9081
+ private suppliedStream?;
9082
+ private captureGeneration;
9083
+ private captureRequested;
8982
9084
  private currentResponseItemId;
8983
9085
  private readonly toolCallsInResponse;
8984
9086
  private readonly submittedToolOutputs;
8985
9087
  private responseToolCallsClosed;
8986
9088
  protected abstract setState<K extends keyof RealtimeState>(key: K, value: RealtimeState[K]): void;
8987
9089
  constructor(options: RealtimeSessionOptions);
9090
+ private validateConnection;
8988
9091
  connect(): Promise<void>;
9092
+ connect(options: {
9093
+ stream?: MediaStream;
9094
+ capture?: boolean;
9095
+ }): Promise<void>;
9096
+ private fail;
9097
+ private drainAttempt;
9098
+ private finishAttempt;
9099
+ private closeFailed;
8989
9100
  disconnect(): void;
8990
- sendEvent(event: RealtimeClientEvent): void;
9101
+ /** Wait for final usage when the model supports a session-close acknowledgement. */
9102
+ close(options?: {
9103
+ eventId?: string;
9104
+ }): Promise<void>;
9105
+ private sendTransport;
9106
+ sendEvent(event: RealtimeClientEvent): Promise<void>;
8991
9107
  sendTextMessage(text: string): void;
8992
- sendAudio(base64Audio: string): void;
9108
+ sendAudio(audio: string): void;
8993
9109
  commitAudio(): void;
8994
9110
  clearAudioBuffer(): void;
8995
9111
  requestResponse(options?: {
8996
9112
  modalities?: string[];
8997
9113
  }): void;
8998
9114
  cancelResponse(): void;
9115
+ private sendAutomaticAudio;
8999
9116
  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
9117
  private maybeRequestToolResponse;
9007
9118
  startAudioCapture(stream: MediaStream): void;
9119
+ resumeAudioCapture(): Promise<void>;
9008
9120
  stopAudioCapture(): void;
9009
9121
  stopPlayback(): void;
9122
+ resumePlayback(): Promise<void>;
9010
9123
  dispose(): void;
9124
+ private ensureAudio;
9011
9125
  private applyState;
9012
- private executeToolCall;
9126
+ private executeTool;
9013
9127
  private handleServerEvent;
9014
9128
  private handleReducerEffect;
9129
+ private reportError;
9130
+ private notifyEvent;
9015
9131
  }
9016
9132
 
9017
9133
  /**
@@ -9023,7 +9139,7 @@ type RealtimeSetupResponse = {
9023
9139
  token: string;
9024
9140
  url: string;
9025
9141
  expiresAt?: number;
9026
- tools: RealtimeToolDefinition[];
9142
+ tools?: RealtimeToolDefinition[];
9027
9143
  };
9028
9144
 
9029
9145
  /**
@@ -9876,4 +9992,4 @@ declare function uploadSkill({ api, files, displayTitle, providerOptions, }: {
9876
9992
  files: UploadSkillFile[];
9877
9993
  }): Promise<UploadSkillResult>;
9878
9994
 
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 };
9995
+ 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 EvaluationAnswer as Experimental_EvaluationAnswer, type EvaluationModel as Experimental_EvaluationModel, type EvaluationQuestion as Experimental_EvaluationQuestion, type EvaluationResult as Experimental_EvaluationResult, 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, evaluate as experimental_evaluate, 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 };