ai 7.0.127 → 7.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/index.d.ts +230 -155
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +386 -209
  5. package/dist/index.js.map +1 -1
  6. package/dist/internal/index.d.ts +288 -70
  7. package/dist/internal/index.d.ts.map +1 -1
  8. package/dist/internal/index.js +407 -76
  9. package/dist/internal/index.js.map +1 -1
  10. package/dist/test/index.d.ts +25 -17
  11. package/dist/test/index.d.ts.map +1 -1
  12. package/dist/test/index.js +27 -21
  13. package/dist/test/index.js.map +1 -1
  14. package/docs/02-foundations/06-provider-options.mdx +11 -10
  15. package/docs/02-getting-started/03-nextjs-pages-router.mdx +1 -1
  16. package/docs/02-getting-started/07-expo.mdx +1 -1
  17. package/docs/03-agents/02-building-agents.mdx +16 -11
  18. package/docs/03-agents/07-workflow-agent.mdx +83 -15
  19. package/docs/03-ai-sdk-core/16-mcp-tools.mdx +44 -0
  20. package/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +18 -14
  21. package/docs/03-ai-sdk-core/25-settings.mdx +3 -2
  22. package/docs/03-ai-sdk-core/26-reasoning.mdx +12 -5
  23. package/docs/03-ai-sdk-core/{32-evaluation.mdx → 32-decisions.mdx} +64 -67
  24. package/docs/03-ai-sdk-core/35-image-generation.mdx +3 -1
  25. package/docs/03-ai-sdk-core/45-provider-management.mdx +8 -8
  26. package/docs/03-ai-sdk-core/60-telemetry.mdx +40 -31
  27. package/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +21 -22
  28. package/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +2 -2
  29. package/docs/04-ai-sdk-ui/21-error-handling.mdx +28 -3
  30. package/docs/06-advanced/09-multistep-interfaces.mdx +1 -1
  31. package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +2 -2
  32. package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +2 -2
  33. package/docs/07-reference/01-ai-sdk-core/14-decide.mdx +74 -0
  34. package/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +58 -4
  35. package/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +11 -11
  36. package/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +9 -9
  37. package/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +24 -8
  38. package/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +1 -1
  39. package/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +1 -0
  40. package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +39 -2
  41. package/docs/07-reference/05-ai-sdk-errors/ai-decision-unsupported-question-type-error.mdx +31 -0
  42. package/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +3 -3
  43. package/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +3 -3
  44. package/docs/08-migration-guides/23-migration-guide-7-0.mdx +1 -1
  45. package/docs/08-migration-guides/29-migration-guide-4-0.mdx +1 -1
  46. package/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +2 -2
  47. package/package.json +15 -15
  48. package/src/decide/decide-events.ts +129 -0
  49. package/src/{evaluate/evaluate.ts → decide/decide.ts} +36 -38
  50. package/src/decide/decision-provider.ts +11 -0
  51. package/src/decide/decision-result.ts +39 -0
  52. package/src/decide/index.ts +64 -0
  53. package/src/{evaluate → decide}/restricted-telemetry-dispatcher.ts +7 -7
  54. package/src/{evaluate/validate-evaluation.ts → decide/validate-decision.ts} +9 -9
  55. package/src/error/index.ts +10 -1
  56. package/src/generate-object/generate-object.ts +10 -0
  57. package/src/generate-object/stream-object.ts +10 -0
  58. package/src/generate-speech/generated-audio-file.ts +5 -4
  59. package/src/generate-speech/index.ts +13 -1
  60. package/src/generate-text/default-generate-text-result.ts +127 -0
  61. package/src/generate-text/generate-text.ts +5 -123
  62. package/src/generate-text/tool-approval-signature.ts +7 -4
  63. package/src/global.ts +3 -2
  64. package/src/index.ts +1 -1
  65. package/src/logger/deprecations.ts +72 -0
  66. package/src/logger/log-warnings.ts +25 -3
  67. package/src/middleware/extract-reasoning-middleware.ts +25 -6
  68. package/src/model/as-language-model-v3.ts +4 -0
  69. package/src/model/resolve-model.ts +45 -14
  70. package/src/prompt/convert-to-language-model-prompt.ts +7 -1
  71. package/src/realtime/encode-realtime-frame.ts +7 -2
  72. package/src/registry/custom-provider.ts +38 -26
  73. package/src/registry/index.ts +13 -1
  74. package/src/registry/no-such-provider-error.ts +2 -0
  75. package/src/registry/provider-registry.ts +56 -29
  76. package/src/telemetry/create-telemetry-dispatcher.ts +17 -5
  77. package/src/telemetry/telemetry.ts +35 -19
  78. package/src/telemetry/tracing-channel.ts +1 -1
  79. package/src/test/decision-mock-model-v4.ts +35 -0
  80. package/src/transcribe/index.ts +13 -1
  81. package/src/transcribe/transcribe.ts +1 -1
  82. package/src/types/index.ts +1 -0
  83. package/src/types/language-model.ts +9 -1
  84. package/src/types/usage.ts +21 -0
  85. package/src/ui/chat.ts +25 -9
  86. package/src/ui/convert-to-model-messages.ts +40 -8
  87. package/src/ui/http-chat-transport.ts +5 -3
  88. package/src/ui/process-text-stream.ts +5 -1
  89. package/src/ui/process-ui-message-stream.ts +21 -0
  90. package/src/ui/text-stream-chat-transport.ts +3 -1
  91. package/src/ui/ui-messages.ts +8 -0
  92. package/src/ui/unavailable-tool.ts +17 -0
  93. package/src/ui/validate-ui-messages.ts +10 -2
  94. package/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +0 -74
  95. package/docs/07-reference/05-ai-sdk-errors/ai-evaluation-unsupported-question-type-error.mdx +0 -31
  96. package/src/evaluate/evaluate-events.ts +0 -131
  97. package/src/evaluate/evaluation-provider.ts +0 -6
  98. package/src/evaluate/evaluation-result.ts +0 -39
  99. package/src/evaluate/index.ts +0 -13
  100. package/src/test/evaluation-mock-model-v4.ts +0 -27
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { GatewayAsyncJobMetadata, GatewayModelId, GatewayModelId as GatewayModelId$1, GatewayProviderMetadata, createGateway, gateway } from "@ai-sdk/gateway";
2
2
  import { Arrayable, AssistantContent, AssistantModelMessage, AssistantModelMessage as AssistantModelMessage$1, Context, DataContent, DataContent as DataContent$1, DownloadError, Experimental_SandboxProcess, Experimental_SandboxSession, Experimental_SandboxSession as Experimental_SandboxSession$1, Experimental_ToolCallerTool, Experimental_ToolCallerTool as Experimental_ToolCallerTool$1, FetchFunction, FilePart, FilePart as FilePart$1, FlexibleSchema, FlexibleSchema as FlexibleSchema$1, HasRequiredKey, IdGenerator, IdGenerator as IdGenerator$1, ImagePart, InferSchema, InferSchema as InferSchema$1, InferToolContext, InferToolInput, InferToolInput as InferToolInput$1, InferToolOutput, InferToolOutput as InferToolOutput$1, InferToolSetContext, MaybePromiseLike, ModelMessage, ModelMessage as ModelMessage$1, ProviderOptions, ReasoningFilePart, ReasoningPart, Resolvable, Schema, SystemModelMessage, SystemModelMessage as SystemModelMessage$1, TextPart, TextPart as TextPart$1, Tool, Tool as Tool$1, ToolApprovalRequest, ToolApprovalResponse, ToolCall, ToolCallPart, ToolContent, ToolExecuteFunction, ToolExecutionOptions, ToolExecutionOptions as ToolExecutionOptions$1, ToolModelMessage, ToolModelMessage as ToolModelMessage$1, ToolResultPart, ToolSet, ToolSet as ToolSet$1, UserContent, UserModelMessage, UserModelMessage as UserModelMessage$1, asSchema, createIdGenerator, dynamicTool, experimental_toolCaller, generateId as generateId$1, jsonSchema, parseJsonEventStream, tool as tool$1, zodSchema } from "@ai-sdk/provider-utils";
