@mastra/schema-compat 1.3.4-alpha.0 → 1.3.4-alpha.2
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 +16 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +93 -3
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +467 -22
- package/dist/{chunk-LQOEEQF6.cjs → chunk-FJGZKUBH.cjs} +3 -2
- package/dist/chunk-FJGZKUBH.cjs.map +1 -0
- package/dist/{chunk-ECLNT3TQ.js → chunk-QEM5W7OR.js} +3 -3
- package/dist/chunk-QEM5W7OR.js.map +1 -0
- package/dist/{chunk-UZUKSPJ6.js → chunk-VNIPWNNH.js} +7 -2
- package/dist/chunk-VNIPWNNH.js.map +1 -0
- package/dist/{chunk-XVGNFEQ2.cjs → chunk-ZTO66ALH.cjs} +7 -2
- package/dist/chunk-ZTO66ALH.cjs.map +1 -0
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +7 -7
- package/dist/schema.js +1 -1
- package/dist/standard-schema/adapters/zod-v4.d.ts.map +1 -1
- package/dist/standard-schema/standard-schema.d.ts.map +1 -1
- package/dist/zod-to-json.cjs +8 -4
- package/dist/zod-to-json.d.ts +13 -0
- package/dist/zod-to-json.d.ts.map +1 -1
- package/dist/zod-to-json.js +1 -1
- package/package.json +9 -9
- package/dist/chunk-ECLNT3TQ.js.map +0 -1
- package/dist/chunk-LQOEEQF6.cjs.map +0 -1
- package/dist/chunk-UZUKSPJ6.js.map +0 -1
- package/dist/chunk-XVGNFEQ2.cjs.map +0 -1
|
@@ -242,6 +242,8 @@ declare namespace _ai_sdk_provider {
|
|
|
242
242
|
VideoModelV3 as Experimental_VideoModelV3,
|
|
243
243
|
VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions,
|
|
244
244
|
VideoModelV3File as Experimental_VideoModelV3File,
|
|
245
|
+
VideoModelV3FrameImage as Experimental_VideoModelV3FrameImage,
|
|
246
|
+
VideoModelV3FrameType as Experimental_VideoModelV3FrameType,
|
|
245
247
|
VideoModelV3VideoData as Experimental_VideoModelV3VideoData,
|
|
246
248
|
ImageModelV2,
|
|
247
249
|
ImageModelV2CallOptions,
|
|
@@ -380,7 +382,12 @@ declare namespace _ai_sdk_provider_utils {
|
|
|
380
382
|
ReasoningPart,
|
|
381
383
|
Resolvable,
|
|
382
384
|
ResponseHandler,
|
|
385
|
+
RetryDelayProvider,
|
|
386
|
+
RetryErrorFactory,
|
|
387
|
+
RetryErrorReason,
|
|
388
|
+
RetryFunction,
|
|
383
389
|
Schema,
|
|
390
|
+
ShouldRetryFunction,
|
|
384
391
|
SystemModelMessage,
|
|
385
392
|
TextPart,
|
|
386
393
|
Tool,
|
|
@@ -403,6 +410,7 @@ declare namespace _ai_sdk_provider_utils {
|
|
|
403
410
|
VERSION,
|
|
404
411
|
ValidationResult,
|
|
405
412
|
asSchema,
|
|
413
|
+
cancelResponseBody,
|
|
406
414
|
combineHeaders,
|
|
407
415
|
convertAsyncIteratorToReadableStream,
|
|
408
416
|
convertBase64ToUint8Array,
|
|
@@ -424,14 +432,17 @@ declare namespace _ai_sdk_provider_utils {
|
|
|
424
432
|
dynamicTool,
|
|
425
433
|
executeTool,
|
|
426
434
|
extractResponseHeaders,
|
|
435
|
+
fetchWithValidatedRedirects,
|
|
427
436
|
generateId,
|
|
428
437
|
getErrorMessage,
|
|
429
438
|
getFromApi,
|
|
430
439
|
getRuntimeEnvironmentUserAgent,
|
|
431
440
|
injectJsonInstructionIntoMessages,
|
|
432
441
|
isAbortError,
|
|
442
|
+
isBrowserRuntime,
|
|
433
443
|
isNonNullable,
|
|
434
444
|
isParsableJson,
|
|
445
|
+
isSameOrigin,
|
|
435
446
|
isUrlSupported,
|
|
436
447
|
jsonSchema,
|
|
437
448
|
lazySchema,
|
|
@@ -449,8 +460,10 @@ declare namespace _ai_sdk_provider_utils {
|
|
|
449
460
|
readResponseWithSizeLimit,
|
|
450
461
|
removeUndefinedEntries,
|
|
451
462
|
resolve,
|
|
463
|
+
retryWithExponentialBackoff,
|
|
452
464
|
safeParseJSON,
|
|
453
465
|
safeValidateTypes,
|
|
466
|
+
secureJsonParse,
|
|
454
467
|
stripFileExtension,
|
|
455
468
|
tool,
|
|
456
469
|
validateDownloadUrl,
|
|
@@ -697,6 +710,20 @@ export declare type CallSettings = {
|
|
|
697
710
|
*/
|
|
698
711
|
export declare type CallWarning = SharedV3Warning;
|
|
699
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Cancels a response body to release the underlying connection.
|
|
715
|
+
*
|
|
716
|
+
* When a fetch Response is rejected without consuming its body (e.g. a failed
|
|
717
|
+
* status code, an open-redirect rejection, or a Content-Length that exceeds the
|
|
718
|
+
* size limit), the underlying TCP socket is not returned to the connection pool
|
|
719
|
+
* and may stay open until the process runs out of file descriptors. Cancelling
|
|
720
|
+
* the body avoids this leak.
|
|
721
|
+
*
|
|
722
|
+
* Errors thrown while cancelling are ignored: the body may already be locked,
|
|
723
|
+
* disturbed, or absent, none of which should mask the original rejection.
|
|
724
|
+
*/
|
|
725
|
+
declare function cancelResponseBody(response: Response): Promise<void>;
|
|
726
|
+
|
|
700
727
|
/**
|
|
701
728
|
* Function that can be called to add a tool approval response to the chat.
|
|
702
729
|
*/
|
|
@@ -1289,7 +1316,7 @@ export declare type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESS
|
|
|
1289
1316
|
* Creates a UI message stream that can be used to send messages to the client.
|
|
1290
1317
|
*
|
|
1291
1318
|
* @param options.execute - A function that is called with a writer to write UI message chunks to the stream.
|
|
1292
|
-
* @param options.onError - A function that extracts an error message from an error. Defaults to `
|
|
1319
|
+
* @param options.onError - A function that extracts an error message from an error. Defaults to `() => 'An error occurred.'` so server-side error details are not leaked to the client; supply your own to surface richer messages.
|
|
1293
1320
|
* @param options.originalMessages - The original messages. If provided, persistence mode is assumed
|
|
1294
1321
|
* and a message ID is provided for the response message.
|
|
1295
1322
|
* @param options.onStepFinish - A callback that is called when each step finishes. Useful for persisting intermediate messages.
|
|
@@ -1298,7 +1325,8 @@ export declare type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESS
|
|
|
1298
1325
|
*
|
|
1299
1326
|
* @returns A `ReadableStream` of UI message chunks.
|
|
1300
1327
|
*/
|
|
1301
|
-
export declare function createUIMessageStream<UI_MESSAGE extends UIMessage>({ execute, onError,
|
|
1328
|
+
export declare function createUIMessageStream<UI_MESSAGE extends UIMessage>({ execute, onError, // prevent leaking server error details to the client by default
|
|
1329
|
+
originalMessages, onStepFinish, onFinish, generateId, }: {
|
|
1302
1330
|
execute: (options: {
|
|
1303
1331
|
writer: UIMessageStreamWriter<UI_MESSAGE>;
|
|
1304
1332
|
}) => Promise<void> | void;
|
|
@@ -1665,7 +1693,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1665
1693
|
providerExecuted?: boolean;
|
|
1666
1694
|
} & ({
|
|
1667
1695
|
state: 'input-streaming';
|
|
1668
|
-
input
|
|
1696
|
+
input?: unknown;
|
|
1669
1697
|
output?: never;
|
|
1670
1698
|
errorText?: never;
|
|
1671
1699
|
callProviderMetadata?: ProviderMetadata;
|
|
@@ -1687,6 +1715,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1687
1715
|
id: string;
|
|
1688
1716
|
approved?: never;
|
|
1689
1717
|
reason?: never;
|
|
1718
|
+
signature?: string;
|
|
1690
1719
|
};
|
|
1691
1720
|
} | {
|
|
1692
1721
|
state: 'approval-responded';
|
|
@@ -1698,6 +1727,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1698
1727
|
id: string;
|
|
1699
1728
|
approved: boolean;
|
|
1700
1729
|
reason?: string;
|
|
1730
|
+
signature?: string;
|
|
1701
1731
|
};
|
|
1702
1732
|
} | {
|
|
1703
1733
|
state: 'output-available';
|
|
@@ -1711,6 +1741,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1711
1741
|
id: string;
|
|
1712
1742
|
approved: true;
|
|
1713
1743
|
reason?: string;
|
|
1744
|
+
signature?: string;
|
|
1714
1745
|
};
|
|
1715
1746
|
} | {
|
|
1716
1747
|
state: 'output-error';
|
|
@@ -1723,6 +1754,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1723
1754
|
id: string;
|
|
1724
1755
|
approved: true;
|
|
1725
1756
|
reason?: string;
|
|
1757
|
+
signature?: string;
|
|
1726
1758
|
};
|
|
1727
1759
|
} | {
|
|
1728
1760
|
state: 'output-denied';
|
|
@@ -1734,6 +1766,7 @@ export declare type DynamicToolUIPart = {
|
|
|
1734
1766
|
id: string;
|
|
1735
1767
|
approved: false;
|
|
1736
1768
|
reason?: string;
|
|
1769
|
+
signature?: string;
|
|
1737
1770
|
};
|
|
1738
1771
|
});
|
|
1739
1772
|
|
|
@@ -2299,6 +2332,146 @@ EventSourceMessage
|
|
|
2299
2332
|
constructor({ onError, onRetry, onComment }?: StreamOptions);
|
|
2300
2333
|
}
|
|
2301
2334
|
|
|
2335
|
+
declare type ExaSearchCategory = 'company' | 'people' | 'research paper' | 'news' | 'personal site' | 'financial report';
|
|
2336
|
+
|
|
2337
|
+
declare interface ExaSearchConfig {
|
|
2338
|
+
/**
|
|
2339
|
+
* Default search method. Exa defaults to auto when omitted.
|
|
2340
|
+
*/
|
|
2341
|
+
type?: ExaSearchType;
|
|
2342
|
+
/**
|
|
2343
|
+
* Default maximum number of results to return (1-100, default: 10).
|
|
2344
|
+
*/
|
|
2345
|
+
numResults?: number;
|
|
2346
|
+
/**
|
|
2347
|
+
* Default category filter for result types.
|
|
2348
|
+
*/
|
|
2349
|
+
category?: ExaSearchCategory;
|
|
2350
|
+
/**
|
|
2351
|
+
* Default two-letter ISO country code for location-aware search.
|
|
2352
|
+
*/
|
|
2353
|
+
userLocation?: string;
|
|
2354
|
+
/**
|
|
2355
|
+
* Default domains to include or exclude.
|
|
2356
|
+
*/
|
|
2357
|
+
includeDomains?: string[];
|
|
2358
|
+
excludeDomains?: string[];
|
|
2359
|
+
/**
|
|
2360
|
+
* Default published date filters in ISO 8601 format.
|
|
2361
|
+
*/
|
|
2362
|
+
startPublishedDate?: string;
|
|
2363
|
+
endPublishedDate?: string;
|
|
2364
|
+
/**
|
|
2365
|
+
* Default content extraction controls.
|
|
2366
|
+
*/
|
|
2367
|
+
contents?: ExaSearchContentsConfig;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
declare interface ExaSearchContentsConfig {
|
|
2371
|
+
text?: boolean | ExaSearchTextConfig;
|
|
2372
|
+
highlights?: boolean | ExaSearchHighlightsConfig;
|
|
2373
|
+
maxAgeHours?: number;
|
|
2374
|
+
livecrawlTimeout?: number;
|
|
2375
|
+
subpages?: number;
|
|
2376
|
+
subpageTarget?: string | string[];
|
|
2377
|
+
extras?: ExaSearchExtrasConfig;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
declare interface ExaSearchError {
|
|
2381
|
+
error: 'api_error' | 'rate_limit' | 'timeout' | 'invalid_input' | 'configuration_error' | 'execution_error' | 'unknown';
|
|
2382
|
+
statusCode?: number;
|
|
2383
|
+
message: string;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
declare interface ExaSearchExtrasConfig {
|
|
2387
|
+
links?: number;
|
|
2388
|
+
imageLinks?: number;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
declare interface ExaSearchHighlightsConfig {
|
|
2392
|
+
query?: string;
|
|
2393
|
+
maxCharacters?: number;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
declare interface ExaSearchInput {
|
|
2397
|
+
query: string;
|
|
2398
|
+
type?: ExaSearchType;
|
|
2399
|
+
num_results?: number;
|
|
2400
|
+
category?: ExaSearchCategory;
|
|
2401
|
+
user_location?: string;
|
|
2402
|
+
include_domains?: string[];
|
|
2403
|
+
exclude_domains?: string[];
|
|
2404
|
+
start_published_date?: string;
|
|
2405
|
+
end_published_date?: string;
|
|
2406
|
+
contents?: {
|
|
2407
|
+
text?: boolean | {
|
|
2408
|
+
max_characters?: number;
|
|
2409
|
+
include_html_tags?: boolean;
|
|
2410
|
+
verbosity?: 'compact' | 'standard' | 'full';
|
|
2411
|
+
include_sections?: ExaTextSection[];
|
|
2412
|
+
exclude_sections?: ExaTextSection[];
|
|
2413
|
+
};
|
|
2414
|
+
highlights?: boolean | {
|
|
2415
|
+
query?: string;
|
|
2416
|
+
max_characters?: number;
|
|
2417
|
+
};
|
|
2418
|
+
max_age_hours?: number;
|
|
2419
|
+
livecrawl_timeout?: number;
|
|
2420
|
+
subpages?: number;
|
|
2421
|
+
subpage_target?: string | string[];
|
|
2422
|
+
extras?: {
|
|
2423
|
+
links?: number;
|
|
2424
|
+
image_links?: number;
|
|
2425
|
+
};
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
declare type ExaSearchOutput = ExaSearchResponse | ExaSearchError;
|
|
2430
|
+
|
|
2431
|
+
declare interface ExaSearchResponse {
|
|
2432
|
+
requestId: string;
|
|
2433
|
+
searchType?: string;
|
|
2434
|
+
resolvedSearchType?: string;
|
|
2435
|
+
results: ExaSearchResult[];
|
|
2436
|
+
costDollars?: {
|
|
2437
|
+
total?: number;
|
|
2438
|
+
search?: Record<string, number>;
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
declare interface ExaSearchResult {
|
|
2443
|
+
title: string;
|
|
2444
|
+
url: string;
|
|
2445
|
+
id: string;
|
|
2446
|
+
publishedDate?: string | null;
|
|
2447
|
+
author?: string | null;
|
|
2448
|
+
image?: string | null;
|
|
2449
|
+
favicon?: string | null;
|
|
2450
|
+
text?: string;
|
|
2451
|
+
highlights?: string[];
|
|
2452
|
+
highlightScores?: number[];
|
|
2453
|
+
summary?: string;
|
|
2454
|
+
subpages?: ExaSearchResult[];
|
|
2455
|
+
extras?: {
|
|
2456
|
+
links?: string[];
|
|
2457
|
+
imageLinks?: string[];
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
declare interface ExaSearchTextConfig {
|
|
2462
|
+
maxCharacters?: number;
|
|
2463
|
+
includeHtmlTags?: boolean;
|
|
2464
|
+
verbosity?: 'compact' | 'standard' | 'full';
|
|
2465
|
+
includeSections?: ExaTextSection[];
|
|
2466
|
+
excludeSections?: ExaTextSection[];
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
declare const exaSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<ExaSearchInput, ExaSearchOutput, ExaSearchConfig>;
|
|
2470
|
+
|
|
2471
|
+
declare type ExaSearchType = 'auto' | 'fast' | 'instant';
|
|
2472
|
+
|
|
2473
|
+
declare type ExaTextSection = 'header' | 'navigation' | 'banner' | 'body' | 'sidebar' | 'footer' | 'metadata';
|
|
2474
|
+
|
|
2302
2475
|
/**
|
|
2303
2476
|
* Defines Exception.
|
|
2304
2477
|
*
|
|
@@ -2464,7 +2637,7 @@ export declare function experimental_generateSpeech({ model, text, voice, output
|
|
|
2464
2637
|
headers?: Record<string, string>;
|
|
2465
2638
|
}): Promise<Experimental_SpeechResult>;
|
|
2466
2639
|
|
|
2467
|
-
export declare function experimental_generateVideo({ model: modelArg, prompt: promptArg, n, maxVideosPerCall, aspectRatio, resolution, duration, fps, seed, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, download: downloadFn, }: {
|
|
2640
|
+
export declare function experimental_generateVideo({ model: modelArg, prompt: promptArg, n, maxVideosPerCall, aspectRatio, resolution, duration, fps, seed, frameImages, inputReferences, generateAudio, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, download: downloadFn, }: {
|
|
2468
2641
|
/**
|
|
2469
2642
|
* The video model to use.
|
|
2470
2643
|
*/
|
|
@@ -2501,6 +2674,40 @@ export declare function experimental_generateVideo({ model: modelArg, prompt: pr
|
|
|
2501
2674
|
* Seed for the video generation.
|
|
2502
2675
|
*/
|
|
2503
2676
|
seed?: number;
|
|
2677
|
+
/**
|
|
2678
|
+
* Role-tagged image inputs for image-to-video and first-last-frame generation.
|
|
2679
|
+
*/
|
|
2680
|
+
frameImages?: Array<{
|
|
2681
|
+
/**
|
|
2682
|
+
* The image for this frame.
|
|
2683
|
+
*/
|
|
2684
|
+
image: DataContent;
|
|
2685
|
+
/**
|
|
2686
|
+
* Which frame this image represents.
|
|
2687
|
+
*/
|
|
2688
|
+
frameType: VideoModelV3FrameType;
|
|
2689
|
+
}>;
|
|
2690
|
+
/**
|
|
2691
|
+
* Reference inputs for reference-to-video generation.
|
|
2692
|
+
*
|
|
2693
|
+
* Each entry may be a plain image/video ({@link DataContent}), or an object
|
|
2694
|
+
* form that carries an explicit `mediaType`.
|
|
2695
|
+
*/
|
|
2696
|
+
inputReferences?: Array<DataContent | {
|
|
2697
|
+
/**
|
|
2698
|
+
* The reference image or video.
|
|
2699
|
+
*/
|
|
2700
|
+
data: DataContent;
|
|
2701
|
+
/**
|
|
2702
|
+
* The media type of the reference (e.g. 'image/png',
|
|
2703
|
+
* 'video/mp4').
|
|
2704
|
+
*/
|
|
2705
|
+
mediaType?: string;
|
|
2706
|
+
}>;
|
|
2707
|
+
/**
|
|
2708
|
+
* Whether the model should generate audio alongside the video.
|
|
2709
|
+
*/
|
|
2710
|
+
generateAudio?: boolean;
|
|
2504
2711
|
/**
|
|
2505
2712
|
* Additional provider-specific options that are passed through to the provider
|
|
2506
2713
|
* as body parameters.
|
|
@@ -2717,6 +2924,36 @@ declare function extractResponseHeaders(response: Response): {
|
|
|
2717
2924
|
*/
|
|
2718
2925
|
declare type FetchFunction = typeof globalThis.fetch;
|
|
2719
2926
|
|
|
2927
|
+
/**
|
|
2928
|
+
* Fetches a URL while enforcing the SSRF download guard on every hop.
|
|
2929
|
+
*
|
|
2930
|
+
* Redirects are followed manually (`redirect: 'manual'`) so each hop is
|
|
2931
|
+
* validated with {@link validateDownloadUrl} *before* it is requested. Relying
|
|
2932
|
+
* on the default `redirect: 'follow'` would issue the request to a redirect
|
|
2933
|
+
* target (e.g. an internal address) before we ever see its URL, defeating the
|
|
2934
|
+
* SSRF guard.
|
|
2935
|
+
*
|
|
2936
|
+
* A `redirect: 'manual'` request yields an unreadable opaque response in the
|
|
2937
|
+
* browser (and in other spec-compliant fetch implementations), so the redirect
|
|
2938
|
+
* target cannot be validated here. In a real browser this is safe to follow
|
|
2939
|
+
* natively because SSRF is not reachable (fetch is constrained by CORS and
|
|
2940
|
+
* cannot reach a server's internal network or cloud-metadata). On any other
|
|
2941
|
+
* runtime we cannot validate the hop, so we fail closed rather than follow it
|
|
2942
|
+
* blindly and bypass the SSRF guard.
|
|
2943
|
+
*
|
|
2944
|
+
* The returned response is the final (non-redirect) response. The caller is
|
|
2945
|
+
* responsible for checking `response.ok` and reading the body.
|
|
2946
|
+
*
|
|
2947
|
+
* @throws DownloadError if a hop is unsafe, the redirect limit is exceeded, or
|
|
2948
|
+
* a redirect cannot be validated on a non-browser runtime.
|
|
2949
|
+
*/
|
|
2950
|
+
declare function fetchWithValidatedRedirects({ url, headers, abortSignal, maxRedirects, }: {
|
|
2951
|
+
url: string;
|
|
2952
|
+
headers?: HeadersInit;
|
|
2953
|
+
abortSignal?: AbortSignal;
|
|
2954
|
+
maxRedirects?: number;
|
|
2955
|
+
}): Promise<Response>;
|
|
2956
|
+
|
|
2720
2957
|
/**
|
|
2721
2958
|
* File content part of a prompt. It contains a file.
|
|
2722
2959
|
*/
|
|
@@ -2847,7 +3084,7 @@ declare interface GatewayGenerationInfoParams {
|
|
|
2847
3084
|
id: string;
|
|
2848
3085
|
}
|
|
2849
3086
|
|
|
2850
|
-
declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'google/imagen-4.0-fast-generate-001' | 'google/imagen-4.0-generate-001' | 'google/imagen-4.0-ultra-generate-001' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | '
|
|
3087
|
+
declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'google/imagen-4.0-fast-generate-001' | 'google/imagen-4.0-generate-001' | 'google/imagen-4.0-ultra-generate-001' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'prodia/flux-fast-schnell' | 'quiverai/arrow-1.1' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'xai/grok-imagine-image' | (string & {});
|
|
2851
3088
|
|
|
2852
3089
|
declare interface GatewayLanguageModelEntry {
|
|
2853
3090
|
/**
|
|
@@ -2898,7 +3135,7 @@ declare interface GatewayLanguageModelEntry {
|
|
|
2898
3135
|
|
|
2899
3136
|
declare type GatewayLanguageModelSpecification = Pick<LanguageModelV3, 'specificationVersion' | 'provider' | 'modelId'>;
|
|
2900
3137
|
|
|
2901
|
-
export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen-3.6-max-preview' | 'alibaba/qwen3-235b-a22b-thinking' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-coder-plus' | 'alibaba/qwen3-max' | 'alibaba/qwen3-max-preview' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-235b-a22b-instruct' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3-vl-thinking' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-3.5-haiku' | 'anthropic/claude-
|
|
3138
|
+
export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen-3.6-max-preview' | 'alibaba/qwen3-235b-a22b-thinking' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-coder-plus' | 'alibaba/qwen3-max' | 'alibaba/qwen3-max-preview' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-235b-a22b-instruct' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3-vl-thinking' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-haiku' | 'anthropic/claude-3.5-haiku' | 'anthropic/claude-fable-5' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.1' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | 'arcee-ai/trinity-large-preview' | 'arcee-ai/trinity-large-thinking' | 'arcee-ai/trinity-mini' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.1-terminus' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-pro' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-pro' | 'google/gemini-3-flash' | 'google/gemini-3-pro-image' | 'google/gemini-3-pro-preview' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-flash-lite-preview' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'meituan/longcat-flash-chat' | 'meituan/longcat-flash-thinking-2601' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.2-11b' | 'meta/llama-3.2-1b' | 'meta/llama-3.2-3b' | 'meta/llama-3.2-90b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-spark-1.1' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'mistral/codestral' | 'mistral/devstral-2' | 'mistral/devstral-small' | 'mistral/devstral-small-2' | 'mistral/magistral-medium' | 'mistral/magistral-small' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-medium' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mistral/pixtral-12b' | 'mistral/pixtral-large' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2-thinking' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-3.5-turbo-instruct' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-search-preview' | 'openai/gpt-5' | 'openai/gpt-5-chat' | 'openai/gpt-5-codex' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-instant' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.2' | 'openai/gpt-5.2-chat' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-chat' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.4' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-terra' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-deep-research' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'perplexity/sonar' | 'perplexity/sonar-pro' | 'perplexity/sonar-reasoning-pro' | 'sakana/fugu-ultra' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'xai/grok-4.1-fast-non-reasoning' | 'xai/grok-4.1-fast-reasoning' | 'xai/grok-4.20-multi-agent' | 'xai/grok-4.20-multi-agent-beta' | 'xai/grok-4.20-non-reasoning' | 'xai/grok-4.20-non-reasoning-beta' | 'xai/grok-4.20-reasoning' | 'xai/grok-4.20-reasoning-beta' | 'xai/grok-4.3' | 'xai/grok-4.5' | 'xai/grok-build-0.1' | 'xiaomi/mimo-v2-flash' | 'xiaomi/mimo-v2-pro' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.6v' | 'zai/glm-4.6v-flash' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5v-turbo' | (string & {});
|
|
2902
3139
|
|
|
2903
3140
|
declare interface GatewayProvider extends ProviderV3 {
|
|
2904
3141
|
(modelId: GatewayModelId): LanguageModelV3;
|
|
@@ -2964,6 +3201,22 @@ declare interface GatewayProvider extends ProviderV3 {
|
|
|
2964
3201
|
* Creates a model for reranking documents.
|
|
2965
3202
|
*/
|
|
2966
3203
|
rerankingModel(modelId: GatewayRerankingModelId): RerankingModelV3;
|
|
3204
|
+
/**
|
|
3205
|
+
* Creates a model for text-to-speech generation.
|
|
3206
|
+
*/
|
|
3207
|
+
speech(modelId: GatewaySpeechModelId): SpeechModelV3;
|
|
3208
|
+
/**
|
|
3209
|
+
* Creates a model for text-to-speech generation.
|
|
3210
|
+
*/
|
|
3211
|
+
speechModel(modelId: GatewaySpeechModelId): SpeechModelV3;
|
|
3212
|
+
/**
|
|
3213
|
+
* Creates a model for audio transcription.
|
|
3214
|
+
*/
|
|
3215
|
+
transcription(modelId: GatewayTranscriptionModelId): TranscriptionModelV3;
|
|
3216
|
+
/**
|
|
3217
|
+
* Creates a model for audio transcription.
|
|
3218
|
+
*/
|
|
3219
|
+
transcriptionModel(modelId: GatewayTranscriptionModelId): TranscriptionModelV3;
|
|
2967
3220
|
/**
|
|
2968
3221
|
* Gateway-specific tools executed server-side.
|
|
2969
3222
|
*/
|
|
@@ -2996,6 +3249,8 @@ declare interface GatewayProviderSettings {
|
|
|
2996
3249
|
|
|
2997
3250
|
declare type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | (string & {});
|
|
2998
3251
|
|
|
3252
|
+
declare type GatewaySpeechModelId = 'openai/tts-1' | 'openai/tts-1-hd' | 'xai/grok-tts' | (string & {});
|
|
3253
|
+
|
|
2999
3254
|
declare interface GatewaySpendReportParams {
|
|
3000
3255
|
/** Start date in YYYY-MM-DD format (inclusive) */
|
|
3001
3256
|
startDate: string;
|
|
@@ -3058,6 +3313,14 @@ declare interface GatewaySpendReportRow {
|
|
|
3058
3313
|
* Gateway-specific provider-defined tools.
|
|
3059
3314
|
*/
|
|
3060
3315
|
declare const gatewayTools: {
|
|
3316
|
+
/**
|
|
3317
|
+
* Search the web using Exa for current information and token-efficient
|
|
3318
|
+
* excerpts optimized for agent workflows.
|
|
3319
|
+
*
|
|
3320
|
+
* Supports search type, category, domain, date, location, and content
|
|
3321
|
+
* extraction controls.
|
|
3322
|
+
*/
|
|
3323
|
+
exaSearch: (config?: ExaSearchConfig) => ReturnType<typeof exaSearchToolFactory>;
|
|
3061
3324
|
/**
|
|
3062
3325
|
* Search the web using Parallel AI's Search API for LLM-optimized excerpts.
|
|
3063
3326
|
*
|
|
@@ -3077,7 +3340,9 @@ declare const gatewayTools: {
|
|
|
3077
3340
|
perplexitySearch: (config?: PerplexitySearchConfig) => ReturnType<typeof perplexitySearchToolFactory>;
|
|
3078
3341
|
};
|
|
3079
3342
|
|
|
3080
|
-
declare type
|
|
3343
|
+
declare type GatewayTranscriptionModelId = 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/whisper-1' | 'xai/grok-stt' | (string & {});
|
|
3344
|
+
|
|
3345
|
+
declare type GatewayVideoModelId = 'alibaba/wan-v2.5-t2v-preview' | 'alibaba/wan-v2.6-i2v' | 'alibaba/wan-v2.6-i2v-flash' | 'alibaba/wan-v2.6-r2v' | 'alibaba/wan-v2.6-r2v-flash' | 'alibaba/wan-v2.6-t2v' | 'alibaba/wan-v2.7-r2v' | 'alibaba/wan-v2.7-t2v' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'bytedance/seedance-v1.5-pro' | 'google/veo-3.0-fast-generate-001' | 'google/veo-3.0-generate-001' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | 'klingai/kling-v2.5-turbo-i2v' | 'klingai/kling-v2.5-turbo-t2v' | 'klingai/kling-v2.6-i2v' | 'klingai/kling-v2.6-motion-control' | 'klingai/kling-v2.6-t2v' | 'klingai/kling-v3.0-i2v' | 'klingai/kling-v3.0-motion-control' | 'klingai/kling-v3.0-t2v' | 'xai/grok-imagine-video' | 'xai/grok-imagine-video-1.5' | 'xai/grok-imagine-video-1.5-preview' | (string & {});
|
|
3081
3346
|
|
|
3082
3347
|
/**
|
|
3083
3348
|
* A generated audio file.
|
|
@@ -3465,7 +3730,7 @@ export declare interface GenerateObjectResult<OBJECT> {
|
|
|
3465
3730
|
* @returns
|
|
3466
3731
|
* A result object that contains the generated text, the results of the tool calls, and additional information.
|
|
3467
3732
|
*/
|
|
3468
|
-
export declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output_2 = Output_2<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, allowSystemInMessages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, experimental_include: include, _internal: { generateId }, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
|
|
3733
|
+
export declare function generateText<TOOLS extends ToolSet, OUTPUT extends Output_2 = Output_2<string, string>>({ model: modelArg, tools, toolChoice, system, prompt, messages, allowSystemInMessages, maxRetries: maxRetriesArg, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, providerOptions, experimental_activeTools, activeTools, experimental_prepareStep, prepareStep, experimental_repairToolCall: repairToolCall, experimental_download: download, experimental_context, experimental_toolApprovalSecret, experimental_include: include, _internal: { generateId }, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, onStepFinish, onFinish, ...settings }: CallSettings & Prompt & {
|
|
3469
3734
|
/**
|
|
3470
3735
|
* The language model to use.
|
|
3471
3736
|
*/
|
|
@@ -3566,6 +3831,14 @@ export declare function generateText<TOOLS extends ToolSet, OUTPUT extends Outpu
|
|
|
3566
3831
|
* @default undefined
|
|
3567
3832
|
*/
|
|
3568
3833
|
experimental_context?: unknown;
|
|
3834
|
+
/**
|
|
3835
|
+
* Secret for HMAC-signing tool approval requests. When set, the server
|
|
3836
|
+
* signs each approval request at issuance and verifies the signature when
|
|
3837
|
+
* the approval is replayed, preventing client-forged approvals.
|
|
3838
|
+
*
|
|
3839
|
+
* Experimental (can break in patch releases).
|
|
3840
|
+
*/
|
|
3841
|
+
experimental_toolApprovalSecret?: string | Uint8Array;
|
|
3569
3842
|
/**
|
|
3570
3843
|
* Settings for controlling what data is included in step results.
|
|
3571
3844
|
* Disabling inclusion can help reduce memory usage when processing
|
|
@@ -4537,7 +4810,7 @@ declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPre
|
|
|
4537
4810
|
}): LanguageModelV3Prompt;
|
|
4538
4811
|
|
|
4539
4812
|
export declare class InvalidArgumentError extends AISDKError {
|
|
4540
|
-
private readonly [symbol$
|
|
4813
|
+
private readonly [symbol$i];
|
|
4541
4814
|
readonly parameter: string;
|
|
4542
4815
|
readonly value: unknown;
|
|
4543
4816
|
constructor({ parameter, value, message, }: {
|
|
@@ -4613,7 +4886,7 @@ export declare class InvalidResponseDataError extends AISDKError {
|
|
|
4613
4886
|
}
|
|
4614
4887
|
|
|
4615
4888
|
export declare class InvalidStreamPartError extends AISDKError {
|
|
4616
|
-
private readonly [symbol$
|
|
4889
|
+
private readonly [symbol$h];
|
|
4617
4890
|
readonly chunk: SingleRequestTextStreamPart<any>;
|
|
4618
4891
|
constructor({ chunk, message, }: {
|
|
4619
4892
|
chunk: SingleRequestTextStreamPart<any>;
|
|
@@ -4623,7 +4896,7 @@ export declare class InvalidStreamPartError extends AISDKError {
|
|
|
4623
4896
|
}
|
|
4624
4897
|
|
|
4625
4898
|
export declare class InvalidToolApprovalError extends AISDKError {
|
|
4626
|
-
private readonly [symbol$
|
|
4899
|
+
private readonly [symbol$g];
|
|
4627
4900
|
readonly approvalId: string;
|
|
4628
4901
|
constructor({ approvalId }: {
|
|
4629
4902
|
approvalId: string;
|
|
@@ -4631,8 +4904,20 @@ export declare class InvalidToolApprovalError extends AISDKError {
|
|
|
4631
4904
|
static isInstance(error: unknown): error is InvalidToolApprovalError;
|
|
4632
4905
|
}
|
|
4633
4906
|
|
|
4907
|
+
export declare class InvalidToolApprovalSignatureError extends AISDKError {
|
|
4908
|
+
private readonly [symbol$f];
|
|
4909
|
+
readonly approvalId: string;
|
|
4910
|
+
readonly toolCallId: string;
|
|
4911
|
+
constructor({ approvalId, toolCallId, reason, }: {
|
|
4912
|
+
approvalId: string;
|
|
4913
|
+
toolCallId: string;
|
|
4914
|
+
reason: string;
|
|
4915
|
+
});
|
|
4916
|
+
static isInstance(error: unknown): error is InvalidToolApprovalSignatureError;
|
|
4917
|
+
}
|
|
4918
|
+
|
|
4634
4919
|
export declare class InvalidToolInputError extends AISDKError {
|
|
4635
|
-
private readonly [symbol$
|
|
4920
|
+
private readonly [symbol$k];
|
|
4636
4921
|
readonly toolName: string;
|
|
4637
4922
|
readonly toolInput: string;
|
|
4638
4923
|
constructor({ toolInput, toolName, cause, message, }: {
|
|
@@ -4646,6 +4931,16 @@ export declare class InvalidToolInputError extends AISDKError {
|
|
|
4646
4931
|
|
|
4647
4932
|
declare function isAbortError(error: unknown): error is Error;
|
|
4648
4933
|
|
|
4934
|
+
/**
|
|
4935
|
+
* Returns `true` when running in a browser.
|
|
4936
|
+
*
|
|
4937
|
+
* Detection keys on the presence of a global `window`, matching the browser
|
|
4938
|
+
* check used elsewhere in this package (see `getRuntimeEnvironmentUserAgent`)
|
|
4939
|
+
* so the SDK has a single, consistent definition of "browser". Server runtimes
|
|
4940
|
+
* (Node.js, Deno, Bun, edge/workers) do not define `window`.
|
|
4941
|
+
*/
|
|
4942
|
+
declare function isBrowserRuntime(globalThisAny?: any): boolean;
|
|
4943
|
+
|
|
4649
4944
|
/**
|
|
4650
4945
|
* Check if a message part is a data part.
|
|
4651
4946
|
*/
|
|
@@ -4660,6 +4955,13 @@ export declare function isDataUIPart<DATA_TYPES extends UIDataTypes>(part: UIMes
|
|
|
4660
4955
|
*/
|
|
4661
4956
|
export declare function isDeepEqualData(obj1: any, obj2: any): boolean;
|
|
4662
4957
|
|
|
4958
|
+
/**
|
|
4959
|
+
* Check if a message part is a dynamic tool part.
|
|
4960
|
+
*
|
|
4961
|
+
* Dynamic tools are tools for which the input and output types are unknown.
|
|
4962
|
+
*/
|
|
4963
|
+
export declare function isDynamicToolUIPart(part: UIMessagePart<UIDataTypes, UITools>): part is DynamicToolUIPart;
|
|
4964
|
+
|
|
4663
4965
|
/**
|
|
4664
4966
|
* Type guard to check if a message part is a file part.
|
|
4665
4967
|
*/
|
|
@@ -4689,6 +4991,20 @@ declare function isParsableJson(input: string): boolean;
|
|
|
4689
4991
|
*/
|
|
4690
4992
|
export declare function isReasoningUIPart(part: UIMessagePart<UIDataTypes, UITools>): part is ReasoningUIPart;
|
|
4691
4993
|
|
|
4994
|
+
/**
|
|
4995
|
+
* Returns true when `url` has the same origin (scheme + host + port) as
|
|
4996
|
+
* `baseUrl`.
|
|
4997
|
+
*
|
|
4998
|
+
* Used to decide whether provider credentials may be attached to a request to a
|
|
4999
|
+
* URL taken from a provider response (e.g. a polling or media-download URL).
|
|
5000
|
+
* Credentials must only be sent to the provider's own origin; a response that
|
|
5001
|
+
* names a foreign host (a CDN, or an attacker-controlled host if the response
|
|
5002
|
+
* is tampered with) must not receive the API key.
|
|
5003
|
+
*
|
|
5004
|
+
* Returns false if either value is not a valid absolute URL (fail-closed).
|
|
5005
|
+
*/
|
|
5006
|
+
declare function isSameOrigin(url: string, baseUrl: string): boolean;
|
|
5007
|
+
|
|
4692
5008
|
/**
|
|
4693
5009
|
* Check if a message part is a static tool part.
|
|
4694
5010
|
*
|
|
@@ -4779,7 +5095,7 @@ export declare type JSONValue = JSONValue_2;
|
|
|
4779
5095
|
*/
|
|
4780
5096
|
declare type JSONValue_2 = null | string | number | boolean | JSONObject | JSONArray;
|
|
4781
5097
|
|
|
4782
|
-
declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "reranking", "video"];
|
|
5098
|
+
declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "reranking", "speech", "transcription", "video"];
|
|
4783
5099
|
|
|
4784
5100
|
declare type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
|
|
4785
5101
|
|
|
@@ -7132,7 +7448,7 @@ export declare class NoSuchProviderError extends NoSuchModelError {
|
|
|
7132
7448
|
}
|
|
7133
7449
|
|
|
7134
7450
|
export declare class NoSuchToolError extends AISDKError {
|
|
7135
|
-
private readonly [symbol$
|
|
7451
|
+
private readonly [symbol$j];
|
|
7136
7452
|
readonly toolName: string;
|
|
7137
7453
|
readonly availableTools: string[] | undefined;
|
|
7138
7454
|
constructor({ toolName, availableTools, message, }: {
|
|
@@ -8710,20 +9026,48 @@ declare type ResponseHandler<RETURN_TYPE> = (options: {
|
|
|
8710
9026
|
*/
|
|
8711
9027
|
declare type ResponseMessage = AssistantModelMessage | ToolModelMessage;
|
|
8712
9028
|
|
|
9029
|
+
declare type RetryDelayProvider = ({ error, exponentialBackoffDelay, }: {
|
|
9030
|
+
error: unknown;
|
|
9031
|
+
exponentialBackoffDelay: number;
|
|
9032
|
+
}) => number;
|
|
9033
|
+
|
|
8713
9034
|
export declare class RetryError extends AISDKError {
|
|
8714
9035
|
private readonly [symbol$1_2];
|
|
8715
|
-
readonly reason:
|
|
9036
|
+
readonly reason: RetryErrorReason_2;
|
|
8716
9037
|
readonly lastError: unknown;
|
|
8717
9038
|
readonly errors: Array<unknown>;
|
|
8718
9039
|
constructor({ message, reason, errors, }: {
|
|
8719
9040
|
message: string;
|
|
8720
|
-
reason:
|
|
9041
|
+
reason: RetryErrorReason_2;
|
|
8721
9042
|
errors: Array<unknown>;
|
|
8722
9043
|
});
|
|
8723
9044
|
static isInstance(error: unknown): error is RetryError;
|
|
8724
9045
|
}
|
|
8725
9046
|
|
|
8726
|
-
declare type
|
|
9047
|
+
declare type RetryErrorFactory = ({ message, reason, errors, }: {
|
|
9048
|
+
message: string;
|
|
9049
|
+
reason: RetryErrorReason;
|
|
9050
|
+
errors: Array<unknown>;
|
|
9051
|
+
}) => unknown;
|
|
9052
|
+
|
|
9053
|
+
declare type RetryErrorReason = 'maxRetriesExceeded' | 'errorNotRetryable';
|
|
9054
|
+
|
|
9055
|
+
declare type RetryErrorReason_2 = 'maxRetriesExceeded' | 'errorNotRetryable' | 'abort';
|
|
9056
|
+
|
|
9057
|
+
declare type RetryFunction = <OUTPUT>(fn: () => PromiseLike<OUTPUT>) => PromiseLike<OUTPUT>;
|
|
9058
|
+
|
|
9059
|
+
/**
|
|
9060
|
+
* Retries a failed operation with exponential backoff.
|
|
9061
|
+
*/
|
|
9062
|
+
declare const retryWithExponentialBackoff: ({ maxRetries, initialDelayInMs, backoffFactor, abortSignal, shouldRetry, getDelayInMs, createRetryError, }: {
|
|
9063
|
+
maxRetries?: number;
|
|
9064
|
+
initialDelayInMs?: number;
|
|
9065
|
+
backoffFactor?: number;
|
|
9066
|
+
abortSignal?: AbortSignal;
|
|
9067
|
+
shouldRetry: ShouldRetryFunction;
|
|
9068
|
+
getDelayInMs?: RetryDelayProvider;
|
|
9069
|
+
createRetryError?: RetryErrorFactory;
|
|
9070
|
+
}) => RetryFunction;
|
|
8727
9071
|
|
|
8728
9072
|
/**
|
|
8729
9073
|
* Safely parses a JSON string and returns the result as an object of type `unknown`.
|
|
@@ -8822,6 +9166,8 @@ export declare type Schema<OBJECT = unknown> = {
|
|
|
8822
9166
|
*/
|
|
8823
9167
|
declare const schemaSymbol: unique symbol;
|
|
8824
9168
|
|
|
9169
|
+
declare function secureJsonParse(text: string): any;
|
|
9170
|
+
|
|
8825
9171
|
export declare class SerialJobExecutor {
|
|
8826
9172
|
private queue;
|
|
8827
9173
|
private isProcessing;
|
|
@@ -8968,6 +9314,8 @@ declare type SharedV3Warning = {
|
|
|
8968
9314
|
message: string;
|
|
8969
9315
|
};
|
|
8970
9316
|
|
|
9317
|
+
declare type ShouldRetryFunction = (error: unknown) => boolean | Promise<boolean>;
|
|
9318
|
+
|
|
8971
9319
|
/**
|
|
8972
9320
|
* Creates a ReadableStream that emits the provided values with an optional delay between each value.
|
|
8973
9321
|
*
|
|
@@ -10328,7 +10676,7 @@ declare interface StreamOptions {
|
|
|
10328
10676
|
* @returns
|
|
10329
10677
|
* A result object for accessing different stream types and additional information.
|
|
10330
10678
|
*/
|
|
10331
|
-
export declare function streamText<TOOLS extends ToolSet, OUTPUT extends Output_2 = Output_2<string, string, never>>({ model, tools, toolChoice, system, prompt, messages, allowSystemInMessages, maxRetries, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, prepareStep, providerOptions, experimental_activeTools, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, experimental_context, experimental_include: include, _internal: { now, generateId }, ...settings }: CallSettings & Prompt & {
|
|
10679
|
+
export declare function streamText<TOOLS extends ToolSet, OUTPUT extends Output_2 = Output_2<string, string, never>>({ model, tools, toolChoice, system, prompt, messages, allowSystemInMessages, maxRetries, abortSignal, timeout, headers, stopWhen, experimental_output, output, experimental_telemetry: telemetry, prepareStep, providerOptions, experimental_activeTools, activeTools, experimental_repairToolCall: repairToolCall, experimental_transform: transform, experimental_download: download, includeRawChunks, onChunk, onError, onFinish, onAbort, onStepFinish, experimental_onStart: onStart, experimental_onStepStart: onStepStart, experimental_onToolCallStart: onToolCallStart, experimental_onToolCallFinish: onToolCallFinish, experimental_context, experimental_toolApprovalSecret, experimental_include: include, _internal: { now, generateId }, ...settings }: CallSettings & Prompt & {
|
|
10332
10680
|
/**
|
|
10333
10681
|
* The language model to use.
|
|
10334
10682
|
*/
|
|
@@ -10461,6 +10809,14 @@ export declare function streamText<TOOLS extends ToolSet, OUTPUT extends Output_
|
|
|
10461
10809
|
* @default undefined
|
|
10462
10810
|
*/
|
|
10463
10811
|
experimental_context?: unknown;
|
|
10812
|
+
/**
|
|
10813
|
+
* Secret for HMAC-signing tool approval requests. When set, the server
|
|
10814
|
+
* signs each approval request at issuance and verifies the signature when
|
|
10815
|
+
* the approval is replayed, preventing client-forged approvals.
|
|
10816
|
+
*
|
|
10817
|
+
* Experimental (can break in patch releases).
|
|
10818
|
+
*/
|
|
10819
|
+
experimental_toolApprovalSecret?: string | Uint8Array;
|
|
10464
10820
|
/**
|
|
10465
10821
|
* Settings for controlling what data is included in step results.
|
|
10466
10822
|
* Disabling inclusion can help reduce memory usage when processing
|
|
@@ -10867,6 +11223,8 @@ declare const symbol$i: unique symbol;
|
|
|
10867
11223
|
|
|
10868
11224
|
declare const symbol$j: unique symbol;
|
|
10869
11225
|
|
|
11226
|
+
declare const symbol$k: unique symbol;
|
|
11227
|
+
|
|
10870
11228
|
declare const symbol: unique symbol;
|
|
10871
11229
|
|
|
10872
11230
|
declare const symbol_2: unique symbol;
|
|
@@ -11183,6 +11541,8 @@ export declare type Tool<INPUT extends JSONValue_2 | unknown | never = any, OUTP
|
|
|
11183
11541
|
* Optional conversion function that maps the tool result to an output that can be used by the language model.
|
|
11184
11542
|
*
|
|
11185
11543
|
* If not provided, the tool result will be sent as a JSON object.
|
|
11544
|
+
*
|
|
11545
|
+
* This function is invoked on the server by `convertToModelMessages`, so ensure that you pass the same "tools" (ToolSet) to both "convertToModelMessages" and "streamText" (or other generation APIs).
|
|
11186
11546
|
*/
|
|
11187
11547
|
toModelOutput?: (options: {
|
|
11188
11548
|
/**
|
|
@@ -11262,6 +11622,11 @@ export declare type ToolApprovalRequest = {
|
|
|
11262
11622
|
* ID of the tool call that the approval request is for.
|
|
11263
11623
|
*/
|
|
11264
11624
|
toolCallId: string;
|
|
11625
|
+
/**
|
|
11626
|
+
* HMAC-SHA256 signature binding this approval to its tool call.
|
|
11627
|
+
* Present only when `experimental_toolApprovalSecret` is configured.
|
|
11628
|
+
*/
|
|
11629
|
+
signature?: string;
|
|
11265
11630
|
};
|
|
11266
11631
|
|
|
11267
11632
|
/**
|
|
@@ -11279,6 +11644,10 @@ export declare type ToolApprovalRequestOutput<TOOLS extends ToolSet> = {
|
|
|
11279
11644
|
* Tool call that the approval request is for.
|
|
11280
11645
|
*/
|
|
11281
11646
|
toolCall: TypedToolCall<TOOLS>;
|
|
11647
|
+
/**
|
|
11648
|
+
* HMAC-SHA256 signature binding this approval request to its tool call.
|
|
11649
|
+
*/
|
|
11650
|
+
signature?: string;
|
|
11282
11651
|
};
|
|
11283
11652
|
|
|
11284
11653
|
/**
|
|
@@ -11520,6 +11889,15 @@ declare type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet =
|
|
|
11520
11889
|
* It can be a string, or, if you need to pass additional provider options (e.g. for caching), a `SystemModelMessage`.
|
|
11521
11890
|
*/
|
|
11522
11891
|
instructions?: string | SystemModelMessage | Array<SystemModelMessage>;
|
|
11892
|
+
/**
|
|
11893
|
+
* Whether system messages are allowed in the `prompt` or `messages` fields.
|
|
11894
|
+
*
|
|
11895
|
+
* When disabled, system messages must be provided through the `instructions`
|
|
11896
|
+
* option.
|
|
11897
|
+
*
|
|
11898
|
+
* @default false
|
|
11899
|
+
*/
|
|
11900
|
+
allowSystemInMessages?: boolean;
|
|
11523
11901
|
/**
|
|
11524
11902
|
* The language model to use.
|
|
11525
11903
|
*/
|
|
@@ -11596,8 +11974,18 @@ declare type ToolLoopAgentSettings<CALL_OPTIONS = never, TOOLS extends ToolSet =
|
|
|
11596
11974
|
* Prepare the parameters for the generateText or streamText call.
|
|
11597
11975
|
*
|
|
11598
11976
|
* You can use this to have templates based on call options.
|
|
11977
|
+
*
|
|
11978
|
+
* The design requires you to pass call parameters as follows to
|
|
11979
|
+
* allow for the removal of parameters from the original settings
|
|
11980
|
+
* by setting them to `undefined`:
|
|
11981
|
+
*
|
|
11982
|
+
* ```
|
|
11983
|
+
* prepareCall: ({ options, ...rest }) => ({
|
|
11984
|
+
* ...rest,
|
|
11985
|
+
* }),
|
|
11986
|
+
* ```
|
|
11599
11987
|
*/
|
|
11600
|
-
prepareCall?: (options: Omit<AgentCallParameters<CALL_OPTIONS, NoInfer<TOOLS>>, 'onStepFinish'> & Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, OUTPUT>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'providerOptions' | 'experimental_context' | 'experimental_download'>) => MaybePromiseLike<Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, OUTPUT>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'providerOptions' | 'experimental_context' | 'experimental_download'> & Omit<Prompt, 'system'>>;
|
|
11988
|
+
prepareCall?: (options: Omit<AgentCallParameters<CALL_OPTIONS, NoInfer<TOOLS>>, 'onStepFinish'> & Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, OUTPUT>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'allowSystemInMessages' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'providerOptions' | 'experimental_context' | 'experimental_download'>) => MaybePromiseLike<Pick<ToolLoopAgentSettings<CALL_OPTIONS, TOOLS, OUTPUT>, 'model' | 'tools' | 'maxOutputTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed' | 'headers' | 'instructions' | 'allowSystemInMessages' | 'stopWhen' | 'experimental_telemetry' | 'activeTools' | 'providerOptions' | 'experimental_context' | 'experimental_download'> & Omit<Prompt, 'system'>>;
|
|
11601
11989
|
};
|
|
11602
11990
|
export { ToolLoopAgentSettings as Experimental_AgentSettings }
|
|
11603
11991
|
export { ToolLoopAgentSettings }
|
|
@@ -12507,6 +12895,7 @@ export declare type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIData
|
|
|
12507
12895
|
type: 'tool-approval-request';
|
|
12508
12896
|
approvalId: string;
|
|
12509
12897
|
toolCallId: string;
|
|
12898
|
+
signature?: string;
|
|
12510
12899
|
} | {
|
|
12511
12900
|
type: 'tool-output-available';
|
|
12512
12901
|
toolCallId: string;
|
|
@@ -12632,6 +13021,7 @@ export declare const uiMessageChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
12632
13021
|
type: "tool-approval-request";
|
|
12633
13022
|
approvalId: string;
|
|
12634
13023
|
toolCallId: string;
|
|
13024
|
+
signature?: string | undefined;
|
|
12635
13025
|
} | {
|
|
12636
13026
|
type: "tool-output-available";
|
|
12637
13027
|
toolCallId: string;
|
|
@@ -12893,7 +13283,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12893
13283
|
providerExecuted?: boolean;
|
|
12894
13284
|
} & ({
|
|
12895
13285
|
state: 'input-streaming';
|
|
12896
|
-
input
|
|
13286
|
+
input?: DeepPartial<asUITool<TOOL>['input']> | undefined;
|
|
12897
13287
|
output?: never;
|
|
12898
13288
|
errorText?: never;
|
|
12899
13289
|
callProviderMetadata?: ProviderMetadata;
|
|
@@ -12915,6 +13305,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12915
13305
|
id: string;
|
|
12916
13306
|
approved?: never;
|
|
12917
13307
|
reason?: never;
|
|
13308
|
+
signature?: string;
|
|
12918
13309
|
};
|
|
12919
13310
|
} | {
|
|
12920
13311
|
state: 'approval-responded';
|
|
@@ -12926,6 +13317,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12926
13317
|
id: string;
|
|
12927
13318
|
approved: boolean;
|
|
12928
13319
|
reason?: string;
|
|
13320
|
+
signature?: string;
|
|
12929
13321
|
};
|
|
12930
13322
|
} | {
|
|
12931
13323
|
state: 'output-available';
|
|
@@ -12939,6 +13331,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12939
13331
|
id: string;
|
|
12940
13332
|
approved: true;
|
|
12941
13333
|
reason?: string;
|
|
13334
|
+
signature?: string;
|
|
12942
13335
|
};
|
|
12943
13336
|
} | {
|
|
12944
13337
|
state: 'output-error';
|
|
@@ -12952,6 +13345,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12952
13345
|
id: string;
|
|
12953
13346
|
approved: true;
|
|
12954
13347
|
reason?: string;
|
|
13348
|
+
signature?: string;
|
|
12955
13349
|
};
|
|
12956
13350
|
} | {
|
|
12957
13351
|
state: 'output-denied';
|
|
@@ -12963,6 +13357,7 @@ export declare type UIToolInvocation<TOOL extends UITool | Tool> = {
|
|
|
12963
13357
|
id: string;
|
|
12964
13358
|
approved: false;
|
|
12965
13359
|
reason?: string;
|
|
13360
|
+
signature?: string;
|
|
12966
13361
|
};
|
|
12967
13362
|
});
|
|
12968
13363
|
|
|
@@ -13079,6 +13474,10 @@ export declare const userModelMessageSchema: z.ZodType<UserModelMessage>;
|
|
|
13079
13474
|
* Validates that a URL is safe to download from, blocking private/internal addresses
|
|
13080
13475
|
* to prevent SSRF attacks.
|
|
13081
13476
|
*
|
|
13477
|
+
* Note: this performs string/literal-IP checks only. It does not resolve DNS, so a
|
|
13478
|
+
* hostname that resolves to a private address is not blocked here (see callers, which
|
|
13479
|
+
* should additionally constrain egress at the network layer when handling untrusted URLs).
|
|
13480
|
+
*
|
|
13082
13481
|
* @param url - The URL string to validate.
|
|
13083
13482
|
* @throws DownloadError if the URL is unsafe.
|
|
13084
13483
|
*/
|
|
@@ -13333,6 +13732,24 @@ declare type VideoModelV3CallOptions = {
|
|
|
13333
13732
|
* The image serves as the starting frame that the model will animate.
|
|
13334
13733
|
*/
|
|
13335
13734
|
image: VideoModelV3File | undefined;
|
|
13735
|
+
/**
|
|
13736
|
+
* Role-tagged image inputs for first-last-frame generation.
|
|
13737
|
+
* Each entry declares whether it is the `first_frame` or the
|
|
13738
|
+
* `last_frame` of the generated video.
|
|
13739
|
+
*/
|
|
13740
|
+
frameImages: Array<VideoModelV3FrameImage> | undefined;
|
|
13741
|
+
/**
|
|
13742
|
+
* Reference inputs for reference-to-video generation.
|
|
13743
|
+
*
|
|
13744
|
+
* Each entry is an image or video file. Providers route each reference by
|
|
13745
|
+
* its media type (image vs. video) and warn when a reference kind is
|
|
13746
|
+
* unsupported.
|
|
13747
|
+
*/
|
|
13748
|
+
inputReferences: Array<VideoModelV3File> | undefined;
|
|
13749
|
+
/**
|
|
13750
|
+
* Whether the model should generate audio alongside the video.
|
|
13751
|
+
*/
|
|
13752
|
+
generateAudio: boolean | undefined;
|
|
13336
13753
|
/**
|
|
13337
13754
|
* Additional provider-specific options that are passed through to the provider
|
|
13338
13755
|
* as body parameters.
|
|
@@ -13383,12 +13800,40 @@ declare type VideoModelV3File = {
|
|
|
13383
13800
|
* The URL of the video or image file.
|
|
13384
13801
|
*/
|
|
13385
13802
|
url: string;
|
|
13803
|
+
/**
|
|
13804
|
+
* The media type of the referenced file, when known.
|
|
13805
|
+
* Video types: 'video/mp4', 'video/webm', 'video/quicktime'
|
|
13806
|
+
* Image types: 'image/png', 'image/jpeg', 'image/webp'
|
|
13807
|
+
*/
|
|
13808
|
+
mediaType?: string;
|
|
13386
13809
|
/**
|
|
13387
13810
|
* Optional provider-specific metadata for the file part.
|
|
13388
13811
|
*/
|
|
13389
13812
|
providerOptions?: SharedV3ProviderMetadata;
|
|
13390
13813
|
};
|
|
13391
13814
|
|
|
13815
|
+
/**
|
|
13816
|
+
* A role-tagged image input for image-to-video and first-last-frame generation.
|
|
13817
|
+
*/
|
|
13818
|
+
declare type VideoModelV3FrameImage = {
|
|
13819
|
+
/**
|
|
13820
|
+
* The image file used for this frame.
|
|
13821
|
+
*/
|
|
13822
|
+
image: VideoModelV3File;
|
|
13823
|
+
/**
|
|
13824
|
+
* Which frame this image represents.
|
|
13825
|
+
*/
|
|
13826
|
+
frameType: VideoModelV3FrameType;
|
|
13827
|
+
};
|
|
13828
|
+
|
|
13829
|
+
/**
|
|
13830
|
+
* The role a frame image plays in video generation.
|
|
13831
|
+
*
|
|
13832
|
+
* - `first_frame`: the starting frame the model animates from
|
|
13833
|
+
* - `last_frame`: the ending frame the model animates towards
|
|
13834
|
+
*/
|
|
13835
|
+
declare type VideoModelV3FrameType = 'first_frame' | 'last_frame';
|
|
13836
|
+
|
|
13392
13837
|
/**
|
|
13393
13838
|
* Generated video data. Can be a URL, base64-encoded string, or binary data.
|
|
13394
13839
|
*/
|
|
@@ -13523,5 +13968,5 @@ export declare function zodSchema<OBJECT>(zodSchema: z4.core.$ZodType<OBJECT, an
|
|
|
13523
13968
|
}): Schema<OBJECT>;
|
|
13524
13969
|
|
|
13525
13970
|
export { }
|
|
13526
|
-
export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, LazySchema as LazySchema, ZodSchema as ZodSchema, StandardSchema as StandardSchema, ValidationResult as ValidationResult, ParseResult as ParseResult, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, ToolResultOutput as ToolResultOutput, ToolNeedsApprovalFunction as ToolNeedsApprovalFunction, TypeValidationContext as TypeValidationContext, EmbeddingModelV2 as EmbeddingModelV2, EmbeddingModelV3Embedding as EmbeddingModelV3Embedding, EmbeddingModelV3Middleware as EmbeddingModelV3Middleware, ImageModelV2 as ImageModelV2, ImageModelV3ProviderMetadata as ImageModelV3ProviderMetadata, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, ImageModelV3Middleware as ImageModelV3Middleware, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2 as LanguageModelV2, SharedV3Warning as SharedV3Warning, LanguageModelV3Middleware as LanguageModelV3Middleware, SharedV3ProviderMetadata as SharedV3ProviderMetadata, SpeechModelV2 as SpeechModelV2, TranscriptionModelV2 as TranscriptionModelV2, ImageModelV3Usage as ImageModelV3Usage, DeepPartialInternal as DeepPartialInternal, AttributeValue as AttributeValue, Tracer as Tracer, BaseToolCall as BaseToolCall, Source as Source, ResponseMessage as ResponseMessage, LanguageModelV3ToolCall as LanguageModelV3ToolCall, GenerateTextIncludeSettings as GenerateTextIncludeSettings, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, _ai_sdk_provider as _ai_sdk_provider, DataUIMessageChunk as DataUIMessageChunk, InferElementOutput as InferElementOutput, ConsumeStreamOptions as ConsumeStreamOptions, StreamTextIncludeSettings as StreamTextIncludeSettings, StreamTextOnAbortCallback as StreamTextOnAbortCallback, CallbackModelInfo as CallbackModelInfo, LanguageModelV3ToolChoice as LanguageModelV3ToolChoice, Listener as Listener, MaybePromiseLike as MaybePromiseLike, Output_2 as Output_2, InferAgentTools as InferAgentTools, UIMessageStreamResponseInit as UIMessageStreamResponseInit, getOriginalFetch as getOriginalFetch, InferUIMessageTools as InferUIMessageTools, InferUIMessageToolCall as InferUIMessageToolCall, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, Resolvable as Resolvable, FetchFunction as FetchFunction, SingleRequestTextStreamPart as SingleRequestTextStreamPart,
|
|
13527
|
-
export { schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$a_2, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol$f, symbol$g, symbol$h, symbol$i, symbol$j, symbol, symbol_2, symbol_3 };
|
|
13971
|
+
export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, LazySchema as LazySchema, ZodSchema as ZodSchema, StandardSchema as StandardSchema, ValidationResult as ValidationResult, ParseResult as ParseResult, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, ToolResultOutput as ToolResultOutput, ToolNeedsApprovalFunction as ToolNeedsApprovalFunction, TypeValidationContext as TypeValidationContext, EmbeddingModelV2 as EmbeddingModelV2, EmbeddingModelV3Embedding as EmbeddingModelV3Embedding, EmbeddingModelV3Middleware as EmbeddingModelV3Middleware, ImageModelV2 as ImageModelV2, ImageModelV3ProviderMetadata as ImageModelV3ProviderMetadata, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, ImageModelV3Middleware as ImageModelV3Middleware, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2 as LanguageModelV2, SharedV3Warning as SharedV3Warning, LanguageModelV3Middleware as LanguageModelV3Middleware, SharedV3ProviderMetadata as SharedV3ProviderMetadata, SpeechModelV2 as SpeechModelV2, TranscriptionModelV2 as TranscriptionModelV2, ImageModelV3Usage as ImageModelV3Usage, DeepPartialInternal as DeepPartialInternal, AttributeValue as AttributeValue, Tracer as Tracer, BaseToolCall as BaseToolCall, Source as Source, ResponseMessage as ResponseMessage, LanguageModelV3ToolCall as LanguageModelV3ToolCall, GenerateTextIncludeSettings as GenerateTextIncludeSettings, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, _ai_sdk_provider as _ai_sdk_provider, DataUIMessageChunk as DataUIMessageChunk, InferElementOutput as InferElementOutput, ConsumeStreamOptions as ConsumeStreamOptions, StreamTextIncludeSettings as StreamTextIncludeSettings, StreamTextOnAbortCallback as StreamTextOnAbortCallback, CallbackModelInfo as CallbackModelInfo, LanguageModelV3ToolChoice as LanguageModelV3ToolChoice, Listener as Listener, MaybePromiseLike as MaybePromiseLike, Output_2 as Output_2, InferAgentTools as InferAgentTools, UIMessageStreamResponseInit as UIMessageStreamResponseInit, getOriginalFetch as getOriginalFetch, InferUIMessageTools as InferUIMessageTools, InferUIMessageToolCall as InferUIMessageToolCall, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, Resolvable as Resolvable, FetchFunction as FetchFunction, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason_2 as RetryErrorReason_2, GenerateImagePrompt as GenerateImagePrompt, JSONValue_2 as JSONValue_2, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, VideoModelResponseMetadata as VideoModelResponseMetadata, VideoModelProviderMetadata as VideoModelProviderMetadata, VideoModel as VideoModel, VideoModelV3FrameType as VideoModelV3FrameType, EmbeddingModelV3CallOptions as EmbeddingModelV3CallOptions, LanguageModelV3CallOptions as LanguageModelV3CallOptions, JSONObject as JSONObject, LanguageModelV3 as LanguageModelV3, EmbeddingModelV3 as EmbeddingModelV3, ImageModelV3 as ImageModelV3, TranscriptionModelV3 as TranscriptionModelV3, SpeechModelV3 as SpeechModelV3, RerankingModelV3 as RerankingModelV3, VideoModelV3 as VideoModelV3, ProviderV2 as ProviderV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV3 as ProviderV3 };
|
|
13972
|
+
export { schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$a_2, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol$f, symbol$g, symbol$h, symbol$i, symbol$j, symbol$k, symbol, symbol_2, symbol_3 };
|