@ai-sdk/provider 4.0.14 → 4.0.16

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 4.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - d06bb2a: Allow readonly arrays and objects containing them to be used as JSON values.
8
+ - 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.
9
+
10
+ ## 4.0.15
11
+
12
+ ### Patch Changes
13
+
14
+ - 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.
15
+
16
+ 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.
17
+
18
+ - 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.
19
+
20
+ 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.
21
+
22
+ Preserve Realtime client event IDs for session updates and audio appends, and correlate server errors with the originating client event.
23
+
3
24
  ## 4.0.14
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -84,7 +84,7 @@ type SharedV4Headers = Record<string, string>;
84
84
  * A JSON value can be a string, number, boolean, object, array, or null.
85
85
  * JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
86
86
  */
87
- type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
87
+ type JSONValue = null | string | number | boolean | Readonly<JSONObject> | readonly JSONValue[];
88
88
  type JSONObject = {
89
89
  [key: string]: JSONValue | undefined;
90
90
  };
@@ -1974,13 +1974,13 @@ type EmbeddingModelV2<VALUE> = {
1974
1974
  }>;
1975
1975
  };
1976
1976
 
1977
- declare const symbol$e: unique symbol;
1977
+ declare const symbol$f: unique symbol;
1978
1978
  /**
1979
1979
  * Custom error class for AI SDK related errors.
1980
1980
  * @extends Error
1981
1981
  */
