@mastra/server 1.79.0-alpha.3 → 1.79.0-alpha.4
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/dist/_types/@internal_voice/dist/_types/zod/v4/core/schemas.d.ts +3 -1
- package/dist/_types/@internal_voice/dist/_types/zod/v4/core/util.d.ts +2 -0
- package/dist/_types/@mastra_schema-compat/dist/_types/@internal_ai-v6/dist/index.d.ts +95 -1095
- package/dist/{a2a-D5CGFO8W.cjs → a2a-BSJETR5U.cjs} +3 -3
- package/dist/a2a-BSJETR5U.cjs.map +1 -0
- package/dist/{a2a-Dg3ylOKc.js → a2a-hc5lDJCh.js} +3 -3
- package/dist/{a2a-D5CGFO8W.cjs.map → a2a-hc5lDJCh.js.map} +1 -1
- package/dist/{agents-D9vpLghy.cjs → agents-BgeSrhey.cjs} +2 -1
- package/dist/agents-BgeSrhey.cjs.map +1 -0
- package/dist/{agents-DNWDET4U.js → agents-wamaX7m2.js} +2 -1
- package/dist/agents-wamaX7m2.js.map +1 -0
- package/dist/{api-schema-manifest-CI0gyTVi.cjs → api-schema-manifest-BIpRlCSx.cjs} +9 -3
- package/dist/api-schema-manifest-BIpRlCSx.cjs.map +1 -0
- package/dist/{api-schema-manifest-BgWM-O7K.js → api-schema-manifest-Zr5wt6oZ.js} +9 -3
- package/dist/api-schema-manifest-Zr5wt6oZ.js.map +1 -0
- package/dist/{background-tasks-BbYzMhlD.cjs → background-tasks-B-OILmJH.cjs} +3 -3
- package/dist/{background-tasks-BbYzMhlD.cjs.map → background-tasks-B-OILmJH.cjs.map} +1 -1
- package/dist/{background-tasks-zvlIcbhg.js → background-tasks-xOB2d8x6.js} +3 -3
- package/dist/{background-tasks-zvlIcbhg.js.map → background-tasks-xOB2d8x6.js.map} +1 -1
- package/dist/{builder-registry-1GwmVVwr.js → builder-registry-BvLWRDhU.js} +3 -3
- package/dist/{builder-registry-1GwmVVwr.js.map → builder-registry-BvLWRDhU.js.map} +1 -1
- package/dist/{builder-registry-DagCZI4A.cjs → builder-registry-DMTPXlGU.cjs} +3 -3
- package/dist/{builder-registry-DagCZI4A.cjs.map → builder-registry-DMTPXlGU.cjs.map} +1 -1
- package/dist/{channels-5J7CTFyY.cjs → channels-B0IpCxzk.cjs} +2 -2
- package/dist/{channels-5J7CTFyY.cjs.map → channels-B0IpCxzk.cjs.map} +1 -1
- package/dist/{channels-B3aoI-f1.js → channels-CmWBm-JB.js} +2 -2
- package/dist/{channels-B3aoI-f1.js.map → channels-CmWBm-JB.js.map} +1 -1
- package/dist/{dist-D5O8s1u2.cjs → dist-3FPW9nVj.cjs} +3 -3
- package/dist/{dist-D5O8s1u2.cjs.map → dist-3FPW9nVj.cjs.map} +1 -1
- package/dist/{dist-Bw2XgCSY.cjs → dist-B5OwHWTo.cjs} +3 -3
- package/dist/{dist-Bw2XgCSY.cjs.map → dist-B5OwHWTo.cjs.map} +1 -1
- package/dist/{dist-C5TZXkhS.js → dist-B_bet8uz.js} +2 -2
- package/dist/{dist-C5TZXkhS.js.map → dist-B_bet8uz.js.map} +1 -1
- package/dist/{dist-CWqDEEO3.cjs → dist-Bi2UyBDO.cjs} +582 -880
- package/dist/{dist-B07TBQpE.js.map → dist-Bi2UyBDO.cjs.map} +1 -1
- package/dist/{dist-8fx1_bLF.js → dist-BwYL7Ykb.js} +3 -3
- package/dist/{dist-8fx1_bLF.js.map → dist-BwYL7Ykb.js.map} +1 -1
- package/dist/{dist-_RnqhYfY.js → dist-BxMmGD3n.js} +3 -3
- package/dist/{dist-_RnqhYfY.js.map → dist-BxMmGD3n.js.map} +1 -1
- package/dist/{dist-D1oSHJhK.js → dist-CBRJax5e.js} +3 -3
- package/dist/{dist-D1oSHJhK.js.map → dist-CBRJax5e.js.map} +1 -1
- package/dist/{dist-D5mpJHHH.cjs → dist-CQ3FSKT-.cjs} +3 -3
- package/dist/{dist-D5mpJHHH.cjs.map → dist-CQ3FSKT-.cjs.map} +1 -1
- package/dist/{dist-B07TBQpE.js → dist-CSVQ5lzr.js} +583 -881
- package/dist/dist-CSVQ5lzr.js.map +1 -0
- package/dist/{dist-CgemVduI.cjs → dist-DC1Pewf5.cjs} +4 -4
- package/dist/{dist-CgemVduI.cjs.map → dist-DC1Pewf5.cjs.map} +1 -1
- package/dist/{dist-BCTqy9i3.js → dist-DOWsEmo6.js} +4 -4
- package/dist/{dist-BCTqy9i3.js.map → dist-DOWsEmo6.js.map} +1 -1
- package/dist/{dist-Bz4l8I_x.js → dist-DcoIg_tp.js} +3 -3
- package/dist/{dist-Bz4l8I_x.js.map → dist-DcoIg_tp.js.map} +1 -1
- package/dist/{dist-UACuV_1t.cjs → dist-UKEksCGq.cjs} +3 -3
- package/dist/{dist-UACuV_1t.cjs.map → dist-UKEksCGq.cjs.map} +1 -1
- package/dist/{dist-tYOY8gEs.cjs → dist-rDRetJVY.cjs} +2 -2
- package/dist/{dist-tYOY8gEs.cjs.map → dist-rDRetJVY.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-observability-tracing-trace-query.md +39 -10
- package/dist/{dynamic-workflows-BL3eD0zL.cjs → dynamic-workflows-BVW4SyS5.cjs} +2 -2
- package/dist/{dynamic-workflows-BL3eD0zL.cjs.map → dynamic-workflows-BVW4SyS5.cjs.map} +1 -1
- package/dist/{dynamic-workflows-BJfoQMo8.js → dynamic-workflows-CE-xM2NQ.js} +2 -2
- package/dist/{dynamic-workflows-BJfoQMo8.js.map → dynamic-workflows-CE-xM2NQ.js.map} +1 -1
- package/dist/{editor-builder-BOmAPurW.cjs → editor-builder-C2dwLp86.cjs} +3 -3
- package/dist/{editor-builder-BOmAPurW.cjs.map → editor-builder-C2dwLp86.cjs.map} +1 -1
- package/dist/{editor-builder-DHqCWGd2.js → editor-builder-C5xHbYcZ.js} +2 -2
- package/dist/{editor-builder-DHqCWGd2.js.map → editor-builder-C5xHbYcZ.js.map} +1 -1
- package/dist/{editor-builder-DqHKoEDx.cjs → editor-builder-CP7URDqM.cjs} +2 -2
- package/dist/{editor-builder-DqHKoEDx.cjs.map → editor-builder-CP7URDqM.cjs.map} +1 -1
- package/dist/{editor-builder-CeLVu_FT.js → editor-builder-DdZk963o.js} +3 -3
- package/dist/{editor-builder-CeLVu_FT.js.map → editor-builder-DdZk963o.js.map} +1 -1
- package/dist/{observability-new-endpoints-BKFVVMTS.cjs → observability-new-endpoints-CXbVKROm.cjs} +74 -17
- package/dist/observability-new-endpoints-CXbVKROm.cjs.map +1 -0
- package/dist/{observability-new-endpoints-C5VO7nLK.js → observability-new-endpoints-JxqtW8f5.js} +75 -18
- package/dist/observability-new-endpoints-JxqtW8f5.js.map +1 -0
- package/dist/{route-builder-lBil8Cvo.js → route-builder-DzUGCSQT.js} +3 -3
- package/dist/{route-builder-lBil8Cvo.js.map → route-builder-DzUGCSQT.js.map} +1 -1
- package/dist/{route-builder-2yrD15TL.cjs → route-builder-TBkBU65d.cjs} +3 -3
- package/dist/{route-builder-2yrD15TL.cjs.map → route-builder-TBkBU65d.cjs.map} +1 -1
- package/dist/{routes-CeX9JLW2.cjs → routes-C5zubsU0.cjs} +11 -11
- package/dist/{routes-CeX9JLW2.cjs.map → routes-C5zubsU0.cjs.map} +1 -1
- package/dist/{routes-CMj-3iyu.js → routes-DrxGo6Ug.js} +11 -11
- package/dist/{routes-CMj-3iyu.js.map → routes-DrxGo6Ug.js.map} +1 -1
- package/dist/{schedules-B0g72u5Y.cjs → schedules-55nFQfsJ.cjs} +3 -3
- package/dist/{schedules-B0g72u5Y.cjs.map → schedules-55nFQfsJ.cjs.map} +1 -1
- package/dist/{schedules-CrAmZ2gu.js → schedules-DxDUE8Fb.js} +3 -3
- package/dist/{schedules-CrAmZ2gu.js.map → schedules-DxDUE8Fb.js.map} +1 -1
- package/dist/schema-Drf2W04o.js +2 -0
- package/dist/schema-EQanefYq.cjs +1 -0
- package/dist/{schema-e0VHpMt0-BS9KHnuT.cjs → schema-e0VHpMt0-C0452jOk.cjs} +2 -2
- package/dist/{schema-e0VHpMt0-BS9KHnuT.cjs.map → schema-e0VHpMt0-C0452jOk.cjs.map} +1 -1
- package/dist/{schema-e0VHpMt0-CvPvLS06.js → schema-e0VHpMt0-CVP5Hnxy.js} +2 -2
- package/dist/{schema-e0VHpMt0-CvPvLS06.js.map → schema-e0VHpMt0-CVP5Hnxy.js.map} +1 -1
- package/dist/server/a2a/tasks.d.ts +2 -2
- package/dist/server/a2a/tasks.d.ts.map +1 -1
- package/dist/server/handlers/a2a.cjs +1 -1
- package/dist/server/handlers/a2a.d.ts +2 -2
- package/dist/server/handlers/a2a.d.ts.map +1 -1
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +4 -4
- package/dist/server/handlers/agent-builder.js +4 -4
- package/dist/server/handlers/agent-controller.cjs +35 -5
- package/dist/server/handlers/agent-controller.cjs.map +1 -1
- package/dist/server/handlers/agent-controller.d.ts.map +1 -1
- package/dist/server/handlers/agent-controller.js +35 -5
- package/dist/server/handlers/agent-controller.js.map +1 -1
- package/dist/server/handlers/agent-versions.cjs +2 -2
- package/dist/server/handlers/agent-versions.js +2 -2
- package/dist/server/handlers/agents.cjs +17 -13
- package/dist/server/handlers/agents.cjs.map +1 -1
- package/dist/server/handlers/agents.d.ts +6 -0
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +17 -13
- package/dist/server/handlers/agents.js.map +1 -1
- package/dist/server/handlers/auth.cjs +1 -1
- package/dist/server/handlers/auth.js +1 -1
- package/dist/server/handlers/background-tasks.cjs +1 -1
- package/dist/server/handlers/background-tasks.js +1 -1
- package/dist/server/handlers/builder-registry.cjs +1 -1
- package/dist/server/handlers/builder-registry.js +1 -1
- package/dist/server/handlers/channels.cjs +1 -1
- package/dist/server/handlers/channels.js +1 -1
- package/dist/server/handlers/conversations.cjs +2 -2
- package/dist/server/handlers/conversations.js +2 -2
- package/dist/server/handlers/datasets.cjs +1 -1
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers/dynamic-workflows.cjs +1 -1
- package/dist/server/handlers/dynamic-workflows.js +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/error.cjs +7 -5
- package/dist/server/handlers/error.cjs.map +1 -1
- package/dist/server/handlers/error.d.ts.map +1 -1
- package/dist/server/handlers/error.js +7 -5
- package/dist/server/handlers/error.js.map +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/logs.cjs +2 -2
- package/dist/server/handlers/logs.js +2 -2
- package/dist/server/handlers/mcp-client-versions.cjs +3 -3
- package/dist/server/handlers/mcp-client-versions.js +3 -3
- package/dist/server/handlers/mcp.cjs +1 -1
- package/dist/server/handlers/mcp.js +1 -1
- package/dist/server/handlers/memory.cjs +2 -2
- package/dist/server/handlers/memory.js +2 -2
- package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +335 -31
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-shared.cjs +73 -9
- package/dist/server/handlers/observability-shared.cjs.map +1 -1
- package/dist/server/handlers/observability-shared.d.ts +25 -1
- package/dist/server/handlers/observability-shared.d.ts.map +1 -1
- package/dist/server/handlers/observability-shared.js +68 -10
- package/dist/server/handlers/observability-shared.js.map +1 -1
- package/dist/server/handlers/observability.cjs +2 -2
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/plans.cjs +3 -3
- package/dist/server/handlers/plans.js +3 -3
- package/dist/server/handlers/processor-providers.cjs +1 -1
- package/dist/server/handlers/processor-providers.js +1 -1
- package/dist/server/handlers/processors.cjs +1 -1
- package/dist/server/handlers/processors.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +3 -3
- package/dist/server/handlers/prompt-block-versions.js +3 -3
- package/dist/server/handlers/responses.cjs +2 -2
- package/dist/server/handlers/responses.js +2 -2
- package/dist/server/handlers/responses.storage.cjs +1 -1
- package/dist/server/handlers/responses.storage.js +1 -1
- package/dist/server/handlers/schedules.cjs +1 -1
- package/dist/server/handlers/schedules.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +3 -3
- package/dist/server/handlers/scorer-versions.js +3 -3
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
- package/dist/server/handlers/stored-agent-favorites.js +3 -3
- package/dist/server/handlers/stored-agents.cjs +3 -3
- package/dist/server/handlers/stored-agents.js +3 -3
- package/dist/server/handlers/stored-mcp-clients.cjs +3 -3
- package/dist/server/handlers/stored-mcp-clients.js +3 -3
- package/dist/server/handlers/stored-prompt-blocks.cjs +3 -3
- package/dist/server/handlers/stored-prompt-blocks.js +3 -3
- package/dist/server/handlers/stored-scorers.cjs +3 -3
- package/dist/server/handlers/stored-scorers.js +3 -3
- package/dist/server/handlers/stored-skill-favorites.cjs +4 -4
- package/dist/server/handlers/stored-skill-favorites.js +4 -4
- package/dist/server/handlers/stored-skills.cjs +4 -4
- package/dist/server/handlers/stored-skills.js +4 -4
- package/dist/server/handlers/stored-workspaces.cjs +2 -2
- package/dist/server/handlers/stored-workspaces.js +2 -2
- package/dist/server/handlers/system.cjs +3 -3
- package/dist/server/handlers/system.d.ts +6 -0
- package/dist/server/handlers/system.d.ts.map +1 -1
- package/dist/server/handlers/system.js +3 -3
- package/dist/server/handlers/tool-providers.cjs +1 -1
- package/dist/server/handlers/tool-providers.js +1 -1
- package/dist/server/handlers/tools.cjs +6 -6
- package/dist/server/handlers/tools.js +6 -6
- package/dist/server/handlers/utils.cjs +2 -1
- package/dist/server/handlers/utils.d.ts +9 -0
- package/dist/server/handlers/utils.d.ts.map +1 -1
- package/dist/server/handlers/utils.js +2 -2
- package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
- package/dist/server/handlers/validate-agent-instructions.js +1 -1
- package/dist/server/handlers/vector.cjs +1 -1
- package/dist/server/handlers/vector.js +1 -1
- package/dist/server/handlers/workflow-builder.cjs +1 -1
- package/dist/server/handlers/workflow-builder.d.ts.map +1 -1
- package/dist/server/handlers/workflow-builder.js +1 -1
- package/dist/server/handlers/workflows.cjs +4 -4
- package/dist/server/handlers/workflows.js +4 -4
- package/dist/server/handlers/workspace.cjs +1 -1
- package/dist/server/handlers/workspace.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +2 -2
- package/dist/server/schemas/agents.d.ts +3 -0
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +4 -4
- package/dist/server/schemas/index.js +4 -4
- package/dist/server/schemas/system.d.ts +6 -0
- package/dist/server/schemas/system.d.ts.map +1 -1
- package/dist/server/server-adapter/api-schema-manifest.d.ts +2 -0
- package/dist/server/server-adapter/api-schema-manifest.d.ts.map +1 -1
- package/dist/server/server-adapter/index.cjs +3 -3
- package/dist/server/server-adapter/index.js +3 -3
- package/dist/server/server-adapter/routes/observability.d.ts +167 -15
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/system.d.ts +6 -0
- package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
- package/dist/{system-MGpkVA20.js → system-CiAOa3RO.js} +4 -1
- package/dist/system-CiAOa3RO.js.map +1 -0
- package/dist/{system-DY6UweSl.cjs → system-wG9idyeI.cjs} +4 -1
- package/dist/system-wG9idyeI.cjs.map +1 -0
- package/dist/{utils-D5DHrO3K.js → utils-BBJlS81s.js} +19 -2
- package/dist/{utils-D5DHrO3K.js.map → utils-BBJlS81s.js.map} +1 -1
- package/dist/{utils-tmrFs-gf.js → utils-DCAUeb6M.js} +3 -3
- package/dist/{utils-tmrFs-gf.js.map → utils-DCAUeb6M.js.map} +1 -1
- package/dist/{utils-BZdnPmsW.cjs → utils-DCgeTrq2.cjs} +3 -3
- package/dist/{utils-BZdnPmsW.cjs.map → utils-DCgeTrq2.cjs.map} +1 -1
- package/dist/{utils-CczRcgHQ.cjs → utils-Du-EpvDs.cjs} +24 -1
- package/dist/{utils-CczRcgHQ.cjs.map → utils-Du-EpvDs.cjs.map} +1 -1
- package/dist/{workflow-builder-DJ0eeJuG.js → workflow-builder-Dr6Rm3gH.js} +6 -6
- package/dist/workflow-builder-Dr6Rm3gH.js.map +1 -0
- package/dist/{workflow-builder-DdSutoga.cjs → workflow-builder-Dx24RhD3.cjs} +6 -6
- package/dist/workflow-builder-Dx24RhD3.cjs.map +1 -0
- package/package.json +10 -11
- package/dist/a2a-Dg3ylOKc.js.map +0 -1
- package/dist/agents-D9vpLghy.cjs.map +0 -1
- package/dist/agents-DNWDET4U.js.map +0 -1
- package/dist/api-schema-manifest-BgWM-O7K.js.map +0 -1
- package/dist/api-schema-manifest-CI0gyTVi.cjs.map +0 -1
- package/dist/dist-CWqDEEO3.cjs.map +0 -1
- package/dist/observability-new-endpoints-BKFVVMTS.cjs.map +0 -1
- package/dist/observability-new-endpoints-C5VO7nLK.js.map +0 -1
- package/dist/schema-BVcoNfni.cjs +0 -1
- package/dist/schema-Xxr5X5Je.js +0 -2
- package/dist/system-DY6UweSl.cjs.map +0 -1
- package/dist/system-MGpkVA20.js.map +0 -1
- package/dist/workflow-builder-DJ0eeJuG.js.map +0 -1
- package/dist/workflow-builder-DdSutoga.cjs.map +0 -1
|
@@ -385,38 +385,6 @@ export declare class AISDKError extends Error {
|
|
|
385
385
|
protected static hasMarker(error: unknown, marker: string): boolean;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
/**
|
|
389
|
-
* Custom error class for AI SDK related errors.
|
|
390
|
-
* @extends Error
|
|
391
|
-
*/
|
|
392
|
-
declare class AISDKError_2 extends Error {
|
|
393
|
-
private readonly [symbol$d_2];
|
|
394
|
-
/**
|
|
395
|
-
* The underlying cause of the error, if any.
|
|
396
|
-
*/
|
|
397
|
-
readonly cause?: unknown;
|
|
398
|
-
/**
|
|
399
|
-
* Creates an AI SDK Error.
|
|
400
|
-
*
|
|
401
|
-
* @param {Object} params - The parameters for creating the error.
|
|
402
|
-
* @param {string} params.name - The name of the error.
|
|
403
|
-
* @param {string} params.message - The error message.
|
|
404
|
-
* @param {unknown} [params.cause] - The underlying cause of the error.
|
|
405
|
-
*/
|
|
406
|
-
constructor({ name, message, cause, }: {
|
|
407
|
-
name: string;
|
|
408
|
-
message: string;
|
|
409
|
-
cause?: unknown;
|
|
410
|
-
});
|
|
411
|
-
/**
|
|
412
|
-
* Checks if the given error is an AI SDK Error.
|
|
413
|
-
* @param {unknown} error - The error to check.
|
|
414
|
-
* @returns {boolean} True if the error is an AI SDK Error, false otherwise.
|
|
415
|
-
*/
|
|
416
|
-
static isInstance(error: unknown): error is AISDKError_2;
|
|
417
|
-
protected static hasMarker(error: unknown, marker: string): boolean;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
388
|
export declare class APICallError extends AISDKError {
|
|
421
389
|
private readonly [symbol$c];
|
|
422
390
|
readonly url: string;
|
|
@@ -441,30 +409,6 @@ export declare class APICallError extends AISDKError {
|
|
|
441
409
|
static isInstance(error: unknown): error is APICallError;
|
|
442
410
|
}
|
|
443
411
|
|
|
444
|
-
declare class APICallError_2 extends AISDKError_2 {
|
|
445
|
-
private readonly [symbol$c_2];
|
|
446
|
-
readonly url: string;
|
|
447
|
-
readonly requestBodyValues: unknown;
|
|
448
|
-
readonly statusCode?: number;
|
|
449
|
-
readonly responseHeaders?: Record<string, string>;
|
|
450
|
-
readonly responseBody?: string;
|
|
451
|
-
readonly isRetryable: boolean;
|
|
452
|
-
readonly data?: unknown;
|
|
453
|
-
constructor({ message, url, requestBodyValues, statusCode, responseHeaders, responseBody, cause, isRetryable, // server error
|
|
454
|
-
data, }: {
|
|
455
|
-
message: string;
|
|
456
|
-
url: string;
|
|
457
|
-
requestBodyValues: unknown;
|
|
458
|
-
statusCode?: number;
|
|
459
|
-
responseHeaders?: Record<string, string>;
|
|
460
|
-
responseBody?: string;
|
|
461
|
-
cause?: unknown;
|
|
462
|
-
isRetryable?: boolean;
|
|
463
|
-
data?: unknown;
|
|
464
|
-
});
|
|
465
|
-
static isInstance(error: unknown): error is APICallError_2;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
412
|
export declare function asSchema<OBJECT>(schema: FlexibleSchema<OBJECT> | undefined): Schema<OBJECT>;
|
|
469
413
|
|
|
470
414
|
/**
|
|
@@ -988,7 +932,7 @@ export declare function convertFileListToFileUIParts(files: FileList | undefined
|
|
|
988
932
|
* If the file is base64 data, it returns a data URI with the base64 data.
|
|
989
933
|
* If the file is a Uint8Array, it converts it to base64 and returns a data URI.
|
|
990
934
|
*/
|
|
991
|
-
declare function convertImageModelFileToDataUri(file:
|
|
935
|
+
declare function convertImageModelFileToDataUri(file: ImageModelV3File): string;
|
|
992
936
|
|
|
993
937
|
declare function convertToBase64(value: string | Uint8Array): string;
|
|
994
938
|
|
|
@@ -1156,7 +1100,7 @@ declare const createJsonErrorResponseHandler: <T>({ errorSchema, errorToMessage,
|
|
|
1156
1100
|
errorSchema: FlexibleSchema<T>;
|
|
1157
1101
|
errorToMessage: (error: T) => string;
|
|
1158
1102
|
isRetryable?: (response: Response, error?: T) => boolean;
|
|
1159
|
-
}) => ResponseHandler<
|
|
1103
|
+
}) => ResponseHandler<APICallError>;
|
|
1160
1104
|
|
|
1161
1105
|
declare const createJsonResponseHandler: <T>(responseSchema: FlexibleSchema<T>) => ResponseHandler<T>;
|
|
1162
1106
|
|
|
@@ -1201,7 +1145,7 @@ declare function createProviderToolFactoryWithOutputSchema<INPUT, OUTPUT, ARGS e
|
|
|
1201
1145
|
supportsDeferredResults?: boolean;
|
|
1202
1146
|
}): ProviderToolFactoryWithOutputSchema<INPUT, OUTPUT, ARGS>;
|
|
1203
1147
|
|
|
1204
|
-
declare const createStatusCodeErrorResponseHandler: () => ResponseHandler<
|
|
1148
|
+
declare const createStatusCodeErrorResponseHandler: () => ResponseHandler<APICallError>;
|
|
1205
1149
|
|
|
1206
1150
|
/**
|
|
1207
1151
|
* Creates a Response object from a text stream.
|
|
@@ -1227,7 +1171,7 @@ declare function createToolNameMapping({ tools, providerToolNames, resolveProvid
|
|
|
1227
1171
|
/**
|
|
1228
1172
|
* Tools that were passed to the language model.
|
|
1229
1173
|
*/
|
|
1230
|
-
tools: Array<
|
|
1174
|
+
tools: Array<LanguageModelV3FunctionTool | LanguageModelV3ProviderTool> | undefined;
|
|
1231
1175
|
/**
|
|
1232
1176
|
* Maps the provider tool ids to the provider tool names.
|
|
1233
1177
|
*/
|
|
@@ -1236,7 +1180,7 @@ declare function createToolNameMapping({ tools, providerToolNames, resolveProvid
|
|
|
1236
1180
|
* Optional resolver for provider tool names that cannot be represented as
|
|
1237
1181
|
* static id -> name mappings (e.g. dynamic provider names).
|
|
1238
1182
|
*/
|
|
1239
|
-
resolveProviderToolName?: (tool:
|
|
1183
|
+
resolveProviderToolName?: (tool: LanguageModelV3ProviderTool) => string | undefined;
|
|
1240
1184
|
}): ToolNameMapping;
|
|
1241
1185
|
|
|
1242
1186
|
export declare type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESSAGE, 'id' | 'role'> & {
|
|
@@ -1512,7 +1456,7 @@ declare function downloadBlob(url: string, options?: {
|
|
|
1512
1456
|
abortSignal?: AbortSignal;
|
|
1513
1457
|
}): Promise<Blob>;
|
|
1514
1458
|
|
|
1515
|
-
export declare class DownloadError extends
|
|
1459
|
+
export declare class DownloadError extends AISDKError {
|
|
1516
1460
|
private readonly [symbol_2];
|
|
1517
1461
|
readonly url: string;
|
|
1518
1462
|
readonly statusCode?: number;
|
|
@@ -1534,7 +1478,7 @@ export declare function dynamicTool(tool: {
|
|
|
1534
1478
|
description?: string;
|
|
1535
1479
|
title?: string;
|
|
1536
1480
|
providerOptions?: ProviderOptions;
|
|
1537
|
-
metadata?:
|
|
1481
|
+
metadata?: JSONObject;
|
|
1538
1482
|
inputSchema: FlexibleSchema<unknown>;
|
|
1539
1483
|
execute: ToolExecuteFunction<unknown, unknown>;
|
|
1540
1484
|
/**
|
|
@@ -1786,11 +1730,11 @@ export declare type EmbeddingModel = string | EmbeddingModelV3 | EmbeddingModelV
|
|
|
1786
1730
|
export declare type EmbeddingModelMiddleware = EmbeddingModelV3Middleware;
|
|
1787
1731
|
|
|
1788
1732
|
declare type EmbeddingModelProviderOptionsTransformer = (options: {
|
|
1789
|
-
providerOptions:
|
|
1733
|
+
providerOptions: SharedV3ProviderOptions | undefined;
|
|
1790
1734
|
values: Array<string>;
|
|
1791
1735
|
startIndex: number;
|
|
1792
1736
|
endIndex: number;
|
|
1793
|
-
}) =>
|
|
1737
|
+
}) => SharedV3ProviderOptions | undefined | PromiseLike<SharedV3ProviderOptions | undefined>;
|
|
1794
1738
|
|
|
1795
1739
|
/**
|
|
1796
1740
|
* Represents the number of tokens used in an embedding.
|
|
@@ -3096,7 +3040,7 @@ declare interface GatewayLanguageModelEntry {
|
|
|
3096
3040
|
|
|
3097
3041
|
declare type GatewayLanguageModelSpecification = Pick<LanguageModelV3, 'specificationVersion' | 'provider' | 'modelId'>;
|
|
3098
3042
|
|
|
3099
|
-
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-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-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | '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.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-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash-free' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-air-v2.5' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'kwaipilot/kat-coder-pro-v2.5' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | '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-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' | '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' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | '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-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-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-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' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'sakana/fugu-ultra' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'tencent/hy3' | 'thinkingmachines/inkling' | '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.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 & {});
|
|
3043
|
+
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-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-max' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-3-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-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-5' | '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-flash-0731' | '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.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-pro-preview' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.6-flash' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash-free' | 'interfaze/interfaze-beta' | 'kwaipilot/kat-coder-air-v2.5' | 'kwaipilot/kat-coder-pro-v1' | 'kwaipilot/kat-coder-pro-v2' | 'kwaipilot/kat-coder-pro-v2.5' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | '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-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' | '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' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | '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-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-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-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' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'sakana/fugu-ultra' | 'stepfun/step-3.5-flash' | 'stepfun/step-3.7-flash' | 'tencent/hy3' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | '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.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 & {});
|
|
3100
3044
|
|
|
3101
3045
|
declare interface GatewayProvider extends ProviderV3 {
|
|
3102
3046
|
(modelId: GatewayModelId): LanguageModelV3;
|
|
@@ -3303,7 +3247,7 @@ declare const gatewayTools: {
|
|
|
3303
3247
|
|
|
3304
3248
|
declare type GatewayTranscriptionModelId = 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'xai/grok-stt' | (string & {});
|
|
3305
3249
|
|
|
3306
|
-
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 & {});
|
|
3250
|
+
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' | 'google/veo-3.1-lite-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' | 'minimax/minimax-h3' | 'xai/grok-imagine-video' | 'xai/grok-imagine-video-1.5' | 'xai/grok-imagine-video-1.5-preview' | (string & {});
|
|
3307
3251
|
|
|
3308
3252
|
/**
|
|
3309
3253
|
* A generated audio file.
|
|
@@ -4438,6 +4382,11 @@ declare type ImageModelV3 = {
|
|
|
4438
4382
|
* be returned as binary data.
|
|
4439
4383
|
*/
|
|
4440
4384
|
images: Array<string> | Array<Uint8Array>;
|
|
4385
|
+
/**
|
|
4386
|
+
* Whether an unsuccessful result, such as an empty image result, can be
|
|
4387
|
+
* retried. When omitted, the result is unclassified.
|
|
4388
|
+
*/
|
|
4389
|
+
isRetryable?: boolean;
|
|
4441
4390
|
/**
|
|
4442
4391
|
* Warnings for the call, e.g. unsupported features.
|
|
4443
4392
|
*/
|
|
@@ -4583,42 +4532,6 @@ declare type ImageModelV3File = {
|
|
|
4583
4532
|
providerOptions?: SharedV3ProviderMetadata;
|
|
4584
4533
|
};
|
|
4585
4534
|
|
|
4586
|
-
/**
|
|
4587
|
-
* An image file that can be used for image editing or variation generation.
|
|
4588
|
-
*/
|
|
4589
|
-
declare type ImageModelV3File_2 = {
|
|
4590
|
-
type: 'file';
|
|
4591
|
-
/**
|
|
4592
|
-
* The IANA media type of the file, e.g. `image/png`. Any string is supported.
|
|
4593
|
-
*
|
|
4594
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
4595
|
-
*/
|
|
4596
|
-
mediaType: string;
|
|
4597
|
-
/**
|
|
4598
|
-
* Generated file data as base64 encoded strings or binary data.
|
|
4599
|
-
*
|
|
4600
|
-
* The file data should be returned without any unnecessary conversion.
|
|
4601
|
-
* If the API returns base64 encoded strings, the file data should be returned
|
|
4602
|
-
* as base64 encoded strings. If the API returns binary data, the file data should
|
|
4603
|
-
* be returned as binary data.
|
|
4604
|
-
*/
|
|
4605
|
-
data: string | Uint8Array;
|
|
4606
|
-
/**
|
|
4607
|
-
* Optional provider-specific metadata for the file part.
|
|
4608
|
-
*/
|
|
4609
|
-
providerOptions?: SharedV3ProviderMetadata_2;
|
|
4610
|
-
} | {
|
|
4611
|
-
type: 'url';
|
|
4612
|
-
/**
|
|
4613
|
-
* The URL of the image file.
|
|
4614
|
-
*/
|
|
4615
|
-
url: string;
|
|
4616
|
-
/**
|
|
4617
|
-
* Optional provider-specific metadata for the file part.
|
|
4618
|
-
*/
|
|
4619
|
-
providerOptions?: SharedV3ProviderMetadata_2;
|
|
4620
|
-
};
|
|
4621
|
-
|
|
4622
4535
|
/**
|
|
4623
4536
|
* Middleware for ImageModelV3.
|
|
4624
4537
|
* This type defines the structure for middleware that can be used to modify
|
|
@@ -4802,11 +4715,11 @@ export declare type InferUITools<TOOLS extends ToolSet> = {
|
|
|
4802
4715
|
};
|
|
4803
4716
|
|
|
4804
4717
|
declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPrefix, schemaSuffix, }: {
|
|
4805
|
-
messages:
|
|
4718
|
+
messages: LanguageModelV3Prompt;
|
|
4806
4719
|
schema?: JSONSchema7;
|
|
4807
4720
|
schemaPrefix?: string;
|
|
4808
4721
|
schemaSuffix?: string;
|
|
4809
|
-
}):
|
|
4722
|
+
}): LanguageModelV3Prompt;
|
|
4810
4723
|
|
|
4811
4724
|
export declare class InvalidArgumentError extends AISDKError {
|
|
4812
4725
|
private readonly [symbol$i];
|
|
@@ -5031,16 +4944,10 @@ declare type Job = () => Promise<void>;
|
|
|
5031
4944
|
|
|
5032
4945
|
declare type JSONArray = JSONValue_2[];
|
|
5033
4946
|
|
|
5034
|
-
declare type JSONArray_2 = JSONValue_3[];
|
|
5035
|
-
|
|
5036
4947
|
declare type JSONObject = {
|
|
5037
4948
|
[key: string]: JSONValue_2 | undefined;
|
|
5038
4949
|
};
|
|
5039
4950
|
|
|
5040
|
-
declare type JSONObject_2 = {
|
|
5041
|
-
[key: string]: JSONValue_3 | undefined;
|
|
5042
|
-
};
|
|
5043
|
-
|
|
5044
4951
|
export declare class JSONParseError extends AISDKError {
|
|
5045
4952
|
private readonly [symbol$7];
|
|
5046
4953
|
readonly text: string;
|
|
@@ -5051,16 +4958,6 @@ export declare class JSONParseError extends AISDKError {
|
|
|
5051
4958
|
static isInstance(error: unknown): error is JSONParseError;
|
|
5052
4959
|
}
|
|
5053
4960
|
|
|
5054
|
-
declare class JSONParseError_2 extends AISDKError_2 {
|
|
5055
|
-
private readonly [symbol$7_2];
|
|
5056
|
-
readonly text: string;
|
|
5057
|
-
constructor({ text, cause }: {
|
|
5058
|
-
text: string;
|
|
5059
|
-
cause: unknown;
|
|
5060
|
-
});
|
|
5061
|
-
static isInstance(error: unknown): error is JSONParseError_2;
|
|
5062
|
-
}
|
|
5063
|
-
|
|
5064
4961
|
/**
|
|
5065
4962
|
* Create a schema using a JSON Schema.
|
|
5066
4963
|
*
|
|
@@ -5090,12 +4987,6 @@ export declare type JSONValue = JSONValue_2;
|
|
|
5090
4987
|
*/
|
|
5091
4988
|
declare type JSONValue_2 = null | string | number | boolean | JSONObject | JSONArray;
|
|
5092
4989
|
|
|
5093
|
-
/**
|
|
5094
|
-
* A JSON value can be a string, number, boolean, object, array, or null.
|
|
5095
|
-
* JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
|
|
5096
|
-
*/
|
|
5097
|
-
declare type JSONValue_3 = null | string | number | boolean | JSONObject_2 | JSONArray_2;
|
|
5098
|
-
|
|
5099
4990
|
declare const KNOWN_MODEL_TYPES: readonly ["embedding", "image", "language", "reranking", "speech", "transcription", "video"];
|
|
5100
4991
|
|
|
5101
4992
|
declare type KnownModelType = (typeof KNOWN_MODEL_TYPES)[number];
|
|
@@ -6118,11 +6009,6 @@ declare type LanguageModelV3Content = LanguageModelV3Text | LanguageModelV3Reaso
|
|
|
6118
6009
|
*/
|
|
6119
6010
|
declare type LanguageModelV3DataContent = Uint8Array | string | URL;
|
|
6120
6011
|
|
|
6121
|
-
/**
|
|
6122
|
-
* Data content. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
6123
|
-
*/
|
|
6124
|
-
declare type LanguageModelV3DataContent_2 = Uint8Array | string | URL;
|
|
6125
|
-
|
|
6126
6012
|
/**
|
|
6127
6013
|
* A file that has been generated by the model.
|
|
6128
6014
|
* Generated files as base64 encoded strings or binary data.
|
|
@@ -6151,34 +6037,6 @@ declare type LanguageModelV3File = {
|
|
|
6151
6037
|
providerMetadata?: SharedV3ProviderMetadata;
|
|
6152
6038
|
};
|
|
6153
6039
|
|
|
6154
|
-
/**
|
|
6155
|
-
* A file that has been generated by the model.
|
|
6156
|
-
* Generated files as base64 encoded strings or binary data.
|
|
6157
|
-
* The files should be returned without any unnecessary conversion.
|
|
6158
|
-
*/
|
|
6159
|
-
declare type LanguageModelV3File_2 = {
|
|
6160
|
-
type: 'file';
|
|
6161
|
-
/**
|
|
6162
|
-
* The IANA media type of the file, e.g. `image/png` or `audio/mp3`.
|
|
6163
|
-
*
|
|
6164
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
6165
|
-
*/
|
|
6166
|
-
mediaType: string;
|
|
6167
|
-
/**
|
|
6168
|
-
* Generated file data as base64 encoded strings or binary data.
|
|
6169
|
-
*
|
|
6170
|
-
* The file data should be returned without any unnecessary conversion.
|
|
6171
|
-
* If the API returns base64 encoded strings, the file data should be returned
|
|
6172
|
-
* as base64 encoded strings. If the API returns binary data, the file data should
|
|
6173
|
-
* be returned as binary data.
|
|
6174
|
-
*/
|
|
6175
|
-
data: string | Uint8Array;
|
|
6176
|
-
/**
|
|
6177
|
-
* Optional provider-specific metadata for the file part.
|
|
6178
|
-
*/
|
|
6179
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6180
|
-
};
|
|
6181
|
-
|
|
6182
6040
|
/**
|
|
6183
6041
|
* File content part of a prompt. It contains a file.
|
|
6184
6042
|
*/
|
|
@@ -6192,35 +6050,6 @@ declare interface LanguageModelV3FilePart {
|
|
|
6192
6050
|
* File data. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
6193
6051
|
*/
|
|
6194
6052
|
data: LanguageModelV3DataContent;
|
|
6195
|
-
/**
|
|
6196
|
-
* IANA media type of the file.
|
|
6197
|
-
*
|
|
6198
|
-
* Can support wildcards, e.g. `image/*` (in which case the provider needs to take appropriate action).
|
|
6199
|
-
*
|
|
6200
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
6201
|
-
*/
|
|
6202
|
-
mediaType: string;
|
|
6203
|
-
/**
|
|
6204
|
-
* Additional provider-specific options. They are passed through
|
|
6205
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
6206
|
-
* functionality that can be fully encapsulated in the provider.
|
|
6207
|
-
*/
|
|
6208
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
6209
|
-
}
|
|
6210
|
-
|
|
6211
|
-
/**
|
|
6212
|
-
* File content part of a prompt. It contains a file.
|
|
6213
|
-
*/
|
|
6214
|
-
declare interface LanguageModelV3FilePart_2 {
|
|
6215
|
-
type: 'file';
|
|
6216
|
-
/**
|
|
6217
|
-
* Optional filename of the file.
|
|
6218
|
-
*/
|
|
6219
|
-
filename?: string;
|
|
6220
|
-
/**
|
|
6221
|
-
* File data. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
6222
|
-
*/
|
|
6223
|
-
data: LanguageModelV3DataContent_2;
|
|
6224
6053
|
/**
|
|
6225
6054
|
* The original URL string before it was parsed into a URL.
|
|
6226
6055
|
*
|
|
@@ -6241,7 +6070,7 @@ declare interface LanguageModelV3FilePart_2 {
|
|
|
6241
6070
|
* to the provider from the AI SDK and enable provider-specific
|
|
6242
6071
|
* functionality that can be fully encapsulated in the provider.
|
|
6243
6072
|
*/
|
|
6244
|
-
providerOptions?:
|
|
6073
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
6245
6074
|
}
|
|
6246
6075
|
|
|
6247
6076
|
/**
|
|
@@ -6271,33 +6100,6 @@ declare type LanguageModelV3FinishReason = {
|
|
|
6271
6100
|
raw: string | undefined;
|
|
6272
6101
|
};
|
|
6273
6102
|
|
|
6274
|
-
/**
|
|
6275
|
-
* Reason why a language model finished generating a response.
|
|
6276
|
-
*
|
|
6277
|
-
* Contains both a unified finish reason and a raw finish reason from the provider.
|
|
6278
|
-
* The unified finish reason is used to provide a consistent finish reason across different providers.
|
|
6279
|
-
* The raw finish reason is used to provide the original finish reason from the provider.
|
|
6280
|
-
*/
|
|
6281
|
-
declare type LanguageModelV3FinishReason_2 = {
|
|
6282
|
-
/**
|
|
6283
|
-
* Unified finish reason. This enables using the same finish reason across different providers.
|
|
6284
|
-
*
|
|
6285
|
-
* Can be one of the following:
|
|
6286
|
-
* - `stop`: model generated stop sequence
|
|
6287
|
-
* - `length`: model generated maximum number of tokens
|
|
6288
|
-
* - `content-filter`: content filter violation stopped the model
|
|
6289
|
-
* - `tool-calls`: model triggered tool calls
|
|
6290
|
-
* - `error`: model stopped because of an error
|
|
6291
|
-
* - `other`: model stopped for other reasons
|
|
6292
|
-
*/
|
|
6293
|
-
unified: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
|
|
6294
|
-
/**
|
|
6295
|
-
* Raw finish reason from the provider.
|
|
6296
|
-
* This is the original finish reason from the provider.
|
|
6297
|
-
*/
|
|
6298
|
-
raw: string | undefined;
|
|
6299
|
-
};
|
|
6300
|
-
|
|
6301
6103
|
/**
|
|
6302
6104
|
* A tool has a name, a description, and a set of parameters.
|
|
6303
6105
|
*
|
|
@@ -6344,52 +6146,6 @@ declare type LanguageModelV3FunctionTool = {
|
|
|
6344
6146
|
providerOptions?: SharedV3ProviderOptions;
|
|
6345
6147
|
};
|
|
6346
6148
|
|
|
6347
|
-
/**
|
|
6348
|
-
* A tool has a name, a description, and a set of parameters.
|
|
6349
|
-
*
|
|
6350
|
-
* Note: this is **not** the user-facing tool definition. The AI SDK methods will
|
|
6351
|
-
* map the user-facing tool definitions to this format.
|
|
6352
|
-
*/
|
|
6353
|
-
declare type LanguageModelV3FunctionTool_2 = {
|
|
6354
|
-
/**
|
|
6355
|
-
* The type of the tool (always 'function').
|
|
6356
|
-
*/
|
|
6357
|
-
type: 'function';
|
|
6358
|
-
/**
|
|
6359
|
-
* The name of the tool. Unique within this model call.
|
|
6360
|
-
*/
|
|
6361
|
-
name: string;
|
|
6362
|
-
/**
|
|
6363
|
-
* A description of the tool. The language model uses this to understand the
|
|
6364
|
-
* tool's purpose and to provide better completion suggestions.
|
|
6365
|
-
*/
|
|
6366
|
-
description?: string;
|
|
6367
|
-
/**
|
|
6368
|
-
* The parameters that the tool expects. The language model uses this to
|
|
6369
|
-
* understand the tool's input requirements and to provide matching suggestions.
|
|
6370
|
-
*/
|
|
6371
|
-
inputSchema: JSONSchema7;
|
|
6372
|
-
/**
|
|
6373
|
-
* An optional list of input examples that show the language
|
|
6374
|
-
* model what the input should look like.
|
|
6375
|
-
*/
|
|
6376
|
-
inputExamples?: Array<{
|
|
6377
|
-
input: JSONObject_2;
|
|
6378
|
-
}>;
|
|
6379
|
-
/**
|
|
6380
|
-
* Strict mode setting for the tool.
|
|
6381
|
-
*
|
|
6382
|
-
* Providers that support strict mode will use this setting to determine
|
|
6383
|
-
* how the input should be generated. Strict mode will always produce
|
|
6384
|
-
* valid inputs, but it might limit what input schemas are supported.
|
|
6385
|
-
*/
|
|
6386
|
-
strict?: boolean;
|
|
6387
|
-
/**
|
|
6388
|
-
* The provider-specific options for the tool.
|
|
6389
|
-
*/
|
|
6390
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
6391
|
-
};
|
|
6392
|
-
|
|
6393
6149
|
/**
|
|
6394
6150
|
* The result of a language model doGenerate call.
|
|
6395
6151
|
*/
|
|
@@ -6461,27 +6217,6 @@ declare type LanguageModelV3Message = ({
|
|
|
6461
6217
|
providerOptions?: SharedV3ProviderOptions;
|
|
6462
6218
|
};
|
|
6463
6219
|
|
|
6464
|
-
declare type LanguageModelV3Message_2 = ({
|
|
6465
|
-
role: 'system';
|
|
6466
|
-
content: string;
|
|
6467
|
-
} | {
|
|
6468
|
-
role: 'user';
|
|
6469
|
-
content: Array<LanguageModelV3TextPart_2 | LanguageModelV3FilePart_2>;
|
|
6470
|
-
} | {
|
|
6471
|
-
role: 'assistant';
|
|
6472
|
-
content: Array<LanguageModelV3TextPart_2 | LanguageModelV3FilePart_2 | LanguageModelV3ReasoningPart_2 | LanguageModelV3ToolCallPart_2 | LanguageModelV3ToolResultPart_2>;
|
|
6473
|
-
} | {
|
|
6474
|
-
role: 'tool';
|
|
6475
|
-
content: Array<LanguageModelV3ToolResultPart_2 | LanguageModelV3ToolApprovalResponsePart_2>;
|
|
6476
|
-
}) & {
|
|
6477
|
-
/**
|
|
6478
|
-
* Additional provider-specific options. They are passed through
|
|
6479
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
6480
|
-
* functionality that can be fully encapsulated in the provider.
|
|
6481
|
-
*/
|
|
6482
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
6483
|
-
};
|
|
6484
|
-
|
|
6485
6220
|
/**
|
|
6486
6221
|
* Experimental middleware for LanguageModelV3.
|
|
6487
6222
|
* This type defines the structure for middleware that can be used to modify
|
|
@@ -6572,18 +6307,7 @@ declare type LanguageModelV3Middleware = {
|
|
|
6572
6307
|
declare type LanguageModelV3Prompt = Array<LanguageModelV3Message>;
|
|
6573
6308
|
|
|
6574
6309
|
/**
|
|
6575
|
-
*
|
|
6576
|
-
*
|
|
6577
|
-
* Note: Not all models and prompt formats support multi-modal inputs and
|
|
6578
|
-
* tool calls. The validation happens at runtime.
|
|
6579
|
-
*
|
|
6580
|
-
* Note: This is not a user-facing prompt. The AI SDK methods will map the
|
|
6581
|
-
* user-facing prompt types such as chat or instruction prompts to this format.
|
|
6582
|
-
*/
|
|
6583
|
-
declare type LanguageModelV3Prompt_2 = Array<LanguageModelV3Message_2>;
|
|
6584
|
-
|
|
6585
|
-
/**
|
|
6586
|
-
* The configuration of a provider tool.
|
|
6310
|
+
* The configuration of a provider tool.
|
|
6587
6311
|
*
|
|
6588
6312
|
* Provider tools are tools that are specific to a certain provider.
|
|
6589
6313
|
* The input and output schemas are defined be the provider, and
|
|
@@ -6608,32 +6332,6 @@ declare type LanguageModelV3ProviderTool = {
|
|
|
6608
6332
|
args: Record<string, unknown>;
|
|
6609
6333
|
};
|
|
6610
6334
|
|
|
6611
|
-
/**
|
|
6612
|
-
* The configuration of a provider tool.
|
|
6613
|
-
*
|
|
6614
|
-
* Provider tools are tools that are specific to a certain provider.
|
|
6615
|
-
* The input and output schemas are defined be the provider, and
|
|
6616
|
-
* some of the tools are also executed on the provider systems.
|
|
6617
|
-
*/
|
|
6618
|
-
declare type LanguageModelV3ProviderTool_2 = {
|
|
6619
|
-
/**
|
|
6620
|
-
* The type of the tool (always 'provider').
|
|
6621
|
-
*/
|
|
6622
|
-
type: 'provider';
|
|
6623
|
-
/**
|
|
6624
|
-
* The ID of the tool. Should follow the format `<provider-id>.<unique-tool-name>`.
|
|
6625
|
-
*/
|
|
6626
|
-
id: `${string}.${string}`;
|
|
6627
|
-
/**
|
|
6628
|
-
* The name of the tool. Unique within this model call.
|
|
6629
|
-
*/
|
|
6630
|
-
name: string;
|
|
6631
|
-
/**
|
|
6632
|
-
* The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
|
|
6633
|
-
*/
|
|
6634
|
-
args: Record<string, unknown>;
|
|
6635
|
-
};
|
|
6636
|
-
|
|
6637
6335
|
/**
|
|
6638
6336
|
* Reasoning that the model has generated.
|
|
6639
6337
|
*/
|
|
@@ -6663,23 +6361,6 @@ declare interface LanguageModelV3ReasoningPart {
|
|
|
6663
6361
|
providerOptions?: SharedV3ProviderOptions;
|
|
6664
6362
|
}
|
|
6665
6363
|
|
|
6666
|
-
/**
|
|
6667
|
-
* Reasoning content part of a prompt. It contains a string of reasoning text.
|
|
6668
|
-
*/
|
|
6669
|
-
declare interface LanguageModelV3ReasoningPart_2 {
|
|
6670
|
-
type: 'reasoning';
|
|
6671
|
-
/**
|
|
6672
|
-
* The reasoning text.
|
|
6673
|
-
*/
|
|
6674
|
-
text: string;
|
|
6675
|
-
/**
|
|
6676
|
-
* Additional provider-specific options. They are passed through
|
|
6677
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
6678
|
-
* functionality that can be fully encapsulated in the provider.
|
|
6679
|
-
*/
|
|
6680
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
6681
|
-
}
|
|
6682
|
-
|
|
6683
6364
|
declare interface LanguageModelV3ResponseMetadata {
|
|
6684
6365
|
/**
|
|
6685
6366
|
* ID for the generated response, if the provider sends one.
|
|
@@ -6695,21 +6376,6 @@ declare interface LanguageModelV3ResponseMetadata {
|
|
|
6695
6376
|
modelId?: string;
|
|
6696
6377
|
}
|
|
6697
6378
|
|
|
6698
|
-
declare interface LanguageModelV3ResponseMetadata_2 {
|
|
6699
|
-
/**
|
|
6700
|
-
* ID for the generated response, if the provider sends one.
|
|
6701
|
-
*/
|
|
6702
|
-
id?: string;
|
|
6703
|
-
/**
|
|
6704
|
-
* Timestamp for the start of the generated response, if the provider sends one.
|
|
6705
|
-
*/
|
|
6706
|
-
timestamp?: Date;
|
|
6707
|
-
/**
|
|
6708
|
-
* The ID of the response model that was used to generate the response, if the provider sends one.
|
|
6709
|
-
*/
|
|
6710
|
-
modelId?: string;
|
|
6711
|
-
}
|
|
6712
|
-
|
|
6713
6379
|
/**
|
|
6714
6380
|
* A source that has been used as input to generate the response.
|
|
6715
6381
|
*/
|
|
@@ -6763,59 +6429,6 @@ declare type LanguageModelV3Source = {
|
|
|
6763
6429
|
providerMetadata?: SharedV3ProviderMetadata;
|
|
6764
6430
|
};
|
|
6765
6431
|
|
|
6766
|
-
/**
|
|
6767
|
-
* A source that has been used as input to generate the response.
|
|
6768
|
-
*/
|
|
6769
|
-
declare type LanguageModelV3Source_2 = {
|
|
6770
|
-
type: 'source';
|
|
6771
|
-
/**
|
|
6772
|
-
* The type of source - URL sources reference web content.
|
|
6773
|
-
*/
|
|
6774
|
-
sourceType: 'url';
|
|
6775
|
-
/**
|
|
6776
|
-
* The ID of the source.
|
|
6777
|
-
*/
|
|
6778
|
-
id: string;
|
|
6779
|
-
/**
|
|
6780
|
-
* The URL of the source.
|
|
6781
|
-
*/
|
|
6782
|
-
url: string;
|
|
6783
|
-
/**
|
|
6784
|
-
* The title of the source.
|
|
6785
|
-
*/
|
|
6786
|
-
title?: string;
|
|
6787
|
-
/**
|
|
6788
|
-
* Additional provider metadata for the source.
|
|
6789
|
-
*/
|
|
6790
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6791
|
-
} | {
|
|
6792
|
-
type: 'source';
|
|
6793
|
-
/**
|
|
6794
|
-
* The type of source - document sources reference files/documents.
|
|
6795
|
-
*/
|
|
6796
|
-
sourceType: 'document';
|
|
6797
|
-
/**
|
|
6798
|
-
* The ID of the source.
|
|
6799
|
-
*/
|
|
6800
|
-
id: string;
|
|
6801
|
-
/**
|
|
6802
|
-
* IANA media type of the document (e.g., 'application/pdf').
|
|
6803
|
-
*/
|
|
6804
|
-
mediaType: string;
|
|
6805
|
-
/**
|
|
6806
|
-
* The title of the document.
|
|
6807
|
-
*/
|
|
6808
|
-
title: string;
|
|
6809
|
-
/**
|
|
6810
|
-
* Optional filename of the document.
|
|
6811
|
-
*/
|
|
6812
|
-
filename?: string;
|
|
6813
|
-
/**
|
|
6814
|
-
* Additional provider metadata for the source.
|
|
6815
|
-
*/
|
|
6816
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6817
|
-
};
|
|
6818
|
-
|
|
6819
6432
|
declare type LanguageModelV3StreamPart = {
|
|
6820
6433
|
type: 'text-start';
|
|
6821
6434
|
providerMetadata?: SharedV3ProviderMetadata;
|
|
@@ -6877,67 +6490,6 @@ declare type LanguageModelV3StreamPart = {
|
|
|
6877
6490
|
error: unknown;
|
|
6878
6491
|
};
|
|
6879
6492
|
|
|
6880
|
-
declare type LanguageModelV3StreamPart_2 = {
|
|
6881
|
-
type: 'text-start';
|
|
6882
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6883
|
-
id: string;
|
|
6884
|
-
} | {
|
|
6885
|
-
type: 'text-delta';
|
|
6886
|
-
id: string;
|
|
6887
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6888
|
-
delta: string;
|
|
6889
|
-
} | {
|
|
6890
|
-
type: 'text-end';
|
|
6891
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6892
|
-
id: string;
|
|
6893
|
-
} | {
|
|
6894
|
-
type: 'reasoning-start';
|
|
6895
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6896
|
-
id: string;
|
|
6897
|
-
} | {
|
|
6898
|
-
type: 'reasoning-delta';
|
|
6899
|
-
id: string;
|
|
6900
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6901
|
-
delta: string;
|
|
6902
|
-
} | {
|
|
6903
|
-
type: 'reasoning-end';
|
|
6904
|
-
id: string;
|
|
6905
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6906
|
-
} | {
|
|
6907
|
-
type: 'tool-input-start';
|
|
6908
|
-
id: string;
|
|
6909
|
-
toolName: string;
|
|
6910
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6911
|
-
providerExecuted?: boolean;
|
|
6912
|
-
dynamic?: boolean;
|
|
6913
|
-
title?: string;
|
|
6914
|
-
} | {
|
|
6915
|
-
type: 'tool-input-delta';
|
|
6916
|
-
id: string;
|
|
6917
|
-
delta: string;
|
|
6918
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6919
|
-
} | {
|
|
6920
|
-
type: 'tool-input-end';
|
|
6921
|
-
id: string;
|
|
6922
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6923
|
-
} | LanguageModelV3ToolApprovalRequest_2 | LanguageModelV3ToolCall_2 | LanguageModelV3ToolResult_2 | LanguageModelV3File_2 | LanguageModelV3Source_2 | {
|
|
6924
|
-
type: 'stream-start';
|
|
6925
|
-
warnings: Array<SharedV3Warning_2>;
|
|
6926
|
-
} | ({
|
|
6927
|
-
type: 'response-metadata';
|
|
6928
|
-
} & LanguageModelV3ResponseMetadata_2) | {
|
|
6929
|
-
type: 'finish';
|
|
6930
|
-
usage: LanguageModelV3Usage_2;
|
|
6931
|
-
finishReason: LanguageModelV3FinishReason_2;
|
|
6932
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
6933
|
-
} | {
|
|
6934
|
-
type: 'raw';
|
|
6935
|
-
rawValue: unknown;
|
|
6936
|
-
} | {
|
|
6937
|
-
type: 'error';
|
|
6938
|
-
error: unknown;
|
|
6939
|
-
};
|
|
6940
|
-
|
|
6941
6493
|
/**
|
|
6942
6494
|
* The result of a language model doStream call.
|
|
6943
6495
|
*/
|
|
@@ -6995,23 +6547,6 @@ declare interface LanguageModelV3TextPart {
|
|
|
6995
6547
|
providerOptions?: SharedV3ProviderOptions;
|
|
6996
6548
|
}
|
|
6997
6549
|
|
|
6998
|
-
/**
|
|
6999
|
-
* Text content part of a prompt. It contains a string of text.
|
|
7000
|
-
*/
|
|
7001
|
-
declare interface LanguageModelV3TextPart_2 {
|
|
7002
|
-
type: 'text';
|
|
7003
|
-
/**
|
|
7004
|
-
* The text content.
|
|
7005
|
-
*/
|
|
7006
|
-
text: string;
|
|
7007
|
-
/**
|
|
7008
|
-
* Additional provider-specific options. They are passed through
|
|
7009
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
7010
|
-
* functionality that can be fully encapsulated in the provider.
|
|
7011
|
-
*/
|
|
7012
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
7013
|
-
}
|
|
7014
|
-
|
|
7015
6550
|
/**
|
|
7016
6551
|
* Tool approval request emitted by a provider for a provider-executed tool call.
|
|
7017
6552
|
*
|
|
@@ -7035,29 +6570,6 @@ declare type LanguageModelV3ToolApprovalRequest = {
|
|
|
7035
6570
|
providerMetadata?: SharedV3ProviderMetadata;
|
|
7036
6571
|
};
|
|
7037
6572
|
|
|
7038
|
-
/**
|
|
7039
|
-
* Tool approval request emitted by a provider for a provider-executed tool call.
|
|
7040
|
-
*
|
|
7041
|
-
* This is used for flows where the provider executes the tool (e.g. MCP tools)
|
|
7042
|
-
* but requires an explicit user approval before continuing.
|
|
7043
|
-
*/
|
|
7044
|
-
declare type LanguageModelV3ToolApprovalRequest_2 = {
|
|
7045
|
-
type: 'tool-approval-request';
|
|
7046
|
-
/**
|
|
7047
|
-
* ID of the approval request. This ID is referenced by the subsequent
|
|
7048
|
-
* tool-approval-response (tool message) to approve or deny execution.
|
|
7049
|
-
*/
|
|
7050
|
-
approvalId: string;
|
|
7051
|
-
/**
|
|
7052
|
-
* The tool call ID that this approval request is for.
|
|
7053
|
-
*/
|
|
7054
|
-
toolCallId: string;
|
|
7055
|
-
/**
|
|
7056
|
-
* Additional provider-specific metadata for the approval request.
|
|
7057
|
-
*/
|
|
7058
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
7059
|
-
};
|
|
7060
|
-
|
|
7061
6573
|
/**
|
|
7062
6574
|
* Tool approval response content part of a prompt. It contains the user's
|
|
7063
6575
|
* decision to approve or deny a provider-executed tool call.
|
|
@@ -7084,32 +6596,6 @@ declare interface LanguageModelV3ToolApprovalResponsePart {
|
|
|
7084
6596
|
providerOptions?: SharedV3ProviderOptions;
|
|
7085
6597
|
}
|
|
7086
6598
|
|
|
7087
|
-
/**
|
|
7088
|
-
* Tool approval response content part of a prompt. It contains the user's
|
|
7089
|
-
* decision to approve or deny a provider-executed tool call.
|
|
7090
|
-
*/
|
|
7091
|
-
declare interface LanguageModelV3ToolApprovalResponsePart_2 {
|
|
7092
|
-
type: 'tool-approval-response';
|
|
7093
|
-
/**
|
|
7094
|
-
* ID of the approval request that this response refers to.
|
|
7095
|
-
*/
|
|
7096
|
-
approvalId: string;
|
|
7097
|
-
/**
|
|
7098
|
-
* Whether the approval was granted (true) or denied (false).
|
|
7099
|
-
*/
|
|
7100
|
-
approved: boolean;
|
|
7101
|
-
/**
|
|
7102
|
-
* Optional reason for approval or denial.
|
|
7103
|
-
*/
|
|
7104
|
-
reason?: string;
|
|
7105
|
-
/**
|
|
7106
|
-
* Additional provider-specific options. They are passed through
|
|
7107
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
7108
|
-
* functionality that can be fully encapsulated in the provider.
|
|
7109
|
-
*/
|
|
7110
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
7111
|
-
}
|
|
7112
|
-
|
|
7113
6599
|
/**
|
|
7114
6600
|
* Tool calls that the model has generated.
|
|
7115
6601
|
*/
|
|
@@ -7144,40 +6630,6 @@ declare type LanguageModelV3ToolCall = {
|
|
|
7144
6630
|
providerMetadata?: SharedV3ProviderMetadata;
|
|
7145
6631
|
};
|
|
7146
6632
|
|
|
7147
|
-
/**
|
|
7148
|
-
* Tool calls that the model has generated.
|
|
7149
|
-
*/
|
|
7150
|
-
declare type LanguageModelV3ToolCall_2 = {
|
|
7151
|
-
type: 'tool-call';
|
|
7152
|
-
/**
|
|
7153
|
-
* The identifier of the tool call. It must be unique across all tool calls.
|
|
7154
|
-
*/
|
|
7155
|
-
toolCallId: string;
|
|
7156
|
-
/**
|
|
7157
|
-
* The name of the tool that should be called.
|
|
7158
|
-
*/
|
|
7159
|
-
toolName: string;
|
|
7160
|
-
/**
|
|
7161
|
-
* Stringified JSON object with the tool call arguments. Must match the
|
|
7162
|
-
* parameters schema of the tool.
|
|
7163
|
-
*/
|
|
7164
|
-
input: string;
|
|
7165
|
-
/**
|
|
7166
|
-
* Whether the tool call will be executed by the provider.
|
|
7167
|
-
* If this flag is not set or is false, the tool call will be executed by the client.
|
|
7168
|
-
*/
|
|
7169
|
-
providerExecuted?: boolean;
|
|
7170
|
-
/**
|
|
7171
|
-
* Whether the tool is dynamic, i.e. defined at runtime.
|
|
7172
|
-
* For example, MCP (Model Context Protocol) tools that are executed by the provider.
|
|
7173
|
-
*/
|
|
7174
|
-
dynamic?: boolean;
|
|
7175
|
-
/**
|
|
7176
|
-
* Additional provider-specific metadata for the tool call.
|
|
7177
|
-
*/
|
|
7178
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
7179
|
-
};
|
|
7180
|
-
|
|
7181
6633
|
/**
|
|
7182
6634
|
* Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
|
|
7183
6635
|
*/
|
|
@@ -7208,36 +6660,6 @@ declare interface LanguageModelV3ToolCallPart {
|
|
|
7208
6660
|
providerOptions?: SharedV3ProviderOptions;
|
|
7209
6661
|
}
|
|
7210
6662
|
|
|
7211
|
-
/**
|
|
7212
|
-
* Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
|
|
7213
|
-
*/
|
|
7214
|
-
declare interface LanguageModelV3ToolCallPart_2 {
|
|
7215
|
-
type: 'tool-call';
|
|
7216
|
-
/**
|
|
7217
|
-
* ID of the tool call. This ID is used to match the tool call with the tool result.
|
|
7218
|
-
*/
|
|
7219
|
-
toolCallId: string;
|
|
7220
|
-
/**
|
|
7221
|
-
* Name of the tool that is being called.
|
|
7222
|
-
*/
|
|
7223
|
-
toolName: string;
|
|
7224
|
-
/**
|
|
7225
|
-
* Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
|
|
7226
|
-
*/
|
|
7227
|
-
input: unknown;
|
|
7228
|
-
/**
|
|
7229
|
-
* Whether the tool call will be executed by the provider.
|
|
7230
|
-
* If this flag is not set or is false, the tool call will be executed by the client.
|
|
7231
|
-
*/
|
|
7232
|
-
providerExecuted?: boolean;
|
|
7233
|
-
/**
|
|
7234
|
-
* Additional provider-specific options. They are passed through
|
|
7235
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
7236
|
-
* functionality that can be fully encapsulated in the provider.
|
|
7237
|
-
*/
|
|
7238
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
7239
|
-
}
|
|
7240
|
-
|
|
7241
6663
|
declare type LanguageModelV3ToolChoice = {
|
|
7242
6664
|
type: 'auto';
|
|
7243
6665
|
} | {
|
|
@@ -7255,253 +6677,46 @@ declare type LanguageModelV3ToolChoice = {
|
|
|
7255
6677
|
declare type LanguageModelV3ToolResult = {
|
|
7256
6678
|
type: 'tool-result';
|
|
7257
6679
|
/**
|
|
7258
|
-
* The ID of the tool call that this result is associated with.
|
|
7259
|
-
*/
|
|
7260
|
-
toolCallId: string;
|
|
7261
|
-
/**
|
|
7262
|
-
* Name of the tool that generated this result.
|
|
7263
|
-
*/
|
|
7264
|
-
toolName: string;
|
|
7265
|
-
/**
|
|
7266
|
-
* Result of the tool call. This is a JSON-serializable object.
|
|
7267
|
-
*/
|
|
7268
|
-
result: NonNullable<JSONValue_2>;
|
|
7269
|
-
/**
|
|
7270
|
-
* Optional flag if the result is an error or an error message.
|
|
7271
|
-
*/
|
|
7272
|
-
isError?: boolean;
|
|
7273
|
-
/**
|
|
7274
|
-
* Whether the tool result is preliminary.
|
|
7275
|
-
*
|
|
7276
|
-
* Preliminary tool results replace each other, e.g. image previews.
|
|
7277
|
-
* There always has to be a final, non-preliminary tool result.
|
|
7278
|
-
*
|
|
7279
|
-
* If this flag is set to true, the tool result is preliminary.
|
|
7280
|
-
* If this flag is not set or is false, the tool result is not preliminary.
|
|
7281
|
-
*/
|
|
7282
|
-
preliminary?: boolean;
|
|
7283
|
-
/**
|
|
7284
|
-
* Whether the tool is dynamic, i.e. defined at runtime.
|
|
7285
|
-
* For example, MCP (Model Context Protocol) tools that are executed by the provider.
|
|
7286
|
-
*/
|
|
7287
|
-
dynamic?: boolean;
|
|
7288
|
-
/**
|
|
7289
|
-
* Additional provider-specific metadata for the tool result.
|
|
7290
|
-
*/
|
|
7291
|
-
providerMetadata?: SharedV3ProviderMetadata;
|
|
7292
|
-
};
|
|
7293
|
-
|
|
7294
|
-
/**
|
|
7295
|
-
* Result of a tool call that has been executed by the provider.
|
|
7296
|
-
*/
|
|
7297
|
-
declare type LanguageModelV3ToolResult_2 = {
|
|
7298
|
-
type: 'tool-result';
|
|
7299
|
-
/**
|
|
7300
|
-
* The ID of the tool call that this result is associated with.
|
|
7301
|
-
*/
|
|
7302
|
-
toolCallId: string;
|
|
7303
|
-
/**
|
|
7304
|
-
* Name of the tool that generated this result.
|
|
7305
|
-
*/
|
|
7306
|
-
toolName: string;
|
|
7307
|
-
/**
|
|
7308
|
-
* Result of the tool call. This is a JSON-serializable object.
|
|
7309
|
-
*/
|
|
7310
|
-
result: NonNullable<JSONValue_3>;
|
|
7311
|
-
/**
|
|
7312
|
-
* Optional flag if the result is an error or an error message.
|
|
7313
|
-
*/
|
|
7314
|
-
isError?: boolean;
|
|
7315
|
-
/**
|
|
7316
|
-
* Whether the tool result is preliminary.
|
|
7317
|
-
*
|
|
7318
|
-
* Preliminary tool results replace each other, e.g. image previews.
|
|
7319
|
-
* There always has to be a final, non-preliminary tool result.
|
|
7320
|
-
*
|
|
7321
|
-
* If this flag is set to true, the tool result is preliminary.
|
|
7322
|
-
* If this flag is not set or is false, the tool result is not preliminary.
|
|
7323
|
-
*/
|
|
7324
|
-
preliminary?: boolean;
|
|
7325
|
-
/**
|
|
7326
|
-
* Whether the tool is dynamic, i.e. defined at runtime.
|
|
7327
|
-
* For example, MCP (Model Context Protocol) tools that are executed by the provider.
|
|
7328
|
-
*/
|
|
7329
|
-
dynamic?: boolean;
|
|
7330
|
-
/**
|
|
7331
|
-
* Additional provider-specific metadata for the tool result.
|
|
7332
|
-
*/
|
|
7333
|
-
providerMetadata?: SharedV3ProviderMetadata_2;
|
|
7334
|
-
};
|
|
7335
|
-
|
|
7336
|
-
/**
|
|
7337
|
-
* Result of a tool call.
|
|
7338
|
-
*/
|
|
7339
|
-
declare type LanguageModelV3ToolResultOutput = {
|
|
7340
|
-
/**
|
|
7341
|
-
* Text tool output that should be directly sent to the API.
|
|
7342
|
-
*/
|
|
7343
|
-
type: 'text';
|
|
7344
|
-
value: string;
|
|
7345
|
-
/**
|
|
7346
|
-
* Provider-specific options.
|
|
7347
|
-
*/
|
|
7348
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7349
|
-
} | {
|
|
7350
|
-
type: 'json';
|
|
7351
|
-
value: JSONValue_2;
|
|
7352
|
-
/**
|
|
7353
|
-
* Provider-specific options.
|
|
7354
|
-
*/
|
|
7355
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7356
|
-
} | {
|
|
7357
|
-
/**
|
|
7358
|
-
* Type when the user has denied the execution of the tool call.
|
|
7359
|
-
*/
|
|
7360
|
-
type: 'execution-denied';
|
|
7361
|
-
/**
|
|
7362
|
-
* Optional reason for the execution denial.
|
|
7363
|
-
*/
|
|
7364
|
-
reason?: string;
|
|
7365
|
-
/**
|
|
7366
|
-
* Provider-specific options.
|
|
7367
|
-
*/
|
|
7368
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7369
|
-
} | {
|
|
7370
|
-
type: 'error-text';
|
|
7371
|
-
value: string;
|
|
7372
|
-
/**
|
|
7373
|
-
* Provider-specific options.
|
|
7374
|
-
*/
|
|
7375
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7376
|
-
} | {
|
|
7377
|
-
type: 'error-json';
|
|
7378
|
-
value: JSONValue_2;
|
|
7379
|
-
/**
|
|
7380
|
-
* Provider-specific options.
|
|
7381
|
-
*/
|
|
7382
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7383
|
-
} | {
|
|
7384
|
-
type: 'content';
|
|
7385
|
-
value: Array<{
|
|
7386
|
-
type: 'text';
|
|
7387
|
-
/**
|
|
7388
|
-
* Text content.
|
|
7389
|
-
*/
|
|
7390
|
-
text: string;
|
|
7391
|
-
/**
|
|
7392
|
-
* Provider-specific options.
|
|
7393
|
-
*/
|
|
7394
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7395
|
-
} | {
|
|
7396
|
-
type: 'file-data';
|
|
7397
|
-
/**
|
|
7398
|
-
* Base-64 encoded media data.
|
|
7399
|
-
*/
|
|
7400
|
-
data: string;
|
|
7401
|
-
/**
|
|
7402
|
-
* IANA media type.
|
|
7403
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
7404
|
-
*/
|
|
7405
|
-
mediaType: string;
|
|
7406
|
-
/**
|
|
7407
|
-
* Optional filename of the file.
|
|
7408
|
-
*/
|
|
7409
|
-
filename?: string;
|
|
7410
|
-
/**
|
|
7411
|
-
* Provider-specific options.
|
|
7412
|
-
*/
|
|
7413
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7414
|
-
} | {
|
|
7415
|
-
type: 'file-url';
|
|
7416
|
-
/**
|
|
7417
|
-
* URL of the file.
|
|
7418
|
-
*/
|
|
7419
|
-
url: string;
|
|
7420
|
-
/**
|
|
7421
|
-
* Provider-specific options.
|
|
7422
|
-
*/
|
|
7423
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7424
|
-
} | {
|
|
7425
|
-
type: 'file-id';
|
|
7426
|
-
/**
|
|
7427
|
-
* ID of the file.
|
|
7428
|
-
*
|
|
7429
|
-
* If you use multiple providers, you need to
|
|
7430
|
-
* specify the provider specific ids using
|
|
7431
|
-
* the Record option. The key is the provider
|
|
7432
|
-
* name, e.g. 'openai' or 'anthropic'.
|
|
7433
|
-
*/
|
|
7434
|
-
fileId: string | Record<string, string>;
|
|
7435
|
-
/**
|
|
7436
|
-
* Provider-specific options.
|
|
7437
|
-
*/
|
|
7438
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7439
|
-
} | {
|
|
7440
|
-
/**
|
|
7441
|
-
* Images that are referenced using base64 encoded data.
|
|
7442
|
-
*/
|
|
7443
|
-
type: 'image-data';
|
|
7444
|
-
/**
|
|
7445
|
-
* Base-64 encoded image data.
|
|
7446
|
-
*/
|
|
7447
|
-
data: string;
|
|
7448
|
-
/**
|
|
7449
|
-
* IANA media type.
|
|
7450
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
7451
|
-
*/
|
|
7452
|
-
mediaType: string;
|
|
7453
|
-
/**
|
|
7454
|
-
* Provider-specific options.
|
|
7455
|
-
*/
|
|
7456
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7457
|
-
} | {
|
|
7458
|
-
/**
|
|
7459
|
-
* Images that are referenced using a URL.
|
|
7460
|
-
*/
|
|
7461
|
-
type: 'image-url';
|
|
7462
|
-
/**
|
|
7463
|
-
* URL of the image.
|
|
7464
|
-
*/
|
|
7465
|
-
url: string;
|
|
7466
|
-
/**
|
|
7467
|
-
* Provider-specific options.
|
|
7468
|
-
*/
|
|
7469
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7470
|
-
} | {
|
|
7471
|
-
/**
|
|
7472
|
-
* Images that are referenced using a provider file id.
|
|
7473
|
-
*/
|
|
7474
|
-
type: 'image-file-id';
|
|
7475
|
-
/**
|
|
7476
|
-
* Image that is referenced using a provider file id.
|
|
7477
|
-
*
|
|
7478
|
-
* If you use multiple providers, you need to
|
|
7479
|
-
* specify the provider specific ids using
|
|
7480
|
-
* the Record option. The key is the provider
|
|
7481
|
-
* name, e.g. 'openai' or 'anthropic'.
|
|
7482
|
-
*/
|
|
7483
|
-
fileId: string | Record<string, string>;
|
|
7484
|
-
/**
|
|
7485
|
-
* Provider-specific options.
|
|
7486
|
-
*/
|
|
7487
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7488
|
-
} | {
|
|
7489
|
-
/**
|
|
7490
|
-
* Custom content part. This can be used to implement
|
|
7491
|
-
* provider-specific content parts.
|
|
7492
|
-
*/
|
|
7493
|
-
type: 'custom';
|
|
7494
|
-
/**
|
|
7495
|
-
* Provider-specific options.
|
|
7496
|
-
*/
|
|
7497
|
-
providerOptions?: SharedV3ProviderOptions;
|
|
7498
|
-
}>;
|
|
6680
|
+
* The ID of the tool call that this result is associated with.
|
|
6681
|
+
*/
|
|
6682
|
+
toolCallId: string;
|
|
6683
|
+
/**
|
|
6684
|
+
* Name of the tool that generated this result.
|
|
6685
|
+
*/
|
|
6686
|
+
toolName: string;
|
|
6687
|
+
/**
|
|
6688
|
+
* Result of the tool call. This is a JSON-serializable object.
|
|
6689
|
+
*/
|
|
6690
|
+
result: NonNullable<JSONValue_2>;
|
|
6691
|
+
/**
|
|
6692
|
+
* Optional flag if the result is an error or an error message.
|
|
6693
|
+
*/
|
|
6694
|
+
isError?: boolean;
|
|
6695
|
+
/**
|
|
6696
|
+
* Whether the tool result is preliminary.
|
|
6697
|
+
*
|
|
6698
|
+
* Preliminary tool results replace each other, e.g. image previews.
|
|
6699
|
+
* There always has to be a final, non-preliminary tool result.
|
|
6700
|
+
*
|
|
6701
|
+
* If this flag is set to true, the tool result is preliminary.
|
|
6702
|
+
* If this flag is not set or is false, the tool result is not preliminary.
|
|
6703
|
+
*/
|
|
6704
|
+
preliminary?: boolean;
|
|
6705
|
+
/**
|
|
6706
|
+
* Whether the tool is dynamic, i.e. defined at runtime.
|
|
6707
|
+
* For example, MCP (Model Context Protocol) tools that are executed by the provider.
|
|
6708
|
+
*/
|
|
6709
|
+
dynamic?: boolean;
|
|
6710
|
+
/**
|
|
6711
|
+
* Additional provider-specific metadata for the tool result.
|
|
6712
|
+
*/
|
|
6713
|
+
providerMetadata?: SharedV3ProviderMetadata;
|
|
7499
6714
|
};
|
|
7500
6715
|
|
|
7501
6716
|
/**
|
|
7502
6717
|
* Result of a tool call.
|
|
7503
6718
|
*/
|
|
7504
|
-
declare type
|
|
6719
|
+
declare type LanguageModelV3ToolResultOutput = {
|
|
7505
6720
|
/**
|
|
7506
6721
|
* Text tool output that should be directly sent to the API.
|
|
7507
6722
|
*/
|
|
@@ -7510,14 +6725,14 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7510
6725
|
/**
|
|
7511
6726
|
* Provider-specific options.
|
|
7512
6727
|
*/
|
|
7513
|
-
providerOptions?:
|
|
6728
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7514
6729
|
} | {
|
|
7515
6730
|
type: 'json';
|
|
7516
|
-
value:
|
|
6731
|
+
value: JSONValue_2;
|
|
7517
6732
|
/**
|
|
7518
6733
|
* Provider-specific options.
|
|
7519
6734
|
*/
|
|
7520
|
-
providerOptions?:
|
|
6735
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7521
6736
|
} | {
|
|
7522
6737
|
/**
|
|
7523
6738
|
* Type when the user has denied the execution of the tool call.
|
|
@@ -7530,21 +6745,21 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7530
6745
|
/**
|
|
7531
6746
|
* Provider-specific options.
|
|
7532
6747
|
*/
|
|
7533
|
-
providerOptions?:
|
|
6748
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7534
6749
|
} | {
|
|
7535
6750
|
type: 'error-text';
|
|
7536
6751
|
value: string;
|
|
7537
6752
|
/**
|
|
7538
6753
|
* Provider-specific options.
|
|
7539
6754
|
*/
|
|
7540
|
-
providerOptions?:
|
|
6755
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7541
6756
|
} | {
|
|
7542
6757
|
type: 'error-json';
|
|
7543
|
-
value:
|
|
6758
|
+
value: JSONValue_2;
|
|
7544
6759
|
/**
|
|
7545
6760
|
* Provider-specific options.
|
|
7546
6761
|
*/
|
|
7547
|
-
providerOptions?:
|
|
6762
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7548
6763
|
} | {
|
|
7549
6764
|
type: 'content';
|
|
7550
6765
|
value: Array<{
|
|
@@ -7556,7 +6771,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7556
6771
|
/**
|
|
7557
6772
|
* Provider-specific options.
|
|
7558
6773
|
*/
|
|
7559
|
-
providerOptions?:
|
|
6774
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7560
6775
|
} | {
|
|
7561
6776
|
type: 'file-data';
|
|
7562
6777
|
/**
|
|
@@ -7575,7 +6790,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7575
6790
|
/**
|
|
7576
6791
|
* Provider-specific options.
|
|
7577
6792
|
*/
|
|
7578
|
-
providerOptions?:
|
|
6793
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7579
6794
|
} | {
|
|
7580
6795
|
type: 'file-url';
|
|
7581
6796
|
/**
|
|
@@ -7590,7 +6805,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7590
6805
|
/**
|
|
7591
6806
|
* Provider-specific options.
|
|
7592
6807
|
*/
|
|
7593
|
-
providerOptions?:
|
|
6808
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7594
6809
|
} | {
|
|
7595
6810
|
type: 'file-id';
|
|
7596
6811
|
/**
|
|
@@ -7605,7 +6820,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7605
6820
|
/**
|
|
7606
6821
|
* Provider-specific options.
|
|
7607
6822
|
*/
|
|
7608
|
-
providerOptions?:
|
|
6823
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7609
6824
|
} | {
|
|
7610
6825
|
/**
|
|
7611
6826
|
* Images that are referenced using base64 encoded data.
|
|
@@ -7623,7 +6838,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7623
6838
|
/**
|
|
7624
6839
|
* Provider-specific options.
|
|
7625
6840
|
*/
|
|
7626
|
-
providerOptions?:
|
|
6841
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7627
6842
|
} | {
|
|
7628
6843
|
/**
|
|
7629
6844
|
* Images that are referenced using a URL.
|
|
@@ -7636,7 +6851,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7636
6851
|
/**
|
|
7637
6852
|
* Provider-specific options.
|
|
7638
6853
|
*/
|
|
7639
|
-
providerOptions?:
|
|
6854
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7640
6855
|
} | {
|
|
7641
6856
|
/**
|
|
7642
6857
|
* Images that are referenced using a provider file id.
|
|
@@ -7654,7 +6869,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7654
6869
|
/**
|
|
7655
6870
|
* Provider-specific options.
|
|
7656
6871
|
*/
|
|
7657
|
-
providerOptions?:
|
|
6872
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7658
6873
|
} | {
|
|
7659
6874
|
/**
|
|
7660
6875
|
* Custom content part. This can be used to implement
|
|
@@ -7664,7 +6879,7 @@ declare type LanguageModelV3ToolResultOutput_2 = {
|
|
|
7664
6879
|
/**
|
|
7665
6880
|
* Provider-specific options.
|
|
7666
6881
|
*/
|
|
7667
|
-
providerOptions?:
|
|
6882
|
+
providerOptions?: SharedV3ProviderOptions;
|
|
7668
6883
|
}>;
|
|
7669
6884
|
};
|
|
7670
6885
|
|
|
@@ -7693,31 +6908,6 @@ declare interface LanguageModelV3ToolResultPart {
|
|
|
7693
6908
|
providerOptions?: SharedV3ProviderOptions;
|
|
7694
6909
|
}
|
|
7695
6910
|
|
|
7696
|
-
/**
|
|
7697
|
-
* Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
|
|
7698
|
-
*/
|
|
7699
|
-
declare interface LanguageModelV3ToolResultPart_2 {
|
|
7700
|
-
type: 'tool-result';
|
|
7701
|
-
/**
|
|
7702
|
-
* ID of the tool call that this result is associated with.
|
|
7703
|
-
*/
|
|
7704
|
-
toolCallId: string;
|
|
7705
|
-
/**
|
|
7706
|
-
* Name of the tool that generated this result.
|
|
7707
|
-
*/
|
|
7708
|
-
toolName: string;
|
|
7709
|
-
/**
|
|
7710
|
-
* Result of the tool call.
|
|
7711
|
-
*/
|
|
7712
|
-
output: LanguageModelV3ToolResultOutput_2;
|
|
7713
|
-
/**
|
|
7714
|
-
* Additional provider-specific options. They are passed through
|
|
7715
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
7716
|
-
* functionality that can be fully encapsulated in the provider.
|
|
7717
|
-
*/
|
|
7718
|
-
providerOptions?: SharedV3ProviderOptions_2;
|
|
7719
|
-
}
|
|
7720
|
-
|
|
7721
6911
|
/**
|
|
7722
6912
|
* Usage information for a language model call.
|
|
7723
6913
|
*/
|
|
@@ -7769,57 +6959,6 @@ declare type LanguageModelV3Usage = {
|
|
|
7769
6959
|
raw?: JSONObject;
|
|
7770
6960
|
};
|
|
7771
6961
|
|
|
7772
|
-
/**
|
|
7773
|
-
* Usage information for a language model call.
|
|
7774
|
-
*/
|
|
7775
|
-
declare type LanguageModelV3Usage_2 = {
|
|
7776
|
-
/**
|
|
7777
|
-
* Information about the input tokens.
|
|
7778
|
-
*/
|
|
7779
|
-
inputTokens: {
|
|
7780
|
-
/**
|
|
7781
|
-
* The total number of input (prompt) tokens used.
|
|
7782
|
-
*/
|
|
7783
|
-
total: number | undefined;
|
|
7784
|
-
/**
|
|
7785
|
-
* The number of non-cached input (prompt) tokens used.
|
|
7786
|
-
*/
|
|
7787
|
-
noCache: number | undefined;
|
|
7788
|
-
/**
|
|
7789
|
-
* The number of cached input (prompt) tokens read.
|
|
7790
|
-
*/
|
|
7791
|
-
cacheRead: number | undefined;
|
|
7792
|
-
/**
|
|
7793
|
-
* The number of cached input (prompt) tokens written.
|
|
7794
|
-
*/
|
|
7795
|
-
cacheWrite: number | undefined;
|
|
7796
|
-
};
|
|
7797
|
-
/**
|
|
7798
|
-
* Information about the output tokens.
|
|
7799
|
-
*/
|
|
7800
|
-
outputTokens: {
|
|
7801
|
-
/**
|
|
7802
|
-
* The total number of output (completion) tokens used.
|
|
7803
|
-
*/
|
|
7804
|
-
total: number | undefined;
|
|
7805
|
-
/**
|
|
7806
|
-
* The number of text tokens used.
|
|
7807
|
-
*/
|
|
7808
|
-
text: number | undefined;
|
|
7809
|
-
/**
|
|
7810
|
-
* The number of reasoning tokens used.
|
|
7811
|
-
*/
|
|
7812
|
-
reasoning: number | undefined;
|
|
7813
|
-
};
|
|
7814
|
-
/**
|
|
7815
|
-
* Raw usage information from the provider.
|
|
7816
|
-
*
|
|
7817
|
-
* This is the usage information in the shape that the provider returns.
|
|
7818
|
-
* It can include additional information that is not part of the standard usage information.
|
|
7819
|
-
*/
|
|
7820
|
-
raw?: JSONObject_2;
|
|
7821
|
-
};
|
|
7822
|
-
|
|
7823
6962
|
/**
|
|
7824
6963
|
* Check if the last message is an assistant message with completed tool call approvals.
|
|
7825
6964
|
* The last step of the message must have at least one tool approval response and
|
|
@@ -7985,7 +7124,7 @@ export declare class MessageConversionError extends AISDKError {
|
|
|
7985
7124
|
}
|
|
7986
7125
|
|
|
7987
7126
|
export declare class MissingToolResultsError extends AISDKError {
|
|
7988
|
-
private readonly [symbol$
|
|
7127
|
+
private readonly [symbol$d_2];
|
|
7989
7128
|
readonly toolCallIds: string[];
|
|
7990
7129
|
constructor({ toolCallIds }: {
|
|
7991
7130
|
toolCallIds: string[];
|
|
@@ -8021,7 +7160,7 @@ export declare class NoContentGeneratedError extends AISDKError {
|
|
|
8021
7160
|
* - The model generated a response that could not be parsed.
|
|
8022
7161
|
*/
|
|
8023
7162
|
export declare class NoImageGeneratedError extends AISDKError {
|
|
8024
|
-
private readonly [symbol$
|
|
7163
|
+
private readonly [symbol$c_2];
|
|
8025
7164
|
/**
|
|
8026
7165
|
* The response metadata for each call.
|
|
8027
7166
|
*/
|
|
@@ -8159,7 +7298,7 @@ export declare class NoTranscriptGeneratedError extends AISDKError {
|
|
|
8159
7298
|
}
|
|
8160
7299
|
|
|
8161
7300
|
export declare class NoVideoGeneratedError extends AISDKError {
|
|
8162
|
-
private readonly [symbol$
|
|
7301
|
+
private readonly [symbol$7_2];
|
|
8163
7302
|
readonly responses: Array<VideoModelResponseMetadata>;
|
|
8164
7303
|
constructor({ message, cause, responses, }: {
|
|
8165
7304
|
message?: string;
|
|
@@ -8629,7 +7768,7 @@ declare const parallelSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFact
|
|
|
8629
7768
|
declare function parseJSON(options: {
|
|
8630
7769
|
text: string;
|
|
8631
7770
|
schema?: undefined;
|
|
8632
|
-
}): Promise<
|
|
7771
|
+
}): Promise<JSONValue_2>;
|
|
8633
7772
|
|
|
8634
7773
|
/**
|
|
8635
7774
|
* Parses a JSON string into a strongly-typed object using the provided schema.
|
|
@@ -8669,7 +7808,7 @@ declare type ParseResult<T> = {
|
|
|
8669
7808
|
rawValue: unknown;
|
|
8670
7809
|
} | {
|
|
8671
7810
|
success: false;
|
|
8672
|
-
error:
|
|
7811
|
+
error: JSONParseError | TypeValidationError;
|
|
8673
7812
|
rawValue: unknown;
|
|
8674
7813
|
};
|
|
8675
7814
|
|
|
@@ -8885,7 +8024,7 @@ declare const postFormDataToApi: <T>({ url, headers, formData, failedResponseHan
|
|
|
8885
8024
|
url: string;
|
|
8886
8025
|
headers?: Record<string, string | undefined>;
|
|
8887
8026
|
formData: FormData;
|
|
8888
|
-
failedResponseHandler: ResponseHandler<
|
|
8027
|
+
failedResponseHandler: ResponseHandler<APICallError>;
|
|
8889
8028
|
successfulResponseHandler: ResponseHandler<T>;
|
|
8890
8029
|
abortSignal?: AbortSignal;
|
|
8891
8030
|
fetch?: FetchFunction;
|
|
@@ -8899,7 +8038,7 @@ declare const postJsonToApi: <T>({ url, headers, body, failedResponseHandler, su
|
|
|
8899
8038
|
url: string;
|
|
8900
8039
|
headers?: Record<string, string | undefined>;
|
|
8901
8040
|
body: unknown;
|
|
8902
|
-
failedResponseHandler: ResponseHandler<
|
|
8041
|
+
failedResponseHandler: ResponseHandler<APICallError>;
|
|
8903
8042
|
successfulResponseHandler: ResponseHandler<T>;
|
|
8904
8043
|
abortSignal?: AbortSignal;
|
|
8905
8044
|
fetch?: FetchFunction;
|
|
@@ -9159,7 +8298,7 @@ export declare type ProviderMetadata = SharedV3ProviderMetadata;
|
|
|
9159
8298
|
* They are passed through to the provider from the AI SDK and enable
|
|
9160
8299
|
* provider-specific functionality that can be fully encapsulated in the provider.
|
|
9161
8300
|
*/
|
|
9162
|
-
declare type ProviderOptions =
|
|
8301
|
+
declare type ProviderOptions = SharedV3ProviderOptions;
|
|
9163
8302
|
|
|
9164
8303
|
export declare interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV3> = Record<string, ProviderV3>, SEPARATOR extends string = ':'> {
|
|
9165
8304
|
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV3;
|
|
@@ -9727,7 +8866,7 @@ declare type RetryDelayProvider = ({ error, exponentialBackoffDelay, }: {
|
|
|
9727
8866
|
}) => number;
|
|
9728
8867
|
|
|
9729
8868
|
export declare class RetryError extends AISDKError {
|
|
9730
|
-
private readonly [symbol$
|
|
8869
|
+
private readonly [symbol$1_2];
|
|
9731
8870
|
readonly reason: RetryErrorReason_2;
|
|
9732
8871
|
readonly lastError: unknown;
|
|
9733
8872
|
readonly errors: Array<unknown>;
|
|
@@ -9773,7 +8912,7 @@ declare const retryWithExponentialBackoff: ({ maxRetries, initialDelayInMs, back
|
|
|
9773
8912
|
declare function safeParseJSON(options: {
|
|
9774
8913
|
text: string;
|
|
9775
8914
|
schema?: undefined;
|
|
9776
|
-
}): Promise<ParseResult<
|
|
8915
|
+
}): Promise<ParseResult<JSONValue_2>>;
|
|
9777
8916
|
|
|
9778
8917
|
/**
|
|
9779
8918
|
* Safely parses a JSON string into a strongly-typed object, using a provided schema to validate the object.
|
|
@@ -9801,14 +8940,14 @@ declare function safeParseJSON<T>(options: {
|
|
|
9801
8940
|
declare function safeValidateTypes<OBJECT>({ value, schema, context, }: {
|
|
9802
8941
|
value: unknown;
|
|
9803
8942
|
schema: FlexibleSchema<OBJECT>;
|
|
9804
|
-
context?:
|
|
8943
|
+
context?: TypeValidationContext;
|
|
9805
8944
|
}): Promise<{
|
|
9806
8945
|
success: true;
|
|
9807
8946
|
value: OBJECT;
|
|
9808
8947
|
rawValue: unknown;
|
|
9809
8948
|
} | {
|
|
9810
8949
|
success: false;
|
|
9811
|
-
error:
|
|
8950
|
+
error: TypeValidationError;
|
|
9812
8951
|
rawValue: unknown;
|
|
9813
8952
|
}>;
|
|
9814
8953
|
|
|
@@ -9943,29 +9082,6 @@ declare type SharedV3Headers = Record<string, string>;
|
|
|
9943
9082
|
*/
|
|
9944
9083
|
declare type SharedV3ProviderMetadata = Record<string, JSONObject>;
|
|
9945
9084
|
|
|
9946
|
-
/**
|
|
9947
|
-
* Additional provider-specific metadata.
|
|
9948
|
-
* Metadata are additional outputs from the provider.
|
|
9949
|
-
* They are passed through to the provider from the AI SDK
|
|
9950
|
-
* and enable provider-specific functionality
|
|
9951
|
-
* that can be fully encapsulated in the provider.
|
|
9952
|
-
*
|
|
9953
|
-
* This enables us to quickly ship provider-specific functionality
|
|
9954
|
-
* without affecting the core AI SDK.
|
|
9955
|
-
*
|
|
9956
|
-
* The outer record is keyed by the provider name, and the inner
|
|
9957
|
-
* record is keyed by the provider-specific metadata key.
|
|
9958
|
-
*
|
|
9959
|
-
* ```ts
|
|
9960
|
-
* {
|
|
9961
|
-
* "anthropic": {
|
|
9962
|
-
* "cacheControl": { "type": "ephemeral" }
|
|
9963
|
-
* }
|
|
9964
|
-
* }
|
|
9965
|
-
* ```
|
|
9966
|
-
*/
|
|
9967
|
-
declare type SharedV3ProviderMetadata_2 = Record<string, JSONObject_2>;
|
|
9968
|
-
|
|
9969
9085
|
/**
|
|
9970
9086
|
* Additional provider-specific options.
|
|
9971
9087
|
* Options are additional input to the provider.
|
|
@@ -9989,29 +9105,6 @@ declare type SharedV3ProviderMetadata_2 = Record<string, JSONObject_2>;
|
|
|
9989
9105
|
*/
|
|
9990
9106
|
declare type SharedV3ProviderOptions = Record<string, JSONObject>;
|
|
9991
9107
|
|
|
9992
|
-
/**
|
|
9993
|
-
* Additional provider-specific options.
|
|
9994
|
-
* Options are additional input to the provider.
|
|
9995
|
-
* They are passed through to the provider from the AI SDK
|
|
9996
|
-
* and enable provider-specific functionality
|
|
9997
|
-
* that can be fully encapsulated in the provider.
|
|
9998
|
-
*
|
|
9999
|
-
* This enables us to quickly ship provider-specific functionality
|
|
10000
|
-
* without affecting the core AI SDK.
|
|
10001
|
-
*
|
|
10002
|
-
* The outer record is keyed by the provider name, and the inner
|
|
10003
|
-
* record is keyed by the provider-specific metadata key.
|
|
10004
|
-
*
|
|
10005
|
-
* ```ts
|
|
10006
|
-
* {
|
|
10007
|
-
* "anthropic": {
|
|
10008
|
-
* "cacheControl": { "type": "ephemeral" }
|
|
10009
|
-
* }
|
|
10010
|
-
* }
|
|
10011
|
-
* ```
|
|
10012
|
-
*/
|
|
10013
|
-
declare type SharedV3ProviderOptions_2 = Record<string, JSONObject_2>;
|
|
10014
|
-
|
|
10015
9108
|
/**
|
|
10016
9109
|
* Warning from the model.
|
|
10017
9110
|
*
|
|
@@ -10055,49 +9148,6 @@ declare type SharedV3Warning = {
|
|
|
10055
9148
|
message: string;
|
|
10056
9149
|
};
|
|
10057
9150
|
|
|
10058
|
-
/**
|
|
10059
|
-
* Warning from the model.
|
|
10060
|
-
*
|
|
10061
|
-
* For example, that certain features are unsupported or compatibility
|
|
10062
|
-
* functionality is used (which might lead to suboptimal results).
|
|
10063
|
-
*/
|
|
10064
|
-
declare type SharedV3Warning_2 = {
|
|
10065
|
-
/**
|
|
10066
|
-
* A feature is not supported by the model.
|
|
10067
|
-
*/
|
|
10068
|
-
type: 'unsupported';
|
|
10069
|
-
/**
|
|
10070
|
-
* The feature that is not supported.
|
|
10071
|
-
*/
|
|
10072
|
-
feature: string;
|
|
10073
|
-
/**
|
|
10074
|
-
* Additional details about the warning.
|
|
10075
|
-
*/
|
|
10076
|
-
details?: string;
|
|
10077
|
-
} | {
|
|
10078
|
-
/**
|
|
10079
|
-
* A compatibility feature is used that might lead to suboptimal results.
|
|
10080
|
-
*/
|
|
10081
|
-
type: 'compatibility';
|
|
10082
|
-
/**
|
|
10083
|
-
* The feature that is used in a compatibility mode.
|
|
10084
|
-
*/
|
|
10085
|
-
feature: string;
|
|
10086
|
-
/**
|
|
10087
|
-
* Additional details about the warning.
|
|
10088
|
-
*/
|
|
10089
|
-
details?: string;
|
|
10090
|
-
} | {
|
|
10091
|
-
/**
|
|
10092
|
-
* Other warning.
|
|
10093
|
-
*/
|
|
10094
|
-
type: 'other';
|
|
10095
|
-
/**
|
|
10096
|
-
* The message of the warning.
|
|
10097
|
-
*/
|
|
10098
|
-
message: string;
|
|
10099
|
-
};
|
|
10100
|
-
|
|
10101
9151
|
declare type ShouldRetryFunction = (error: unknown) => boolean | Promise<boolean>;
|
|
10102
9152
|
|
|
10103
9153
|
/**
|
|
@@ -11178,7 +10228,7 @@ declare class StreamingToolCallTracker<DELTA extends StreamingToolCallDelta = St
|
|
|
11178
10228
|
private finishToolCall;
|
|
11179
10229
|
}
|
|
11180
10230
|
|
|
11181
|
-
declare type StreamingToolCallTrackerController = Pick<TransformStreamDefaultController<
|
|
10231
|
+
declare type StreamingToolCallTrackerController = Pick<TransformStreamDefaultController<LanguageModelV3StreamPart>, 'enqueue'>;
|
|
11182
10232
|
|
|
11183
10233
|
declare interface StreamingToolCallTrackerOptions<DELTA extends StreamingToolCallDelta = StreamingToolCallDelta> {
|
|
11184
10234
|
/**
|
|
@@ -11198,11 +10248,11 @@ declare interface StreamingToolCallTrackerOptions<DELTA extends StreamingToolCal
|
|
|
11198
10248
|
* Extract provider-specific metadata from a tool call delta.
|
|
11199
10249
|
* Called once when a new tool call is detected.
|
|
11200
10250
|
*/
|
|
11201
|
-
extractMetadata?: (delta: DELTA) =>
|
|
10251
|
+
extractMetadata?: (delta: DELTA) => SharedV3ProviderMetadata | undefined;
|
|
11202
10252
|
/**
|
|
11203
10253
|
* Build the `providerMetadata` object for a `tool-call` event.
|
|
11204
10254
|
*/
|
|
11205
|
-
buildToolCallProviderMetadata?: (metadata:
|
|
10255
|
+
buildToolCallProviderMetadata?: (metadata: SharedV3ProviderMetadata | undefined) => SharedV3ProviderMetadata | undefined;
|
|
11206
10256
|
}
|
|
11207
10257
|
|
|
11208
10258
|
/**
|
|
@@ -12023,8 +11073,6 @@ declare const symbol$1: unique symbol;
|
|
|
12023
11073
|
|
|
12024
11074
|
declare const symbol$1_2: unique symbol;
|
|
12025
11075
|
|
|
12026
|
-
declare const symbol$1_3: unique symbol;
|
|
12027
|
-
|
|
12028
11076
|
declare const symbol$2: unique symbol;
|
|
12029
11077
|
|
|
12030
11078
|
declare const symbol$2_2: unique symbol;
|
|
@@ -12049,8 +11097,6 @@ declare const symbol$7: unique symbol;
|
|
|
12049
11097
|
|
|
12050
11098
|
declare const symbol$7_2: unique symbol;
|
|
12051
11099
|
|
|
12052
|
-
declare const symbol$7_3: unique symbol;
|
|
12053
|
-
|
|
12054
11100
|
declare const symbol$8: unique symbol;
|
|
12055
11101
|
|
|
12056
11102
|
declare const symbol$8_2: unique symbol;
|
|
@@ -12069,14 +11115,10 @@ declare const symbol$c: unique symbol;
|
|
|
12069
11115
|
|
|
12070
11116
|
declare const symbol$c_2: unique symbol;
|
|
12071
11117
|
|
|
12072
|
-
declare const symbol$c_3: unique symbol;
|
|
12073
|
-
|
|
12074
11118
|
declare const symbol$d: unique symbol;
|
|
12075
11119
|
|
|
12076
11120
|
declare const symbol$d_2: unique symbol;
|
|
12077
11121
|
|
|
12078
|
-
declare const symbol$d_3: unique symbol;
|
|
12079
|
-
|
|
12080
11122
|
declare const symbol$e: unique symbol;
|
|
12081
11123
|
|
|
12082
11124
|
declare const symbol$f: unique symbol;
|
|
@@ -12329,7 +11371,7 @@ export declare type TimeoutConfiguration = number | {
|
|
|
12329
11371
|
*
|
|
12330
11372
|
* The tool can also contain an optional execute function for the actual execution function of the tool.
|
|
12331
11373
|
*/
|
|
12332
|
-
export declare type Tool<INPUT extends
|
|
11374
|
+
export declare type Tool<INPUT extends JSONValue_2 | unknown | never = any, OUTPUT extends JSONValue_2 | unknown | never = any> = {
|
|
12333
11375
|
/**
|
|
12334
11376
|
* An optional description of what the tool does.
|
|
12335
11377
|
* Will be used by the language model to decide whether to use the tool.
|
|
@@ -12355,7 +11397,7 @@ export declare type Tool<INPUT extends JSONValue_3 | unknown | never = any, OUTP
|
|
|
12355
11397
|
* and UI message parts. This is useful for sources of dynamic tools (e.g.
|
|
12356
11398
|
* an MCP server) to identify themselves.
|
|
12357
11399
|
*/
|
|
12358
|
-
metadata?:
|
|
11400
|
+
metadata?: JSONObject;
|
|
12359
11401
|
/**
|
|
12360
11402
|
* The schema of the input that the tool expects.
|
|
12361
11403
|
* The language model will use this to generate the input.
|
|
@@ -12983,7 +12025,7 @@ declare type ToolResultOutput = {
|
|
|
12983
12025
|
providerOptions?: ProviderOptions;
|
|
12984
12026
|
} | {
|
|
12985
12027
|
type: 'json';
|
|
12986
|
-
value:
|
|
12028
|
+
value: JSONValue_2;
|
|
12987
12029
|
/**
|
|
12988
12030
|
* Provider-specific options.
|
|
12989
12031
|
*/
|
|
@@ -13010,7 +12052,7 @@ declare type ToolResultOutput = {
|
|
|
13010
12052
|
providerOptions?: ProviderOptions;
|
|
13011
12053
|
} | {
|
|
13012
12054
|
type: 'error-json';
|
|
13013
|
-
value:
|
|
12055
|
+
value: JSONValue_2;
|
|
13014
12056
|
/**
|
|
13015
12057
|
* Provider-specific options.
|
|
13016
12058
|
*/
|
|
@@ -13643,21 +12685,6 @@ declare interface TypeValidationContext {
|
|
|
13643
12685
|
entityId?: string;
|
|
13644
12686
|
}
|
|
13645
12687
|
|
|
13646
|
-
declare interface TypeValidationContext_2 {
|
|
13647
|
-
/**
|
|
13648
|
-
* Field path in dot notation (e.g., "message.metadata", "message.parts[3].data")
|
|
13649
|
-
*/
|
|
13650
|
-
field?: string;
|
|
13651
|
-
/**
|
|
13652
|
-
* Entity name (e.g., tool name, data type name)
|
|
13653
|
-
*/
|
|
13654
|
-
entityName?: string;
|
|
13655
|
-
/**
|
|
13656
|
-
* Entity identifier (e.g., message ID, tool call ID)
|
|
13657
|
-
*/
|
|
13658
|
-
entityId?: string;
|
|
13659
|
-
}
|
|
13660
|
-
|
|
13661
12688
|
export declare class TypeValidationError extends AISDKError {
|
|
13662
12689
|
private readonly [symbol$1];
|
|
13663
12690
|
readonly value: unknown;
|
|
@@ -13686,34 +12713,6 @@ export declare class TypeValidationError extends AISDKError {
|
|
|
13686
12713
|
}): TypeValidationError;
|
|
13687
12714
|
}
|
|
13688
12715
|
|
|
13689
|
-
declare class TypeValidationError_2 extends AISDKError_2 {
|
|
13690
|
-
private readonly [symbol$1_2];
|
|
13691
|
-
readonly value: unknown;
|
|
13692
|
-
readonly context?: TypeValidationContext_2;
|
|
13693
|
-
constructor({ value, cause, context, }: {
|
|
13694
|
-
value: unknown;
|
|
13695
|
-
cause: unknown;
|
|
13696
|
-
context?: TypeValidationContext_2;
|
|
13697
|
-
});
|
|
13698
|
-
static isInstance(error: unknown): error is TypeValidationError_2;
|
|
13699
|
-
/**
|
|
13700
|
-
* Wraps an error into a TypeValidationError.
|
|
13701
|
-
* If the cause is already a TypeValidationError with the same value and context, it returns the cause.
|
|
13702
|
-
* Otherwise, it creates a new TypeValidationError.
|
|
13703
|
-
*
|
|
13704
|
-
* @param {Object} params - The parameters for wrapping the error.
|
|
13705
|
-
* @param {unknown} params.value - The value that failed validation.
|
|
13706
|
-
* @param {unknown} params.cause - The original error or cause of the validation failure.
|
|
13707
|
-
* @param {TypeValidationContext} params.context - Optional context about what is being validated.
|
|
13708
|
-
* @returns {TypeValidationError} A TypeValidationError instance.
|
|
13709
|
-
*/
|
|
13710
|
-
static wrap({ value, cause, context, }: {
|
|
13711
|
-
value: unknown;
|
|
13712
|
-
cause: unknown;
|
|
13713
|
-
context?: TypeValidationContext_2;
|
|
13714
|
-
}): TypeValidationError_2;
|
|
13715
|
-
}
|
|
13716
|
-
|
|
13717
12716
|
export declare const UI_MESSAGE_STREAM_HEADERS: {
|
|
13718
12717
|
'content-type': string;
|
|
13719
12718
|
'cache-control': string;
|
|
@@ -14287,7 +13286,7 @@ declare function validateDownloadUrl(url: string): void;
|
|
|
14287
13286
|
declare function validateTypes<OBJECT>({ value, schema, context, }: {
|
|
14288
13287
|
value: unknown;
|
|
14289
13288
|
schema: FlexibleSchema<OBJECT>;
|
|
14290
|
-
context?:
|
|
13289
|
+
context?: TypeValidationContext;
|
|
14291
13290
|
}): Promise<OBJECT>;
|
|
14292
13291
|
|
|
14293
13292
|
/**
|
|
@@ -14490,11 +13489,12 @@ declare type VideoModelV3CallOptions = {
|
|
|
14490
13489
|
n: number;
|
|
14491
13490
|
/**
|
|
14492
13491
|
* Aspect ratio of the videos to generate.
|
|
14493
|
-
* Must have the format `{width}:{height}
|
|
13492
|
+
* Must have the format `{width}:{height}`, or `'adaptive'` to inherit the
|
|
13493
|
+
* ratio from the input media.
|
|
14494
13494
|
* `undefined` will use the provider's default aspect ratio.
|
|
14495
13495
|
* Common values: '16:9', '9:16', '1:1', '21:9', '4:3'
|
|
14496
13496
|
*/
|
|
14497
|
-
aspectRatio: `${number}:${number}` | undefined;
|
|
13497
|
+
aspectRatio: `${number}:${number}` | 'adaptive' | undefined;
|
|
14498
13498
|
/**
|
|
14499
13499
|
* Resolution of the video to generate.
|
|
14500
13500
|
* Format: `{width}x{height}` (e.g., '1280x720', '1920x1080')
|
|
@@ -14759,5 +13759,5 @@ export declare function zodSchema<OBJECT>(zodSchema: z4.core.$ZodType<OBJECT, an
|
|
|
14759
13759
|
}): Schema<OBJECT>;
|
|
14760
13760
|
|
|
14761
13761
|
export { }
|
|
14762
|
-
export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider,
|
|
14763
|
-
export { EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, EMBEDDING_MODEL_PROVIDER_OPTIONS_TRANSFORMER, schemaSymbol, symbol$1, symbol$1_2, symbol$
|
|
13762
|
+
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, PrepareStepCallSettings as PrepareStepCallSettings, ResponseMessage as ResponseMessage, LanguageModelV3ToolCall as LanguageModelV3ToolCall, GenerateTextIncludeSettings as GenerateTextIncludeSettings, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, 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 };
|
|
13763
|
+
export { EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, EMBEDDING_MODEL_PROVIDER_OPTIONS_TRANSFORMER, 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$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 };
|