3
- import { AISDKError, AISDKError as AISDKError$1, APICallError, EmbeddingModelV2, EmbeddingModelV3, EmbeddingModelV4, EmbeddingModelV4CallOptions, EmbeddingModelV4Embedding, EmbeddingModelV4Middleware, EmptyResponseBodyError, Experimental_BatchV4, Experimental_BatchV4Error, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, Experimental_BatchV4Status, Experimental_EvaluationModelV4, Experimental_EvaluationModelV4CallOptions, Experimental_EvaluationModelV4Question, Experimental_EvaluationModelV4Result, Experimental_EvaluationUnsupportedQuestionTypeError, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ToolDefinition, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, Experimental_VideoModelV3, Experimental_VideoModelV4, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationStatusResult, Experimental_VideoModelV4OperationWebhook, FilesV4, FilesV4UploadFileCallOptions, ImageModelV2, ImageModelV2ProviderMetadata, ImageModelV3, ImageModelV4, ImageModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV4Usage, InvalidPromptError, InvalidResponseDataError, JSONObject, JSONParseError, JSONParseError as JSONParseError$1, JSONSchema7, JSONSchema7 as JSONSchema7$1, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4Middleware, LanguageModelV4Prompt, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchModelError as NoSuchModelError$1, NoSuchProviderReferenceError, ProviderV2, ProviderV3, ProviderV4, RerankingModelV3, RerankingModelV4, SharedV4AudioFormat, SharedV4Headers, SharedV4ProviderMetadata, SharedV4ProviderReference, SharedV4Warning, SkillsV4, SkillsV4File, SkillsV4UploadSkillCallOptions, SkillsV4UploadSkillResult, SpeechModelV2, SpeechModelV3, SpeechModelV4, TooManyEmbeddingValuesForCallError, TranscriptionModelV2, TranscriptionModelV3, TranscriptionModelV4, TypeValidationError, TypeValidationError as TypeValidationError$1, UnsupportedFunctionalityError } from "@ai-sdk/provider";
3
+ import { AISDKError, AISDKError as AISDKError$1, APICallError, EmbeddingModelV2, EmbeddingModelV3, EmbeddingModelV4, EmbeddingModelV4CallOptions, EmbeddingModelV4Embedding, EmbeddingModelV4Middleware, EmptyResponseBodyError, Experimental_BatchV4, Experimental_BatchV4Error, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, Experimental_BatchV4Status, Experimental_DecisionModelV4, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Question, Experimental_DecisionModelV4Result, Experimental_DecisionUnsupportedQuestionTypeError, Experimental_DecisionUnsupportedQuestionTypeError as Experimental_DecisionUnsupportedQuestionTypeError$1, Experimental_EvaluationModelV4, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ToolDefinition, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, Experimental_VideoModelV3, Experimental_VideoModelV4, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationStatusResult, Experimental_VideoModelV4OperationWebhook, FilesV4, FilesV4UploadFileCallOptions, ImageModelV2, ImageModelV2ProviderMetadata, ImageModelV3, ImageModelV4, ImageModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV4Usage, InvalidPromptError, InvalidResponseDataError, JSONObject, JSONParseError, JSONParseError as JSONParseError$1, JSONSchema7, JSONSchema7 as JSONSchema7$1, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV3, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Content, LanguageModelV4Middleware, LanguageModelV4Prompt, LanguageModelV4Source, LanguageModelV4ToolCall, LanguageModelV4ToolChoice, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchModelError as NoSuchModelError$1, NoSuchProviderReferenceError, ProviderV2, ProviderV3, ProviderV4, RerankingModelV3, RerankingModelV4, SharedV4AudioFormat, SharedV4Headers, SharedV4ProviderMetadata, SharedV4ProviderReference, SharedV4Warning, SkillsV4, SkillsV4File, SkillsV4UploadSkillCallOptions, SkillsV4UploadSkillResult, SpeechModelV2, SpeechModelV3, SpeechModelV4, TooManyEmbeddingValuesForCallError, TranscriptionModelV2, TranscriptionModelV3, TranscriptionModelV4, TypeValidationError, TypeValidationError as TypeValidationError$1, UnsupportedFunctionalityError } from "@ai-sdk/provider";
4
4
  import { ZodType, array, boolean, custom, discriminatedUnion, enum as enum$1, instanceof as instanceof$1, lazy, literal, looseObject, never, null as null$1, number, object, record, string, union, unknown } from "zod/v4";
5
5
  import { ServerResponse } from "node:http";
6
6
  import { ServerResponse as ServerResponse$1 } from "http";
@@ -121,11 +121,18 @@ type LanguageModel = GlobalProviderModelId | LanguageModelV4 | LanguageModelV3 |
121
121
  * - `other`: model stopped for other reasons
122
122
  */
123
123
  type FinishReason = 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
124
+ /**
125
+ * Registry for call warning variants. Packages that expose additional warning
126
+ * protocols can augment this interface.
127
+ */
128
+ interface CallWarningRegistry {
129
+ sharedV4: SharedV4Warning;
130
+ }
124
131
  /**
125
132
  * Warning from the model provider for this call. The call will proceed, but e.g.
126
133
  * some settings might not be supported, which can lead to suboptimal results.
127
134
  */
128
- type CallWarning = SharedV4Warning;
135
+ type CallWarning = CallWarningRegistry[keyof CallWarningRegistry];
129
136
  /**
130
137
  * A source that has been used as input to generate the response.
131
138
  */
@@ -534,10 +541,10 @@ export type EmbeddingModelCallEndEvent = {
534
541
  readonly usage: EmbeddingModelUsage;
535
542
  };
536
543
  //#endregion
537
- //#region src/evaluate/evaluation-result.d.ts
538
- type EvaluationModel = string | Experimental_EvaluationModelV4;
539
- type EvaluationQuestion = Experimental_EvaluationModelV4Question;
540
- type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
544
+ //#region src/decide/decision-result.d.ts
545
+ type DecisionModel = string | Experimental_DecisionModelV4 | Experimental_EvaluationModelV4;
546
+ type DecisionQuestion = Experimental_DecisionModelV4Question;
547
+ type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
541
548
  type: 'choice';
542
549
  criteria: infer CRITERIA;
543
550
  } ? {
@@ -554,44 +561,44 @@ type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
554
561
  type: 'boolean';
555
562
  probability: number;
556
563
  };
557
- type EvaluationResult<QUESTIONS extends Record<string, EvaluationQuestion>> = {
558
- readonly answers: { [ID in keyof QUESTIONS]: EvaluationAnswer<QUESTIONS[ID]>; };
564
+ type DecisionResult<QUESTIONS extends Record<string, DecisionQuestion>> = {
565
+ readonly answers: { [ID in keyof QUESTIONS]: DecisionAnswer<QUESTIONS[ID]>; };
559
566
  readonly usage: {
560
567
  inputTokens: number | undefined;
561
568
  outputTokens: number | undefined;
562
569
  totalTokens: number | undefined;
563
570
  };
564
- readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
565
- readonly rounding: Experimental_EvaluationModelV4Result['rounding'];
566
- readonly providerMetadata: Experimental_EvaluationModelV4Result['providerMetadata'];
567
- readonly response: NonNullable<Experimental_EvaluationModelV4Result['response']> & {
571
+ readonly warnings: Experimental_DecisionModelV4Result['warnings'];
572
+ readonly rounding: Experimental_DecisionModelV4Result['rounding'];
573
+ readonly providerMetadata: Experimental_DecisionModelV4Result['providerMetadata'];
574
+ readonly response: NonNullable<Experimental_DecisionModelV4Result['response']> & {
568
575
  timestamp: Date;
569
576
  modelId: string;
570
577
  };
571
578
  };
572
579
  //#endregion
573
- //#region src/evaluate/evaluate-events.d.ts
580
+ //#region src/decide/decide-events.d.ts
574
581
  /**
575
- * Event passed to the `onStart` callback for evaluation operations.
582
+ * Event passed to the `onStart` callback for decision operations.
576
583
  *
577
- * Called when the operation begins, before the evaluation model is called.
584
+ * Called when the operation begins, before the decision model is called.
578
585
  */
579
- type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
586
+ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
580
587
  /** User-defined runtime context. */
581
588
  readonly runtimeContext: RUNTIME_CONTEXT;
582
- /** Unique identifier for this evaluation call, used to correlate events. */
589
+ /** Unique identifier for this decision call, used to correlate events. */
583
590
  readonly callId: string;
584
- /** Identifies the operation type (`ai.evaluate`). */
585
- readonly operationId: 'ai.evaluate';
591
+ /** Identifies the operation type (`ai.decide`). */
592
+ readonly operationId: 'ai.decide';
586
593
  /** The provider identifier. */
587
594
  readonly provider: string;
588
- /** The evaluation model identifier. */
595
+ /** The decision model identifier. */
589
596
  readonly modelId: string;
590
- /** The shared state being evaluated. */
591
- readonly state: Experimental_EvaluationModelV4CallOptions['state'];
592
- /** The questions being evaluated against the shared state. */
593
- readonly questions: Readonly<Record<string, EvaluationQuestion>>;
594
- /** Maximum number of retries for the evaluation model call. */
597
+ /** The shared state used to make decisions. */
598
+ readonly state: Experimental_DecisionModelV4CallOptions['state'];
599
+ /** The questions to decide against the shared state. */
600
+ readonly questions: Readonly<Record<string, DecisionQuestion>>;
601
+ /** Maximum number of retries for the decision model call. */
595
602
  readonly maxRetries: number;
596
603
  /** Additional HTTP headers sent with the request. */
597
604
  readonly headers: Record<string, string> | undefined;
@@ -599,61 +606,61 @@ type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
599
606
  readonly providerOptions: ProviderOptions;
600
607
  };
601
608
  /**
602
- * Event passed to the `onEnd` callback for evaluation operations.
609
+ * Event passed to the `onEnd` callback for decision operations.
603
610
  *
604
611
  * Called when the operation completes successfully.
605
612
  */
606
- type EvaluateEndEvent<RUNTIME_CONTEXT extends Context = Context> = EvaluateStartEvent<RUNTIME_CONTEXT> & {
613
+ type DecideEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT> & {
607
614
  /** Exactly one typed answer per question ID. */
608
- readonly answers: EvaluationResult<Record<string, EvaluationQuestion>>['answers'];
609
- /** Token usage for the evaluation operation. */
610
- readonly usage: EvaluationResult<Record<string, EvaluationQuestion>>['usage'];
611
- /** Warnings from the evaluation model. */
612
- readonly warnings: EvaluationResult<Record<string, EvaluationQuestion>>['warnings'];
615
+ readonly answers: DecisionResult<Record<string, DecisionQuestion>>['answers'];
616
+ /** Token usage for the decision operation. */
617
+ readonly usage: DecisionResult<Record<string, DecisionQuestion>>['usage'];
618
+ /** Warnings from the decision model. */
619
+ readonly warnings: DecisionResult<Record<string, DecisionQuestion>>['warnings'];
613
620
  /** Provider-declared decimal precision for probabilities and scores. */
614
- readonly rounding: EvaluationResult<Record<string, EvaluationQuestion>>['rounding'];
621
+ readonly rounding: DecisionResult<Record<string, DecisionQuestion>>['rounding'];
615
622
  /** Optional provider-specific metadata. */
616
- readonly providerMetadata: EvaluationResult<Record<string, EvaluationQuestion>>['providerMetadata'];
623
+ readonly providerMetadata: DecisionResult<Record<string, DecisionQuestion>>['providerMetadata'];
617
624
  /** Response metadata, including the resolved model ID and timestamp. */
618
- readonly response: EvaluationResult<Record<string, EvaluationQuestion>>['response'];
625
+ readonly response: DecisionResult<Record<string, DecisionQuestion>>['response'];
619
626
  };
620
627
  /**
621
- * Event fired when the evaluation model call begins.
628
+ * Event fired when the decision model call begins.
622
629
  *
623
630
  * The logical model call includes any provider retries.
624
631
  */
625
- type EvaluationModelCallStartEvent = {
626
- /** Unique identifier for the outer evaluation call. */
632
+ type DecisionModelCallStartEvent = {
633
+ /** Unique identifier for the outer decision call. */
627
634
  readonly callId: string;
628
- /** Identifies the inner operation (`ai.evaluate.doEvaluate`). */
629
- readonly operationId: 'ai.evaluate.doEvaluate';
635
+ /** Identifies the inner operation (`ai.decide.doDecide`). */
636
+ readonly operationId: 'ai.decide.doDecide';
630
637
  /** The provider identifier. */
631
638
  readonly provider: string;
632
- /** The evaluation model identifier. */
639
+ /** The decision model identifier. */
633
640
  readonly modelId: string;
634
- /** The shared state being evaluated. */
635
- readonly state: Experimental_EvaluationModelV4CallOptions['state'];
636
- /** The questions being evaluated against the shared state. */
637
- readonly questions: Readonly<Record<string, EvaluationQuestion>>;
641
+ /** The shared state used to make decisions. */
642
+ readonly state: Experimental_DecisionModelV4CallOptions['state'];
643
+ /** The questions to decide against the shared state. */
644
+ readonly questions: Readonly<Record<string, DecisionQuestion>>;
638
645
  };
639
646
  /**
640
- * Event fired after the evaluation model response has been validated.
647
+ * Event fired after the decision model response has been validated.
641
648
  *
642
649
  * Contains the result of the logical model call, including any retries.
643
650
  */
644
- type EvaluationModelCallEndEvent = EvaluationModelCallStartEvent & {
651
+ type DecisionModelCallEndEvent = DecisionModelCallStartEvent & {
645
652
  /** Exactly one answer per question ID. */
646
- readonly answers: Experimental_EvaluationModelV4Result['answers'];
647
- /** Token usage reported by the evaluation model. */
648
- readonly usage?: Experimental_EvaluationModelV4Result['usage'];
649
- /** Warnings from the evaluation model. */
650
- readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
653
+ readonly answers: Experimental_DecisionModelV4Result['answers'];
654
+ /** Token usage reported by the decision model. */
655
+ readonly usage?: Experimental_DecisionModelV4Result['usage'];
656
+ /** Warnings from the decision model. */
657
+ readonly warnings: Experimental_DecisionModelV4Result['warnings'];
651
658
  /** Provider-declared decimal precision for probabilities and scores. */
652
- readonly rounding?: Experimental_EvaluationModelV4Result['rounding'];
659
+ readonly rounding?: Experimental_DecisionModelV4Result['rounding'];
653
660
  /** Optional provider-specific metadata. */
654
- readonly providerMetadata?: Experimental_EvaluationModelV4Result['providerMetadata'];
661
+ readonly providerMetadata?: Experimental_DecisionModelV4Result['providerMetadata'];
655
662
  /** Optional raw response metadata from the provider. */
656
- readonly response?: Experimental_EvaluationModelV4Result['response'];
663
+ readonly response?: Experimental_DecisionModelV4Result['response'];
657
664
  };
658
665
  //#endregion
659
666
  //#region src/prompt/language-model-call-options.d.ts
@@ -2301,6 +2308,13 @@ type ToolUIPart<TOOLS extends UITools = UITools> = ValueOf<{ [NAME in keyof TOOL
2301
2308
  } & UIToolInvocation<TOOLS[NAME]>; }>;
2302
2309
  type DynamicToolUIPart = {
2303
2310
  type: 'dynamic-tool';
2311
+ /**
2312
+ * `false` when a static tool part was normalized to a dynamic tool part
2313
+ * because its current tool schema was unavailable or incompatible.
2314
+ *
2315
+ * This preserves its static origin across persistence boundaries.
2316
+ */
2317
+ dynamic?: false;
2304
2318
  /**
2305
2319
  * Name of the tool that is being called.
2306
2320
  */
@@ -4634,7 +4648,7 @@ type StreamTranscriptionEndEvent = TranscriptionEndEventFor<'ai.streamTranscribe
4634
4648
  //#endregion
4635
4649
  //#region src/telemetry/tracing-channel.d.ts
4636
4650
  export declare const AI_SDK_TELEMETRY_TRACING_CHANNEL = "ai:telemetry";
4637
- type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'generateSpeech' | 'transcribe' | 'streamTranscribe' | 'experimental_evaluate';
4651
+ type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'generateSpeech' | 'transcribe' | 'streamTranscribe' | 'experimental_decide';
4638
4652
  type TelemetryTracingChannelMessage<EVENT = unknown> = {
4639
4653
  readonly type: TelemetryTracingEventType;
4640
4654
  readonly event: EVENT;
@@ -4743,20 +4757,28 @@ interface Telemetry {
4743
4757
  * Contains the ranking results from the model response.
4744
4758
  */
4745
4759
  onRerankEnd?: Callback<InferTelemetryEvent<RerankingModelCallEndEvent>>;
4746
- /** Called when an experimental evaluation operation begins. */
4747
- experimental_onEvaluateStart?: Callback<InferTelemetryEvent<EvaluateStartEvent>>;
4748
- /**
4749
- * Called immediately before an experimental evaluation model call begins.
4760
+ /** @deprecated Use `experimental_onDecideStart` instead. */
4761
+ experimental_onEvaluateStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
4762
+ /** @deprecated Use `experimental_onDecisionModelCallStart` instead. */
4763
+ experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
4764
+ /** @deprecated Use `experimental_onDecisionModelCallEnd` instead. */
4765
+ experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
4766
+ /** @deprecated Use `experimental_onDecideEnd` instead. */
4767
+ experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
4768
+ /** Called when an experimental decision operation begins. */
4769
+ experimental_onDecideStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
4770
+ /**
4771
+ * Called immediately before an experimental decision model call begins.
4750
4772
  * The logical model call includes any provider retries.
4751
4773
  */
4752
- experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<EvaluationModelCallStartEvent>>;
4774
+ experimental_onDecisionModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
4753
4775
  /**
4754
- * Called after an experimental evaluation model response has been validated.
4776
+ * Called after an experimental decision model response has been validated.
4755
4777
  * The logical model call includes any provider retries.
4756
4778
  */
4757
- experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<EvaluationModelCallEndEvent>>;
4758
- /** Called when an experimental evaluation operation completes. */
4759
- experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<EvaluateEndEvent>>;
4779
+ experimental_onDecisionModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
4780
+ /** Called when an experimental decision operation completes. */
4781
+ experimental_onDecideEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
4760
4782
  /** Called when an experimental streaming transcription operation begins. */
4761
4783
  experimental_onStreamTranscriptionStart?: Callback<InferTelemetryEvent<StreamTranscriptionStartEvent>>;
4762
4784
  /** Called when an experimental streaming transcription operation completes. */
@@ -4819,7 +4841,7 @@ declare global {
4819
4841
  * String model ids are resolved to the default provider and model id.
4820
4842
  *
4821
4843
  * If not set, the default provider is the Vercel AI gateway provider.
4822
- * Experimental evaluation requires an explicitly configured evaluation-capable provider.
4844
+ * An explicitly configured provider must support decision models to use experimental_decide.
4823
4845
  *
4824
4846
  * @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
4825
4847
  */
@@ -4827,7 +4849,8 @@ declare global {
4827
4849
  /**
4828
4850
  * The warning logger to use for the AI SDK.
4829
4851
  *
4830
- * If not set, the default logger is the console.warn function.
4852
+ * If not set, warnings use process.emitWarning when available, otherwise
4853
+ * console.warn. Deprecations are emitted once per code by the default logger.
4831
4854
  *
4832
4855
  * If set to false, no warnings are logged.
4833
4856
  */
@@ -8057,12 +8080,18 @@ export declare class RetryError extends AISDKError$1 {
8057
8080
  static isInstance(error: unknown): error is RetryError;
8058
8081
  }
8059
8082
  //#endregion
8060
- //#region src/evaluate/evaluate.d.ts
8061
- /** Evaluate typed questions against one shared state. Experimental. */
8062
- declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuestion>, RUNTIME_CONTEXT extends Context = Context>({ model: modelArg, state, questions, maxRetries, abortSignal, headers, providerOptions, telemetry, runtimeContext, onStart, onEnd, _internal: { generateCallId } }: {
8063
- /** An evaluation model instance or an ID resolved by the configured default provider. */
8064
- model: EvaluationModel;
8065
- state: Experimental_EvaluationModelV4CallOptions['state'];
8083
+ //#region src/error/index.d.ts
8084
+ /** @deprecated Use `Experimental_DecisionUnsupportedQuestionTypeError` instead. */
8085
+ export declare const Experimental_EvaluationUnsupportedQuestionTypeError: typeof Experimental_DecisionUnsupportedQuestionTypeError$1;
8086
+ /** @deprecated Use `Experimental_DecisionUnsupportedQuestionTypeError` instead. */
8087
+ export type Experimental_EvaluationUnsupportedQuestionTypeError = Experimental_DecisionUnsupportedQuestionTypeError$1;
8088
+ //#endregion
8089
+ //#region src/decide/decide.d.ts
8090
+ /** Decide answers to typed questions against one shared state. Experimental. */
8091
+ declare function decide<const QUESTIONS extends Record<string, DecisionQuestion>, RUNTIME_CONTEXT extends Context = Context>({ model: modelArg, state, questions, maxRetries, abortSignal, headers, providerOptions, telemetry, runtimeContext, onStart, onEnd, _internal: { generateCallId } }: {
8092
+ /** A decision model instance or an ID resolved by the configured default provider. */
8093
+ model: DecisionModel;
8094
+ state: Experimental_DecisionModelV4CallOptions['state'];
8066
8095
  questions: QUESTIONS;
8067
8096
  /** Maximum retries for transient provider failures. Defaults to 2. */
8068
8097
  maxRetries?: number;
@@ -8073,15 +8102,35 @@ declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuest
8073
8102
  telemetry?: TelemetryOptions<RUNTIME_CONTEXT>;
8074
8103
  /** User-defined runtime context. Treat runtime context as immutable. */
8075
8104
  runtimeContext?: RUNTIME_CONTEXT;
8076
- /** Called when the evaluate operation begins. */
8077
- onStart?: Callback<EvaluateStartEvent<RUNTIME_CONTEXT>>;
8078
- /** Called when the evaluate operation completes. */
8079
- onEnd?: Callback<EvaluateEndEvent<RUNTIME_CONTEXT>>;
8105
+ /** Called when the decide operation begins. */
8106
+ onStart?: Callback<DecideStartEvent<RUNTIME_CONTEXT>>;
8107
+ /** Called when the decide operation completes. */
8108
+ onEnd?: Callback<DecideEndEvent<RUNTIME_CONTEXT>>;
8080
8109
  /** Internal. For test use only. May change without notice. */
8081
8110
  _internal?: {
8082
8111
  generateCallId?: () => string;
8083
8112
  };
8084
- }): Promise<EvaluationResult<QUESTIONS>>;
8113
+ }): Promise<DecisionResult<QUESTIONS>>;
8114
+ //#endregion
8115
+ //#region src/decide/index.d.ts
8116
+ /** @deprecated Use `experimental_decide` instead. */
8117
+ export declare const experimental_evaluate: typeof decide;
8118
+ /** @deprecated Use `Experimental_DecideStartEvent` instead. */
8119
+ export type Experimental_EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT>;
8120
+ /** @deprecated Use `Experimental_DecideEndEvent` instead. */
8121
+ export type Experimental_EvaluateEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideEndEvent<RUNTIME_CONTEXT>;
8122
+ /** @deprecated Use `Experimental_DecisionModelCallStartEvent` instead. */
8123
+ export type Experimental_EvaluationModelCallStartEvent = DecisionModelCallStartEvent;
8124
+ /** @deprecated Use `Experimental_DecisionModelCallEndEvent` instead. */
8125
+ export type Experimental_EvaluationModelCallEndEvent = DecisionModelCallEndEvent;
8126
+ /** @deprecated Use `Experimental_DecisionModel` instead. */
8127
+ export type Experimental_EvaluationModel = DecisionModel;
8128
+ /** @deprecated Use `Experimental_DecisionQuestion` instead. */
8129
+ export type Experimental_EvaluationQuestion = DecisionQuestion;
8130
+ /** @deprecated Use `Experimental_DecisionAnswer` instead. */
8131
+ export type Experimental_EvaluationAnswer<QUESTION extends DecisionQuestion> = DecisionAnswer<QUESTION>;
8132
+ /** @deprecated Use `Experimental_DecisionResult` instead. */
8133
+ export type Experimental_EvaluationResult<QUESTIONS extends Record<string, DecisionQuestion>> = DecisionResult<QUESTIONS>;
8085
8134
  //#endregion
8086
8135
  //#region src/generate-object/generate-object-result.d.ts
8087
8136
  /**
@@ -9286,15 +9335,19 @@ export declare function extractJsonMiddleware(options?: {
9286
9335
  //#endregion
9287
9336
  //#region src/middleware/extract-reasoning-middleware.d.ts
9288
9337
  /**
9289
- * Extracts an XML-tagged reasoning section from the generated text and exposes it
9338
+ * Extracts a delimited reasoning section from the generated text and exposes it
9290
9339
  * as a `reasoning` property on the result.
9291
9340
  *
9292
- * @param tagName - The name of the XML tag to extract reasoning from.
9341
+ * @param tagName - An XML tag name (without angle brackets), or literal opening
9342
+ * and closing delimiters for formats such as Gemma's thought channel.
9293
9343
  * @param separator - The separator to use between reasoning and text sections.
9294
9344
  * @param startWithReasoning - Whether to start with reasoning tokens.
9295
9345
  */
9296
9346
  export declare function extractReasoningMiddleware({ tagName, separator, startWithReasoning }: {
9297
- tagName: string;
9347
+ tagName: string | {
9348
+ opening: string;
9349
+ closing: string;
9350
+ };
9298
9351
  separator?: string;
9299
9352
  startWithReasoning?: boolean;
9300
9353
  }): LanguageModelMiddleware;
@@ -9624,6 +9677,85 @@ type RealtimeSetupResponse = {
9624
9677
  tools?: RealtimeToolDefinition[];
9625
9678
  };
9626
9679
  //#endregion
9680
+ //#region src/util/extract-literal-union.d.ts
9681
+ /**
9682
+ * If `text` is exactly the wide `string` type, there are no string literals to
9683
+ * preserve, so this resolves to `never`.
9684
+ *
9685
+ * If `text` is a string literal or a union of string literals, this resolves
9686
+ * to that literal union unchanged.
9687
+ *
9688
+ * This is used when building template-literal model identifiers (for example
9689
+ * `"provider:modelId"`) so that editors can suggest concrete `modelId` values
9690
+ * when the underlying method parameter is narrowed, while falling back to a
9691
+ * generic `"provider:${string}"` style overload when the parameter is only
9692
+ * typed as `string`.
9693
+ */
9694
+ type ExtractLiteralUnion<text> = text extends string ? string extends text ? never : text : never;
9695
+ //#endregion
9696
+ //#region src/registry/provider-registry.d.ts
9697
+ type ProviderVideoModelIdentifier<PROVIDER> = PROVIDER extends {
9698
+ videoModel: (...args: infer ARGS) => unknown;
9699
+ } ? ExtractLiteralUnion<ARGS[0]> : never;
9700
+ type ProviderDecisionModelIdentifier<PROVIDER> = PROVIDER extends {
9701
+ decisionModel: (...args: infer ARGS) => unknown;
9702
+ } ? ExtractLiteralUnion<ARGS[0]> : PROVIDER extends {
9703
+ evaluationModel: (...args: infer ARGS) => unknown;
9704
+ } ? ExtractLiteralUnion<ARGS[0]> : never;
9705
+ /** Registry with experimental decision access, separate from the stable interface. */
9706
+ type DecisionProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> = ProviderRegistryProvider<PROVIDERS, SEPARATOR> & {
9707
+ decisionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderDecisionModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_DecisionModelV4;
9708
+ decisionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_DecisionModelV4;
9709
+ /** @deprecated Use `decisionModel` instead. */
9710
+ evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderDecisionModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_DecisionModelV4 & {
9711
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9712
+ };
9713
+ /** @deprecated Use `decisionModel` instead. */
9714
+ evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_DecisionModelV4 & {
9715
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9716
+ };
9717
+ };
9718
+ interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> {
9719
+ languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV4;
9720
+ languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): LanguageModelV4;
9721
+ embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['embeddingModel']>>[0]>}` : never): EmbeddingModelV4;
9722
+ embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): EmbeddingModelV4;
9723
+ imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never): ImageModelV4;
9724
+ imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): ImageModelV4;
9725
+ transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['transcriptionModel']>>[0]>}` : never): TranscriptionModelV4;
9726
+ transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): TranscriptionModelV4;
9727
+ speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['speechModel']>>[0]>}` : never): SpeechModelV4;
9728
+ speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): SpeechModelV4;
9729
+ rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['rerankingModel']>>[0]>}` : never): RerankingModelV4;
9730
+ rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): RerankingModelV4;
9731
+ videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderVideoModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_VideoModelV4;
9732
+ videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_VideoModelV4;
9733
+ files<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): FilesV4;
9734
+ skills<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): SkillsV4;
9735
+ }
9736
+ /**
9737
+ * Creates a registry for the given providers with optional middleware functionality.
9738
+ * This function allows you to register multiple providers and optionally apply middleware
9739
+ * to all language models from the registry, enabling you to transform parameters, wrap generate
9740
+ * operations, and wrap stream operations for every language model accessed through the registry.
9741
+ *
9742
+ * @param providers - A record of provider instances to be registered in the registry.
9743
+ * @param options - Configuration options for the provider registry.
9744
+ * @param options.separator - The separator used between provider ID and model ID in the combined identifier. Defaults to ':'.
9745
+ * @param options.languageModelMiddleware - Optional middleware to be applied to all language models from the registry. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
9746
+ * @param options.imageModelMiddleware - Optional middleware to be applied to all image models from the registry. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
9747
+ * @returns A new ProviderRegistryProvider instance that provides access to all registered providers with optional middleware applied to language and image models.
9748
+ */
9749
+ export declare function createProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'>(providers: PROVIDERS, { separator, languageModelMiddleware, imageModelMiddleware }?: {
9750
+ separator?: SEPARATOR;
9751
+ languageModelMiddleware?: LanguageModelMiddleware | LanguageModelMiddleware[];
9752
+ imageModelMiddleware?: ImageModelMiddleware | ImageModelMiddleware[];
9753
+ }): DecisionProviderRegistry<PROVIDERS, SEPARATOR>;
9754
+ /**
9755
+ * @deprecated Use `createProviderRegistry` instead.
9756
+ */
9757
+ export declare const experimental_createProviderRegistry: typeof createProviderRegistry;
9758
+ //#endregion
9627
9759
  //#region src/registry/custom-provider.d.ts
9628
9760
  /**
9629
9761
  * Creates a custom provider with specified language models, text embedding models, image models, transcription models, speech models, file APIs, skill APIs, and an optional fallback provider.
@@ -9636,7 +9768,7 @@ type RealtimeSetupResponse = {
9636
9768
  * @param {Record<string, SpeechModel>} [options.speechModels] - A record of speech models, where keys are model IDs and values are speech model instances.
9637
9769
  * @param {Record<string, RerankingModel>} [options.rerankingModels] - A record of reranking models, where keys are model IDs and values are reranking model instances.
9638
9770
  * @param {Record<string, VideoModel>} [options.videoModels] - A record of video models, where keys are model IDs and values are video model instances.
9639
- * @param {Record<string, EvaluationModel>} [options.evaluationModels] - Experimental evaluation models or default-provider model IDs, keyed by alias.
9771
+ * @param {Record<string, DecisionModel>} [options.decisionModels] - Experimental decision models or default-provider model IDs, keyed by alias.
9640
9772
  * @param {FilesV4} [options.files] - A files interface for uploading files.
9641
9773
  * @param {SkillsV4} [options.skills] - A skills interface for uploading skills.
9642
9774
  * @param {ProviderV2 | ProviderV3 | ProviderV4} [options.fallbackProvider] - An optional fallback provider to use when a requested model is not found in the custom provider.
@@ -9644,7 +9776,7 @@ type RealtimeSetupResponse = {
9644
9776
  *
9645
9777
  * @throws {NoSuchModelError} Throws when a requested model is not found and no fallback provider is available.
9646
9778
  */
9647
- export declare function customProvider<LANGUAGE_MODELS extends Record<string, LanguageModel>, EMBEDDING_MODELS extends Record<string, EmbeddingModel>, IMAGE_MODELS extends Record<string, ImageModel>, TRANSCRIPTION_MODELS extends Record<string, TranscriptionModel>, SPEECH_MODELS extends Record<string, SpeechModel>, RERANKING_MODELS extends Record<string, RerankingModel>, VIDEO_MODELS extends Record<string, VideoModel>, FILES extends FilesV4 | undefined = undefined, SKILLS extends SkillsV4 | undefined = undefined, FALLBACK extends ProviderV2 | ProviderV3 | ProviderV4 | undefined = undefined, EVALUATION_MODELS extends Record<string, EvaluationModel> = Record<string, EvaluationModel>>({ languageModels, embeddingModels, imageModels, transcriptionModels, speechModels, rerankingModels, videoModels, evaluationModels, files, skills, fallbackProvider: fallbackProviderArg }: {
9779
+ export declare function customProvider<LANGUAGE_MODELS extends Record<string, LanguageModel>, EMBEDDING_MODELS extends Record<string, EmbeddingModel>, IMAGE_MODELS extends Record<string, ImageModel>, TRANSCRIPTION_MODELS extends Record<string, TranscriptionModel>, SPEECH_MODELS extends Record<string, SpeechModel>, RERANKING_MODELS extends Record<string, RerankingModel>, VIDEO_MODELS extends Record<string, VideoModel>, FILES extends FilesV4 | undefined = undefined, SKILLS extends SkillsV4 | undefined = undefined, FALLBACK extends ProviderV2 | ProviderV3 | ProviderV4 | undefined = undefined, DECISION_MODELS extends Record<string, DecisionModel> = Record<string, DecisionModel>>({ languageModels, embeddingModels, imageModels, transcriptionModels, speechModels, rerankingModels, videoModels, decisionModels: decisionModelsArg, evaluationModels, files, skills, fallbackProvider: fallbackProviderArg }: {
9648
9780
  languageModels?: LANGUAGE_MODELS;
9649
9781
  embeddingModels?: EMBEDDING_MODELS;
9650
9782
  imageModels?: IMAGE_MODELS;
@@ -9652,7 +9784,9 @@ export declare function customProvider<LANGUAGE_MODELS extends Record<string, La
9652
9784
  speechModels?: SPEECH_MODELS;
9653
9785
  rerankingModels?: RERANKING_MODELS;
9654
9786
  videoModels?: VIDEO_MODELS;
9655
- evaluationModels?: EVALUATION_MODELS;
9787
+ decisionModels?: DECISION_MODELS;
9788
+ /** @deprecated Use `decisionModels` instead. When both are set, `decisionModels` takes precedence. */
9789
+ evaluationModels?: DECISION_MODELS;
9656
9790
  files?: FILES;
9657
9791
  skills?: SKILLS;
9658
9792
  fallbackProvider?: FALLBACK;
@@ -9664,7 +9798,11 @@ export declare function customProvider<LANGUAGE_MODELS extends Record<string, La
9664
9798
  rerankingModel(modelId: ExtractModelId<RERANKING_MODELS>): RerankingModelV4;
9665
9799
  speechModel(modelId: ExtractModelId<SPEECH_MODELS>): SpeechModelV4;
9666
9800
  videoModel(modelId: ExtractModelId<VIDEO_MODELS>): Experimental_VideoModelV4;
9667
- evaluationModel(modelId: ExtractModelId<EVALUATION_MODELS>): Experimental_EvaluationModelV4;
9801
+ decisionModel(modelId: ExtractModelId<DECISION_MODELS>): Experimental_DecisionModelV4;
9802
+ /** @deprecated Use `decisionModel` instead. */
9803
+ evaluationModel(modelId: ExtractModelId<DECISION_MODELS>): Experimental_DecisionModelV4 & {
9804
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9805
+ };
9668
9806
  } & (FILES extends FilesV4 ? {
9669
9807
  files(): FilesV4;
9670
9808
  } : [FALLBACK] extends [{
@@ -9692,7 +9830,9 @@ export declare class NoSuchProviderError extends NoSuchModelError$1 {
9692
9830
  readonly availableProviders: string[];
9693
9831
  constructor({ modelId, modelType, providerId, availableProviders, message }: {
9694
9832
  modelId: string;
9695
- modelType: 'languageModel' | 'embeddingModel' | 'imageModel' | 'transcriptionModel' | 'speechModel' | 'rerankingModel' | 'videoModel' | 'evaluationModel';
9833
+ modelType: 'languageModel' | 'embeddingModel' | 'imageModel' | 'transcriptionModel' | 'speechModel' | 'rerankingModel' | 'videoModel' | 'decisionModel' |
9834
+ /** @deprecated Use `decisionModel` instead. */
9835
+ 'evaluationModel';
9696
9836
  providerId: string;
9697
9837
  availableProviders: string[];
9698
9838
  message?: string;
@@ -9700,74 +9840,9 @@ export declare class NoSuchProviderError extends NoSuchModelError$1 {
9700
9840
  static isInstance(error: unknown): error is NoSuchProviderError;
9701
9841
  }
9702
9842
  //#endregion
9703
- //#region src/util/extract-literal-union.d.ts
9704
- /**
9705
- * If `text` is exactly the wide `string` type, there are no string literals to
9706
- * preserve, so this resolves to `never`.
9707
- *
9708
- * If `text` is a string literal or a union of string literals, this resolves
9709
- * to that literal union unchanged.
9710
- *
9711
- * This is used when building template-literal model identifiers (for example
9712
- * `"provider:modelId"`) so that editors can suggest concrete `modelId` values
9713
- * when the underlying method parameter is narrowed, while falling back to a
9714
- * generic `"provider:${string}"` style overload when the parameter is only
9715
- * typed as `string`.
9716
- */
9717
- type ExtractLiteralUnion<text> = text extends string ? string extends text ? never : text : never;
9718
- //#endregion
9719
- //#region src/registry/provider-registry.d.ts
9720
- type ProviderVideoModelIdentifier<PROVIDER> = PROVIDER extends {
9721
- videoModel: (...args: infer ARGS) => unknown;
9722
- } ? ExtractLiteralUnion<ARGS[0]> : never;
9723
- type ProviderEvaluationModelIdentifier<PROVIDER> = PROVIDER extends {
9724
- evaluationModel: (...args: infer ARGS) => unknown;
9725
- } ? ExtractLiteralUnion<ARGS[0]> : never;
9726
- /** Registry with experimental evaluation access, separate from the stable interface. */
9727
- type EvaluationProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> = ProviderRegistryProvider<PROVIDERS, SEPARATOR> & {
9728
- evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderEvaluationModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_EvaluationModelV4;
9729
- evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_EvaluationModelV4;
9730
- };
9731
- interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> {
9732
- languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV4;
9733
- languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): LanguageModelV4;
9734
- embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['embeddingModel']>>[0]>}` : never): EmbeddingModelV4;
9735
- embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): EmbeddingModelV4;
9736
- imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never): ImageModelV4;
9737
- imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): ImageModelV4;
9738
- transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['transcriptionModel']>>[0]>}` : never): TranscriptionModelV4;
9739
- transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): TranscriptionModelV4;
9740
- speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['speechModel']>>[0]>}` : never): SpeechModelV4;
9741
- speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): SpeechModelV4;
9742
- rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['rerankingModel']>>[0]>}` : never): RerankingModelV4;
9743
- rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): RerankingModelV4;
9744
- videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderVideoModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_VideoModelV4;
9745
- videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_VideoModelV4;
9746
- files<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): FilesV4;
9747
- skills<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): SkillsV4;
9748
- }
9749
- /**
9750
- * Creates a registry for the given providers with optional middleware functionality.
9751
- * This function allows you to register multiple providers and optionally apply middleware
9752
- * to all language models from the registry, enabling you to transform parameters, wrap generate
9753
- * operations, and wrap stream operations for every language model accessed through the registry.
9754
- *
9755
- * @param providers - A record of provider instances to be registered in the registry.
9756
- * @param options - Configuration options for the provider registry.
9757
- * @param options.separator - The separator used between provider ID and model ID in the combined identifier. Defaults to ':'.
9758
- * @param options.languageModelMiddleware - Optional middleware to be applied to all language models from the registry. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
9759
- * @param options.imageModelMiddleware - Optional middleware to be applied to all image models from the registry. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
9760
- * @returns A new ProviderRegistryProvider instance that provides access to all registered providers with optional middleware applied to language and image models.
9761
- */
9762
- export declare function createProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'>(providers: PROVIDERS, { separator, languageModelMiddleware, imageModelMiddleware }?: {
9763
- separator?: SEPARATOR;
9764
- languageModelMiddleware?: LanguageModelMiddleware | LanguageModelMiddleware[];
9765
- imageModelMiddleware?: ImageModelMiddleware | ImageModelMiddleware[];
9766
- }): EvaluationProviderRegistry<PROVIDERS, SEPARATOR>;
9767
- /**
9768
- * @deprecated Use `createProviderRegistry` instead.
9769
- */
9770
- export declare const experimental_createProviderRegistry: typeof createProviderRegistry;
9843
+ //#region src/registry/index.d.ts
9844
+ /** @deprecated Use `Experimental_DecisionProviderRegistry` instead. */
9845
+ export type Experimental_EvaluationProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> = DecisionProviderRegistry<PROVIDERS, SEPARATOR>;
9771
9846
  //#endregion
9772
9847
  //#region src/rerank/rerank-result.d.ts
9773
9848
  /**
@@ -10561,5 +10636,5 @@ export declare function uploadSkill({ api, files, displayTitle, providerOptions
10561
10636
  files: UploadSkillFile[];
10562
10637
  }): Promise<UploadSkillResult>;
10563
10638
  //#endregion
10564
- export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DownloadFunction as Experimental_DownloadFunction, type EvaluateEndEvent as Experimental_EvaluateEndEvent, type EvaluateStartEvent as Experimental_EvaluateStartEvent, type EvaluationAnswer as Experimental_EvaluationAnswer, type EvaluationModel as Experimental_EvaluationModel, type EvaluationModelCallEndEvent as Experimental_EvaluationModelCallEndEvent, type EvaluationModelCallStartEvent as Experimental_EvaluationModelCallStartEvent, type EvaluationProviderRegistry as Experimental_EvaluationProviderRegistry, type EvaluationQuestion as Experimental_EvaluationQuestion, type EvaluationResult as Experimental_EvaluationResult, Experimental_EvaluationUnsupportedQuestionTypeError, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranscriptionEndEvent as Experimental_StreamTranscriptionEndEvent, type StreamTranscriptionStartEvent as Experimental_StreamTranscriptionStartEvent, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateSpeechEndEvent, type GenerateSpeechStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionEndEvent, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStartEvent, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, evaluate as experimental_evaluate, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
10639
+ export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type CallWarningRegistry, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DecideEndEvent as Experimental_DecideEndEvent, type DecideStartEvent as Experimental_DecideStartEvent, type DecisionAnswer as Experimental_DecisionAnswer, type DecisionModel as Experimental_DecisionModel, type DecisionModelCallEndEvent as Experimental_DecisionModelCallEndEvent, type DecisionModelCallStartEvent as Experimental_DecisionModelCallStartEvent, type DecisionProviderRegistry as Experimental_DecisionProviderRegistry, type DecisionQuestion as Experimental_DecisionQuestion, type DecisionResult as Experimental_DecisionResult, Experimental_DecisionUnsupportedQuestionTypeError, type DownloadFunction as Experimental_DownloadFunction, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranscriptionEndEvent as Experimental_StreamTranscriptionEndEvent, type StreamTranscriptionStartEvent as Experimental_StreamTranscriptionStartEvent, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateSpeechEndEvent, type GenerateSpeechStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionEndEvent, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStartEvent, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decide as experimental_decide, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
10565
10640
  //# sourceMappingURL=index.d.ts.map