1982
1982
  declare class AISDKError extends Error {
1983
- private readonly [symbol$e];
1983
+ private readonly [symbol$f];
1984
1984
  /**
1985
1985
  * The underlying cause of the error, if any.
1986
1986
  */
@@ -2007,9 +2007,9 @@ declare class AISDKError extends Error {
2007
2007
  protected static hasMarker(error: unknown, marker: string): boolean;
2008
2008
  }
2009
2009
 
2010
- declare const symbol$d: unique symbol;
2010
+ declare const symbol$e: unique symbol;
2011
2011
  declare class APICallError extends AISDKError {
2012
- private readonly [symbol$d];
2012
+ private readonly [symbol$e];
2013
2013
  readonly url: string;
2014
2014
  readonly requestBodyValues: unknown;
2015
2015
  readonly statusCode?: number;
@@ -2032,15 +2032,35 @@ declare class APICallError extends AISDKError {
2032
2032
  static isInstance(error: unknown): error is APICallError;
2033
2033
  }
2034
2034
 
2035
- declare const symbol$c: unique symbol;
2035
+ declare const symbol$d: unique symbol;
2036
2036
  declare class EmptyResponseBodyError extends AISDKError {
2037
- private readonly [symbol$c];
2037
+ private readonly [symbol$d];
2038
2038
  constructor({ message }?: {
2039
2039
  message?: string;
2040
2040
  });
2041
2041
  static isInstance(error: unknown): error is EmptyResponseBodyError;
2042
2042
  }
2043
2043
 
2044
+ declare const symbol$c: unique symbol;
2045
+ /**
2046
+ * An evaluation model does not support the type of a requested question.
2047
+ */
2048
+ declare class EvaluationUnsupportedQuestionTypeError extends AISDKError {
2049
+ private readonly [symbol$c];
2050
+ readonly questionId: string;
2051
+ readonly questionType: string;
2052
+ readonly provider: string;
2053
+ readonly modelId: string;
2054
+ constructor({ questionId, questionType, provider, modelId, message, }: {
2055
+ questionId: string;
2056
+ questionType: string;
2057
+ provider: string;
2058
+ modelId: string;
2059
+ message?: string;
2060
+ });
2061
+ static isInstance(error: unknown): error is EvaluationUnsupportedQuestionTypeError;
2062
+ }
2063
+
2044
2064
  declare function getErrorMessage(error: unknown | undefined): string;
2045
2065
 
2046
2066
  declare const symbol$b: unique symbol;
@@ -2231,6 +2251,95 @@ declare class UnsupportedFunctionalityError extends AISDKError {
2231
2251
  static isInstance(error: unknown): error is UnsupportedFunctionalityError;
2232
2252
  }
2233
2253
 
2254
+ /** Shared state or structured instructions for an evaluation. */
2255
+ type EvaluationModelV4Input = string | Readonly<JSONObject> | readonly JSONValue[];
2256
+ /** A judgment to make about the shared state. */
2257
+ type EvaluationModelV4Question = {
2258
+ readonly type: 'choice';
2259
+ readonly instructions: EvaluationModelV4Input;
2260
+ /** Nonempty map of option names to descriptions. Null means no description. */
2261
+ readonly criteria: Readonly<Record<string, EvaluationModelV4Input | null>>;
2262
+ } | {
2263
+ readonly type: 'score';
2264
+ readonly instructions: EvaluationModelV4Input;
2265
+ /** At least two ordered levels, indexed from zero. */
2266
+ readonly criteria: readonly (EvaluationModelV4Input | null)[];
2267
+ } | {
2268
+ readonly type: 'boolean';
2269
+ readonly instructions: EvaluationModelV4Input;
2270
+ readonly criteria?: {
2271
+ readonly true?: EvaluationModelV4Input | null;
2272
+ readonly false?: EvaluationModelV4Input | null;
2273
+ };
2274
+ };
2275
+
2276
+ type EvaluationModelV4CallOptions = {
2277
+ /** One shared state, even when the value is an array. */
2278
+ state: EvaluationModelV4Input;
2279
+ questions: Readonly<Record<string, EvaluationModelV4Question>>;
2280
+ abortSignal?: AbortSignal;
2281
+ headers?: SharedV4Headers;
2282
+ providerOptions?: SharedV4ProviderOptions;
2283
+ };
2284
+
2285
+ type EvaluationModelV4Answer = {
2286
+ type: 'choice';
2287
+ /** The selected option, with maximal probability when a distribution exists. */
2288
+ choice: string;
2289
+ /** Complete distribution over the question's options, when available. */
2290
+ probabilities?: Record<string, number>;
2291
+ } | {
2292
+ type: 'score';
2293
+ /** Fractional position in [0, number of levels - 1]. */
2294
+ score: number;
2295
+ /**
2296
+ * Complete distribution, keyed by zero-based level indices as strings.
2297
+ * When supplied, score is its probability-weighted mean.
2298
+ */
2299
+ probabilities?: Record<string, number>;
2300
+ } | {
2301
+ type: 'boolean';
2302
+ /** Model-estimated P(true), in [0, 1]. Not confidence in either outcome. */
2303
+ probability: number;
2304
+ };
2305
+ type EvaluationModelV4Result = {
2306
+ /** Exactly one answer per question, under the original question IDs. */
2307
+ answers: Record<string, EvaluationModelV4Answer>;
2308
+ /**
2309
+ * Decimal places used when the provider rounds its output. Omit for full
2310
+ * precision. Core allows half a unit in the last place per rounded value
2311
+ * when checking distribution sums and weighted scores, preserving the values.
2312
+ */
2313
+ rounding?: {
2314
+ probabilityDecimals?: number;
2315
+ scoreDecimals?: number;
2316
+ };
2317
+ usage?: {
2318
+ inputTokens?: number;
2319
+ outputTokens?: number;
2320
+ };
2321
+ warnings: SharedV4Warning[];
2322
+ providerMetadata?: SharedV4ProviderMetadata;
2323
+ response?: {
2324
+ id?: string;
2325
+ timestamp?: Date;
2326
+ modelId?: string;
2327
+ headers?: SharedV4Headers;
2328
+ body?: unknown;
2329
+ };
2330
+ };
2331
+
2332
+ /** Experimental evaluation model contract. May change in patch releases. */
2333
+ type EvaluationModelV4 = {
2334
+ readonly specificationVersion: 'v4';
2335
+ readonly provider: string;
2336
+ readonly modelId: string;
2337
+ /** Supported question types, used to reject unsupported calls before any I/O. */
2338
+ readonly supportedQuestionTypes: readonly EvaluationModelV4Question['type'][];
2339
+ /** Evaluate every question against the same state. No partial results. */
2340
+ doEvaluate(options: EvaluationModelV4CallOptions): PromiseLike<EvaluationModelV4Result>;
2341
+ };
2342
+
2234
2343
  /**
2235
2344
  * Options for deleting a file via the files interface.
2236
2345
  */
@@ -6997,12 +7106,33 @@ type RealtimeModelV4FunctionCallOutput = {
6997
7106
  type RealtimeModelV4ClientEvent = {
6998
7107
  type: 'session-update';
6999
7108
  config: RealtimeModelV4SessionConfig;
7109
+ eventId?: string;
7110
+ } | {
7111
+ type: 'session-start';
7112
+ config: RealtimeModelV4SessionConfig;
7113
+ eventId?: string;
7114
+ } | {
7115
+ type: 'session-close';
7116
+ eventId?: string;
7117
+ } | {
7118
+ type: 'input-audio-mute';
7119
+ eventId?: string;
7120
+ } | {
7121
+ type: 'input-audio-unmute';
7122
+ eventId?: string;
7123
+ } | {
7124
+ type: 'context-append';
7125
+ content: string;
7126
+ delegationId: string | null;
7127
+ eventId?: string;
7128
+ providerOptions?: SharedV4ProviderOptions;
7000
7129
  } | {
7001
7130
  type: 'input-audio-append';
7002
7131
  /**
7003
7132
  * Base64-encoded audio chunk to append to the input buffer.
7004
7133
  */
7005
7134
  audio: string;
7135
+ eventId?: string;
7006
7136
  } | {
7007
7137
  type: 'input-audio-commit';
7008
7138
  } | {
@@ -7043,6 +7173,51 @@ type RealtimeModelV4ClientEvent = {
7043
7173
  * event data for debugging and provider-specific access.
7044
7174
  */
7045
7175
  type RealtimeModelV4ServerEvent = {
7176
+ type: 'session-started';
7177
+ sessionId: string;
7178
+ delegationMode?: 'client' | 'provider';
7179
+ raw: unknown;
7180
+ } | {
7181
+ type: 'session-closed';
7182
+ sessionId?: string;
7183
+ usage: {
7184
+ seconds: number;
7185
+ };
7186
+ reason: string;
7187
+ raw: unknown;
7188
+ } | {
7189
+ type: 'session-usage';
7190
+ /** Cumulative duration snapshot, not an increment. */
7191
+ usage: {
7192
+ seconds: number;
7193
+ };
7194
+ contextWindowUsageRatio?: number;
7195
+ raw: unknown;
7196
+ } | {
7197
+ type: 'audio-chunk';
7198
+ delta: string;
7199
+ raw: unknown;
7200
+ } | {
7201
+ type: 'transcript-fragment';
7202
+ speaker: 'user' | 'assistant';
7203
+ delta: string;
7204
+ startMs: number;
7205
+ endMs: number;
7206
+ raw: unknown;
7207
+ } | {
7208
+ type: 'delegation-created';
7209
+ delegationId: string;
7210
+ target?: 'client' | 'provider';
7211
+ offsetMs?: number;
7212
+ responseId?: string;
7213
+ raw: unknown;
7214
+ } | {
7215
+ type: 'command-acknowledged';
7216
+ /** Provider-native command name that was acknowledged. */
7217
+ command: string;
7218
+ clientEventId?: string;
7219
+ raw: unknown;
7220
+ } | {
7046
7221
  type: 'session-created';
7047
7222
  sessionId?: string;
7048
7223
  raw: unknown;
@@ -7173,6 +7348,7 @@ type RealtimeModelV4ServerEvent = {
7173
7348
  type: 'error';
7174
7349
  message: string;
7175
7350
  code?: string;
7351
+ clientEventId?: string;
7176
7352
  raw: unknown;
7177
7353
  } | {
7178
7354
  type: 'custom';
@@ -7203,6 +7379,38 @@ type RealtimeModelV4 = {
7203
7379
  * Provider-specific model ID (e.g. 'gpt-4o-realtime', 'grok-3').
7204
7380
  */
7205
7381
  readonly modelId: string;
7382
+ /** Conversation semantics and supported transports, when declared. */
7383
+ readonly capabilities?: {
7384
+ conversation: 'continuous' | 'turn-based';
7385
+ transports: readonly ('websocket' | 'webrtc')[];
7386
+ /** Omission preserves the legacy client-secret WebSocket connection. */
7387
+ connections?: readonly ('client-secret-websocket' | 'server-websocket' | 'webrtc')[];
7388
+ /** Omission preserves session-update startup. WebRTC setup may start the session. */
7389
+ startup?: 'session-start' | 'session-update';
7390
+ /** Omission preserves transport-close finalization. */
7391
+ finalization?: 'session-close' | 'transport-close';
7392
+ };
7393
+ /** Server-only connection settings. Headers can contain long-lived credentials. */
7394
+ getServerWebSocketConfig?(): {
7395
+ url: string;
7396
+ headers: Record<string, string>;
7397
+ } | PromiseLike<{
7398
+ url: string;
7399
+ headers: Record<string, string>;
7400
+ }>;
7401
+ /** Provider-specific setup for the WebRTC event channel. */
7402
+ getWebRTCConfig?(): {
7403
+ dataChannelLabel: string;
7404
+ };
7405
+ /** Server-side SDP exchange. Return only the answer and session ID to the client. */
7406
+ doCreateWebRTCSession?(options: {
7407
+ sdp: string;
7408
+ sessionConfig?: RealtimeModelV4SessionConfig;
7409
+ abortSignal?: AbortSignal;
7410
+ }): PromiseLike<{
7411
+ sessionId: string;
7412
+ sdp: string;
7413
+ }>;
7206
7414
  /**
7207
7415
  * Server-side: Creates an ephemeral client secret for authenticating
7208
7416
  * browser-side WebSocket connections. The secret is short-lived and
@@ -7210,13 +7418,13 @@ type RealtimeModelV4 = {
7210
7418
  *
7211
7419
  * Naming: "do" prefix to prevent accidental direct usage by the user.
7212
7420
  */
7213
- doCreateClientSecret(options: RealtimeModelV4ClientSecretOptions): PromiseLike<RealtimeModelV4ClientSecretResult>;
7421
+ doCreateClientSecret?(options: RealtimeModelV4ClientSecretOptions): PromiseLike<RealtimeModelV4ClientSecretResult>;
7214
7422
  /**
7215
7423
  * Browser-side: Returns the WebSocket URL and subprotocols to use
7216
7424
  * when connecting. Each provider has its own authentication mechanism
7217
7425
  * (e.g. OpenAI uses subprotocol headers, xAI may use query params).
7218
7426
  */
7219
- getWebSocketConfig(options: {
7427
+ getWebSocketConfig?(options: {
7220
7428
  token: string;
7221
7429
  url: string;
7222
7430
  }): {
@@ -7233,6 +7441,8 @@ type RealtimeModelV4 = {
7233
7441
  * text, and turn-complete data in one message).
7234
7442
  */
7235
7443
  parseServerEvent(raw: unknown): RealtimeModelV4ServerEvent | RealtimeModelV4ServerEvent[];
7444
+ /** Create a raw-event parser per connection and discard it on disconnect. */
7445
+ createServerEventParser?(): (raw: unknown) => RealtimeModelV4ServerEvent | RealtimeModelV4ServerEvent[];
7236
7446
  /**
7237
7447
  * Browser-side: Serializes a normalized client event into the
7238
7448
  * provider's native JSON format for sending over the WebSocket.
@@ -8257,4 +8467,4 @@ type VideoModelV3 = {
8257
8467
  }>;
8258
8468
  };
8259
8469
 
8260
- export { AISDKError, APICallError, type EmbeddingModelV2, type EmbeddingModelV2Embedding, type EmbeddingModelV3, type EmbeddingModelV3CallOptions, type EmbeddingModelV3Embedding, type EmbeddingModelV3Middleware, type EmbeddingModelV3Result, type EmbeddingModelV4, type EmbeddingModelV4CallOptions, type EmbeddingModelV4Embedding, type EmbeddingModelV4Middleware, type EmbeddingModelV4Result, EmptyResponseBodyError, type BatchV4 as Experimental_BatchV4, type BatchV4CancelResult as Experimental_BatchV4CancelResult, type BatchV4Error as Experimental_BatchV4Error, type BatchV4ItemResult as Experimental_BatchV4ItemResult, type BatchV4ListItem as Experimental_BatchV4ListItem, type BatchV4ListOptions as Experimental_BatchV4ListOptions, type BatchV4ListResult as Experimental_BatchV4ListResult, type BatchV4ModelIds as Experimental_BatchV4ModelIds, type BatchV4OperationOptions as Experimental_BatchV4OperationOptions, type BatchV4Request as Experimental_BatchV4Request, type BatchV4RequestBase as Experimental_BatchV4RequestBase, type BatchV4StartOptions as Experimental_BatchV4StartOptions, type BatchV4StartResult as Experimental_BatchV4StartResult, type BatchV4Status as Experimental_BatchV4Status, type ImageBatchV4ItemResult as Experimental_ImageBatchV4ItemResult, type ImageBatchV4Request as Experimental_ImageBatchV4Request, type RealtimeFactoryV4 as Experimental_RealtimeFactoryV4, type RealtimeFactoryV4GetTokenOptions as Experimental_RealtimeFactoryV4GetTokenOptions, type RealtimeFactoryV4GetTokenResult as Experimental_RealtimeFactoryV4GetTokenResult, type RealtimeModelV4 as Experimental_RealtimeModelV4, type RealtimeModelV4AudioMessage as Experimental_RealtimeModelV4AudioMessage, type RealtimeModelV4ClientEvent as Experimental_RealtimeModelV4ClientEvent, type RealtimeModelV4ClientSecretOptions as Experimental_RealtimeModelV4ClientSecretOptions, type RealtimeModelV4ClientSecretResult as Experimental_RealtimeModelV4ClientSecretResult, type RealtimeModelV4ConversationItem as Experimental_RealtimeModelV4ConversationItem, type RealtimeModelV4FunctionCallOutput as Experimental_RealtimeModelV4FunctionCallOutput, type RealtimeModelV4ServerEvent as Experimental_RealtimeModelV4ServerEvent, type RealtimeModelV4SessionConfig as Experimental_RealtimeModelV4SessionConfig, type RealtimeModelV4TextMessage as Experimental_RealtimeModelV4TextMessage, type RealtimeModelV4ToolDefinition as Experimental_RealtimeModelV4ToolDefinition, type SpeechTranslationModelV4 as Experimental_SpeechTranslationModelV4, type SpeechTranslationModelV4StreamOptions as Experimental_SpeechTranslationModelV4StreamOptions, type SpeechTranslationModelV4StreamPart as Experimental_SpeechTranslationModelV4StreamPart, type SpeechTranslationModelV4StreamResult as Experimental_SpeechTranslationModelV4StreamResult, type SpeechTranslationModelV4Usage as Experimental_SpeechTranslationModelV4Usage, type TextBatchV4ItemResult as Experimental_TextBatchV4ItemResult, type TextBatchV4Request as Experimental_TextBatchV4Request, type TranscriptionModelV4StreamOptions as Experimental_TranscriptionModelV4StreamOptions, type TranscriptionModelV4StreamPart as Experimental_TranscriptionModelV4StreamPart, type TranscriptionModelV4StreamResult as Experimental_TranscriptionModelV4StreamResult, type VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3FrameImage as Experimental_VideoModelV3FrameImage, type VideoModelV3FrameType as Experimental_VideoModelV3FrameType, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, type VideoModelV4FrameImage as Experimental_VideoModelV4FrameImage, type VideoModelV4FrameType as Experimental_VideoModelV4FrameType, type VideoModelV4OperationStartResult as Experimental_VideoModelV4OperationStartResult, type VideoModelV4OperationStatusResult as Experimental_VideoModelV4OperationStatusResult, type VideoModelV4OperationWebhook as Experimental_VideoModelV4OperationWebhook, type VideoModelV4Result as Experimental_VideoModelV4Result, type VideoModelV4VideoData as Experimental_VideoModelV4VideoData, type FilesV4, type FilesV4DeleteFileCallOptions, type FilesV4DeleteFileResult, type FilesV4DownloadFileCallOptions, type FilesV4DownloadFileResult, type FilesV4GetFileMetadataCallOptions, type FilesV4GetFileMetadataResult, type FilesV4UploadFileCallOptions, type FilesV4UploadFileResult, type FilesV4UploadFileStreamData, type ImageModelV2, type ImageModelV2CallOptions, type ImageModelV2CallWarning, type ImageModelV2ProviderMetadata, type ImageModelV3, type ImageModelV3CallOptions, type ImageModelV3File, type ImageModelV3Middleware, type ImageModelV3ProviderMetadata, type ImageModelV3Usage, type ImageModelV4, type ImageModelV4CallOptions, type ImageModelV4File, type ImageModelV4Middleware, type ImageModelV4ProviderMetadata, type ImageModelV4Result, type ImageModelV4Usage, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV2, type LanguageModelV2CallOptions, type LanguageModelV2CallWarning, type LanguageModelV2Content, type LanguageModelV2DataContent, type LanguageModelV2File, type LanguageModelV2FilePart, type LanguageModelV2FinishReason, type LanguageModelV2FunctionTool, type LanguageModelV2Message, type LanguageModelV2Middleware, type LanguageModelV2Prompt, type LanguageModelV2ProviderDefinedTool, type LanguageModelV2Reasoning, type LanguageModelV2ReasoningPart, type LanguageModelV2ResponseMetadata, type LanguageModelV2Source, type LanguageModelV2StreamPart, type LanguageModelV2Text, type LanguageModelV2TextPart, type LanguageModelV2ToolCall, type LanguageModelV2ToolCallPart, type LanguageModelV2ToolChoice, type LanguageModelV2ToolResultOutput, type LanguageModelV2ToolResultPart, type LanguageModelV2Usage, type LanguageModelV3, type LanguageModelV3CallOptions, type LanguageModelV3Content, type LanguageModelV3DataContent, type LanguageModelV3File, type LanguageModelV3FilePart, type LanguageModelV3FinishReason, type LanguageModelV3FunctionTool, type LanguageModelV3GenerateResult, type LanguageModelV3Message, type LanguageModelV3Middleware, type LanguageModelV3Prompt, type LanguageModelV3ProviderTool, type LanguageModelV3Reasoning, type LanguageModelV3ReasoningPart, type LanguageModelV3ResponseMetadata, type LanguageModelV3Source, type LanguageModelV3StreamPart, type LanguageModelV3StreamResult, type LanguageModelV3Text, type LanguageModelV3TextPart, type LanguageModelV3ToolApprovalRequest, type LanguageModelV3ToolApprovalResponsePart, type LanguageModelV3ToolCall, type LanguageModelV3ToolCallPart, type LanguageModelV3ToolChoice, type LanguageModelV3ToolResult, type LanguageModelV3ToolResultOutput, type LanguageModelV3ToolResultPart, type LanguageModelV3Usage, type LanguageModelV4, type LanguageModelV4CallOptions, type LanguageModelV4Content, type LanguageModelV4CustomContent, type LanguageModelV4CustomPart, type LanguageModelV4File, type LanguageModelV4FilePart, type LanguageModelV4FinishReason, type LanguageModelV4FunctionTool, type LanguageModelV4GenerateResult, type LanguageModelV4Message, type LanguageModelV4Middleware, type LanguageModelV4Prompt, type LanguageModelV4ProviderTool, type LanguageModelV4Reasoning, type LanguageModelV4ReasoningFile, type LanguageModelV4ReasoningFilePart, type LanguageModelV4ReasoningPart, type LanguageModelV4ResponseMetadata, type LanguageModelV4Source, type LanguageModelV4StreamPart, type LanguageModelV4StreamResult, type LanguageModelV4Text, type LanguageModelV4TextPart, type LanguageModelV4ToolApprovalRequest, type LanguageModelV4ToolApprovalResponsePart, type LanguageModelV4ToolCall, type LanguageModelV4ToolCallPart, type LanguageModelV4ToolChoice, type LanguageModelV4ToolResult, type LanguageModelV4ToolResultOutput, type LanguageModelV4ToolResultPart, type LanguageModelV4Usage, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ProviderV2, type ProviderV3, type ProviderV4, type RerankingModelV3, type RerankingModelV3CallOptions, type RerankingModelV4, type RerankingModelV4CallOptions, type RerankingModelV4Result, type SharedV2Headers, type SharedV2ProviderMetadata, type SharedV2ProviderOptions, type SharedV3Headers, type SharedV3ProviderMetadata, type SharedV3ProviderOptions, type SharedV3Warning, type SharedV4AudioFormat, type SharedV4FileData, type SharedV4FileDataData, type SharedV4FileDataReference, type SharedV4FileDataText, type SharedV4FileDataUrl, type SharedV4Headers, type SharedV4ProviderMetadata, type SharedV4ProviderOptions, type SharedV4ProviderReference, type SharedV4Warning, type SkillsV4, type SkillsV4File, type SkillsV4UploadSkillCallOptions, type SkillsV4UploadSkillResult, type SpeechModelV2, type SpeechModelV2CallOptions, type SpeechModelV2CallWarning, type SpeechModelV3, type SpeechModelV3CallOptions, type SpeechModelV4, type SpeechModelV4CallOptions, type SpeechModelV4Result, TooManyEmbeddingValuesForCallError, type TranscriptionModelV2, type TranscriptionModelV2CallOptions, type TranscriptionModelV2CallWarning, type TranscriptionModelV3, type TranscriptionModelV3CallOptions, type TranscriptionModelV4, type TranscriptionModelV4CallOptions, type TranscriptionModelV4Result, type TypeValidationContext, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue };
8470
+ export { AISDKError, APICallError, type EmbeddingModelV2, type EmbeddingModelV2Embedding, type EmbeddingModelV3, type EmbeddingModelV3CallOptions, type EmbeddingModelV3Embedding, type EmbeddingModelV3Middleware, type EmbeddingModelV3Result, type EmbeddingModelV4, type EmbeddingModelV4CallOptions, type EmbeddingModelV4Embedding, type EmbeddingModelV4Middleware, type EmbeddingModelV4Result, EmptyResponseBodyError, type BatchV4 as Experimental_BatchV4, type BatchV4CancelResult as Experimental_BatchV4CancelResult, type BatchV4Error as Experimental_BatchV4Error, type BatchV4ItemResult as Experimental_BatchV4ItemResult, type BatchV4ListItem as Experimental_BatchV4ListItem, type BatchV4ListOptions as Experimental_BatchV4ListOptions, type BatchV4ListResult as Experimental_BatchV4ListResult, type BatchV4ModelIds as Experimental_BatchV4ModelIds, type BatchV4OperationOptions as Experimental_BatchV4OperationOptions, type BatchV4Request as Experimental_BatchV4Request, type BatchV4RequestBase as Experimental_BatchV4RequestBase, type BatchV4StartOptions as Experimental_BatchV4StartOptions, type BatchV4StartResult as Experimental_BatchV4StartResult, type BatchV4Status as Experimental_BatchV4Status, type EvaluationModelV4 as Experimental_EvaluationModelV4, type EvaluationModelV4Answer as Experimental_EvaluationModelV4Answer, type EvaluationModelV4CallOptions as Experimental_EvaluationModelV4CallOptions, type EvaluationModelV4Input as Experimental_EvaluationModelV4Input, type EvaluationModelV4Question as Experimental_EvaluationModelV4Question, type EvaluationModelV4Result as Experimental_EvaluationModelV4Result, EvaluationUnsupportedQuestionTypeError as Experimental_EvaluationUnsupportedQuestionTypeError, type ImageBatchV4ItemResult as Experimental_ImageBatchV4ItemResult, type ImageBatchV4Request as Experimental_ImageBatchV4Request, type RealtimeFactoryV4 as Experimental_RealtimeFactoryV4, type RealtimeFactoryV4GetTokenOptions as Experimental_RealtimeFactoryV4GetTokenOptions, type RealtimeFactoryV4GetTokenResult as Experimental_RealtimeFactoryV4GetTokenResult, type RealtimeModelV4 as Experimental_RealtimeModelV4, type RealtimeModelV4AudioMessage as Experimental_RealtimeModelV4AudioMessage, type RealtimeModelV4ClientEvent as Experimental_RealtimeModelV4ClientEvent, type RealtimeModelV4ClientSecretOptions as Experimental_RealtimeModelV4ClientSecretOptions, type RealtimeModelV4ClientSecretResult as Experimental_RealtimeModelV4ClientSecretResult, type RealtimeModelV4ConversationItem as Experimental_RealtimeModelV4ConversationItem, type RealtimeModelV4FunctionCallOutput as Experimental_RealtimeModelV4FunctionCallOutput, type RealtimeModelV4ServerEvent as Experimental_RealtimeModelV4ServerEvent, type RealtimeModelV4SessionConfig as Experimental_RealtimeModelV4SessionConfig, type RealtimeModelV4TextMessage as Experimental_RealtimeModelV4TextMessage, type RealtimeModelV4ToolDefinition as Experimental_RealtimeModelV4ToolDefinition, type SpeechTranslationModelV4 as Experimental_SpeechTranslationModelV4, type SpeechTranslationModelV4StreamOptions as Experimental_SpeechTranslationModelV4StreamOptions, type SpeechTranslationModelV4StreamPart as Experimental_SpeechTranslationModelV4StreamPart, type SpeechTranslationModelV4StreamResult as Experimental_SpeechTranslationModelV4StreamResult, type SpeechTranslationModelV4Usage as Experimental_SpeechTranslationModelV4Usage, type TextBatchV4ItemResult as Experimental_TextBatchV4ItemResult, type TextBatchV4Request as Experimental_TextBatchV4Request, type TranscriptionModelV4StreamOptions as Experimental_TranscriptionModelV4StreamOptions, type TranscriptionModelV4StreamPart as Experimental_TranscriptionModelV4StreamPart, type TranscriptionModelV4StreamResult as Experimental_TranscriptionModelV4StreamResult, type VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3FrameImage as Experimental_VideoModelV3FrameImage, type VideoModelV3FrameType as Experimental_VideoModelV3FrameType, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, type VideoModelV4FrameImage as Experimental_VideoModelV4FrameImage, type VideoModelV4FrameType as Experimental_VideoModelV4FrameType, type VideoModelV4OperationStartResult as Experimental_VideoModelV4OperationStartResult, type VideoModelV4OperationStatusResult as Experimental_VideoModelV4OperationStatusResult, type VideoModelV4OperationWebhook as Experimental_VideoModelV4OperationWebhook, type VideoModelV4Result as Experimental_VideoModelV4Result, type VideoModelV4VideoData as Experimental_VideoModelV4VideoData, type FilesV4, type FilesV4DeleteFileCallOptions, type FilesV4DeleteFileResult, type FilesV4DownloadFileCallOptions, type FilesV4DownloadFileResult, type FilesV4GetFileMetadataCallOptions, type FilesV4GetFileMetadataResult, type FilesV4UploadFileCallOptions, type FilesV4UploadFileResult, type FilesV4UploadFileStreamData, type ImageModelV2, type ImageModelV2CallOptions, type ImageModelV2CallWarning, type ImageModelV2ProviderMetadata, type ImageModelV3, type ImageModelV3CallOptions, type ImageModelV3File, type ImageModelV3Middleware, type ImageModelV3ProviderMetadata, type ImageModelV3Usage, type ImageModelV4, type ImageModelV4CallOptions, type ImageModelV4File, type ImageModelV4Middleware, type ImageModelV4ProviderMetadata, type ImageModelV4Result, type ImageModelV4Usage, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV2, type LanguageModelV2CallOptions, type LanguageModelV2CallWarning, type LanguageModelV2Content, type LanguageModelV2DataContent, type LanguageModelV2File, type LanguageModelV2FilePart, type LanguageModelV2FinishReason, type LanguageModelV2FunctionTool, type LanguageModelV2Message, type LanguageModelV2Middleware, type LanguageModelV2Prompt, type LanguageModelV2ProviderDefinedTool, type LanguageModelV2Reasoning, type LanguageModelV2ReasoningPart, type LanguageModelV2ResponseMetadata, type LanguageModelV2Source, type LanguageModelV2StreamPart, type LanguageModelV2Text, type LanguageModelV2TextPart, type LanguageModelV2ToolCall, type LanguageModelV2ToolCallPart, type LanguageModelV2ToolChoice, type LanguageModelV2ToolResultOutput, type LanguageModelV2ToolResultPart, type LanguageModelV2Usage, type LanguageModelV3, type LanguageModelV3CallOptions, type LanguageModelV3Content, type LanguageModelV3DataContent, type LanguageModelV3File, type LanguageModelV3FilePart, type LanguageModelV3FinishReason, type LanguageModelV3FunctionTool, type LanguageModelV3GenerateResult, type LanguageModelV3Message, type LanguageModelV3Middleware, type LanguageModelV3Prompt, type LanguageModelV3ProviderTool, type LanguageModelV3Reasoning, type LanguageModelV3ReasoningPart, type LanguageModelV3ResponseMetadata, type LanguageModelV3Source, type LanguageModelV3StreamPart, type LanguageModelV3StreamResult, type LanguageModelV3Text, type LanguageModelV3TextPart, type LanguageModelV3ToolApprovalRequest, type LanguageModelV3ToolApprovalResponsePart, type LanguageModelV3ToolCall, type LanguageModelV3ToolCallPart, type LanguageModelV3ToolChoice, type LanguageModelV3ToolResult, type LanguageModelV3ToolResultOutput, type LanguageModelV3ToolResultPart, type LanguageModelV3Usage, type LanguageModelV4, type LanguageModelV4CallOptions, type LanguageModelV4Content, type LanguageModelV4CustomContent, type LanguageModelV4CustomPart, type LanguageModelV4File, type LanguageModelV4FilePart, type LanguageModelV4FinishReason, type LanguageModelV4FunctionTool, type LanguageModelV4GenerateResult, type LanguageModelV4Message, type LanguageModelV4Middleware, type LanguageModelV4Prompt, type LanguageModelV4ProviderTool, type LanguageModelV4Reasoning, type LanguageModelV4ReasoningFile, type LanguageModelV4ReasoningFilePart, type LanguageModelV4ReasoningPart, type LanguageModelV4ResponseMetadata, type LanguageModelV4Source, type LanguageModelV4StreamPart, type LanguageModelV4StreamResult, type LanguageModelV4Text, type LanguageModelV4TextPart, type LanguageModelV4ToolApprovalRequest, type LanguageModelV4ToolApprovalResponsePart, type LanguageModelV4ToolCall, type LanguageModelV4ToolCallPart, type LanguageModelV4ToolChoice, type LanguageModelV4ToolResult, type LanguageModelV4ToolResultOutput, type LanguageModelV4ToolResultPart, type LanguageModelV4Usage, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ProviderV2, type ProviderV3, type ProviderV4, type RerankingModelV3, type RerankingModelV3CallOptions, type RerankingModelV4, type RerankingModelV4CallOptions, type RerankingModelV4Result, type SharedV2Headers, type SharedV2ProviderMetadata, type SharedV2ProviderOptions, type SharedV3Headers, type SharedV3ProviderMetadata, type SharedV3ProviderOptions, type SharedV3Warning, type SharedV4AudioFormat, type SharedV4FileData, type SharedV4FileDataData, type SharedV4FileDataReference, type SharedV4FileDataText, type SharedV4FileDataUrl, type SharedV4Headers, type SharedV4ProviderMetadata, type SharedV4ProviderOptions, type SharedV4ProviderReference, type SharedV4Warning, type SkillsV4, type SkillsV4File, type SkillsV4UploadSkillCallOptions, type SkillsV4UploadSkillResult, type SpeechModelV2, type SpeechModelV2CallOptions, type SpeechModelV2CallWarning, type SpeechModelV3, type SpeechModelV3CallOptions, type SpeechModelV4, type SpeechModelV4CallOptions, type SpeechModelV4Result, TooManyEmbeddingValuesForCallError, type TranscriptionModelV2, type TranscriptionModelV2CallOptions, type TranscriptionModelV2CallWarning, type TranscriptionModelV3, type TranscriptionModelV3CallOptions, type TranscriptionModelV4, type TranscriptionModelV4CallOptions, type TranscriptionModelV4Result, type TypeValidationContext, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue };