ai 7.0.126 → 7.0.128

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 (82) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/index.d.ts +234 -154
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +307 -199
  5. package/dist/index.js.map +1 -1
  6. package/dist/internal/index.d.ts +278 -68
  7. package/dist/internal/index.d.ts.map +1 -1
  8. package/dist/internal/index.js +371 -72
  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-getting-started/03-nextjs-pages-router.mdx +1 -1
  15. package/docs/02-getting-started/07-expo.mdx +1 -1
  16. package/docs/03-agents/07-workflow-agent.mdx +80 -12
  17. package/docs/03-ai-sdk-core/16-mcp-tools.mdx +44 -0
  18. package/docs/03-ai-sdk-core/19-tool-search.mdx +40 -4
  19. package/docs/03-ai-sdk-core/{32-evaluation.mdx → 32-decisions.mdx} +49 -49
  20. package/docs/03-ai-sdk-core/35-image-generation.mdx +6 -1
  21. package/docs/03-ai-sdk-core/36-transcription.mdx +42 -39
  22. package/docs/03-ai-sdk-core/37-speech.mdx +2 -0
  23. package/docs/03-ai-sdk-core/45-provider-management.mdx +8 -8
  24. package/docs/03-ai-sdk-core/60-telemetry.mdx +40 -31
  25. package/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +21 -22
  26. package/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +2 -2
  27. package/docs/04-ai-sdk-ui/02-chatbot.mdx +2 -1
  28. package/docs/06-advanced/09-multistep-interfaces.mdx +1 -1
  29. package/docs/07-reference/01-ai-sdk-core/14-decide.mdx +74 -0
  30. package/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +58 -4
  31. package/docs/07-reference/01-ai-sdk-core/23-tool-search.mdx +62 -6
  32. package/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +11 -11
  33. package/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +9 -9
  34. package/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +24 -8
  35. package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +13 -0
  36. package/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +1 -1
  37. package/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +1 -0
  38. package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +39 -2
  39. package/docs/07-reference/05-ai-sdk-errors/ai-decision-unsupported-question-type-error.mdx +31 -0
  40. package/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +3 -3
  41. package/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +3 -3
  42. package/docs/08-migration-guides/23-migration-guide-7-0.mdx +1 -1
  43. package/docs/08-migration-guides/29-migration-guide-4-0.mdx +1 -1
  44. package/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +2 -2
  45. package/package.json +12 -12
  46. package/src/decide/decide-events.ts +129 -0
  47. package/src/{evaluate/evaluate.ts → decide/decide.ts} +36 -38
  48. package/src/decide/decision-provider.ts +11 -0
  49. package/src/decide/decision-result.ts +39 -0
  50. package/src/decide/index.ts +64 -0
  51. package/src/{evaluate → decide}/restricted-telemetry-dispatcher.ts +7 -7
  52. package/src/{evaluate/validate-evaluation.ts → decide/validate-decision.ts} +9 -9
  53. package/src/error/index.ts +10 -1
  54. package/src/generate-speech/generated-audio-file.ts +5 -4
  55. package/src/generate-text/default-generate-text-result.ts +127 -0
  56. package/src/generate-text/generate-text.ts +2 -122
  57. package/src/generate-text/validate-tool-approvals.ts +5 -1
  58. package/src/global.ts +1 -1
  59. package/src/index.ts +1 -1
  60. package/src/middleware/extract-reasoning-middleware.ts +25 -6
  61. package/src/model/resolve-model.ts +45 -14
  62. package/src/registry/custom-provider.ts +38 -26
  63. package/src/registry/index.ts +13 -1
  64. package/src/registry/no-such-provider-error.ts +2 -0
  65. package/src/registry/provider-registry.ts +56 -29
  66. package/src/telemetry/create-telemetry-dispatcher.ts +17 -5
  67. package/src/telemetry/telemetry.ts +35 -19
  68. package/src/telemetry/tracing-channel.ts +1 -1
  69. package/src/test/decision-mock-model-v4.ts +35 -0
  70. package/src/tool-search/prepare-tool-search.ts +49 -29
  71. package/src/tool-search/tool-search.ts +58 -4
  72. package/src/transcribe/transcribe.ts +1 -1
  73. package/src/ui/chat.ts +9 -1
  74. package/src/ui/process-ui-message-stream.ts +21 -0
  75. package/src/ui-message-stream/create-ui-message-stream.ts +29 -4
  76. package/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +0 -74
  77. package/docs/07-reference/05-ai-sdk-errors/ai-evaluation-unsupported-question-type-error.mdx +0 -31
  78. package/src/evaluate/evaluate-events.ts +0 -131
  79. package/src/evaluate/evaluation-provider.ts +0 -6
  80. package/src/evaluate/evaluation-result.ts +0 -39
  81. package/src/evaluate/index.ts +0 -13
  82. 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";
@@ -534,10 +534,10 @@ export type EmbeddingModelCallEndEvent = {
534
534
  readonly usage: EmbeddingModelUsage;
535
535
  };
536
536
  //#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 {
537
+ //#region src/decide/decision-result.d.ts
538
+ type DecisionModel = string | Experimental_DecisionModelV4 | Experimental_EvaluationModelV4;
539
+ type DecisionQuestion = Experimental_DecisionModelV4Question;
540
+ type DecisionAnswer<QUESTION extends DecisionQuestion> = QUESTION extends {
541
541
  type: 'choice';
542
542
  criteria: infer CRITERIA;
543
543
  } ? {
@@ -554,44 +554,44 @@ type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
554
554
  type: 'boolean';
555
555
  probability: number;
556
556
  };
557
- type EvaluationResult<QUESTIONS extends Record<string, EvaluationQuestion>> = {
558
- readonly answers: { [ID in keyof QUESTIONS]: EvaluationAnswer<QUESTIONS[ID]>; };
557
+ type DecisionResult<QUESTIONS extends Record<string, DecisionQuestion>> = {
558
+ readonly answers: { [ID in keyof QUESTIONS]: DecisionAnswer<QUESTIONS[ID]>; };
559
559
  readonly usage: {
560
560
  inputTokens: number | undefined;
561
561
  outputTokens: number | undefined;
562
562
  totalTokens: number | undefined;
563
563
  };
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']> & {
564
+ readonly warnings: Experimental_DecisionModelV4Result['warnings'];
565
+ readonly rounding: Experimental_DecisionModelV4Result['rounding'];
566
+ readonly providerMetadata: Experimental_DecisionModelV4Result['providerMetadata'];
567
+ readonly response: NonNullable<Experimental_DecisionModelV4Result['response']> & {
568
568
  timestamp: Date;
569
569
  modelId: string;
570
570
  };
571
571
  };
572
572
  //#endregion
573
- //#region src/evaluate/evaluate-events.d.ts
573
+ //#region src/decide/decide-events.d.ts
574
574
  /**
575
- * Event passed to the `onStart` callback for evaluation operations.
575
+ * Event passed to the `onStart` callback for decision operations.
576
576
  *
577
- * Called when the operation begins, before the evaluation model is called.
577
+ * Called when the operation begins, before the decision model is called.
578
578
  */
579
- type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
579
+ type DecideStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
580
580
  /** User-defined runtime context. */
581
581
  readonly runtimeContext: RUNTIME_CONTEXT;
582
- /** Unique identifier for this evaluation call, used to correlate events. */
582
+ /** Unique identifier for this decision call, used to correlate events. */
583
583
  readonly callId: string;
584
- /** Identifies the operation type (`ai.evaluate`). */
585
- readonly operationId: 'ai.evaluate';
584
+ /** Identifies the operation type (`ai.decide`). */
585
+ readonly operationId: 'ai.decide';
586
586
  /** The provider identifier. */
587
587
  readonly provider: string;
588
- /** The evaluation model identifier. */
588
+ /** The decision model identifier. */
589
589
  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. */
590
+ /** The shared state used to make decisions. */
591
+ readonly state: Experimental_DecisionModelV4CallOptions['state'];
592
+ /** The questions to decide against the shared state. */
593
+ readonly questions: Readonly<Record<string, DecisionQuestion>>;
594
+ /** Maximum number of retries for the decision model call. */
595
595
  readonly maxRetries: number;
596
596
  /** Additional HTTP headers sent with the request. */
597
597
  readonly headers: Record<string, string> | undefined;
@@ -599,61 +599,61 @@ type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
599
599
  readonly providerOptions: ProviderOptions;
600
600
  };
601
601
  /**
602
- * Event passed to the `onEnd` callback for evaluation operations.
602
+ * Event passed to the `onEnd` callback for decision operations.
603
603
  *
604
604
  * Called when the operation completes successfully.
605
605
  */
606
- type EvaluateEndEvent<RUNTIME_CONTEXT extends Context = Context> = EvaluateStartEvent<RUNTIME_CONTEXT> & {
606
+ type DecideEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT> & {
607
607
  /** 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'];
608
+ readonly answers: DecisionResult<Record<string, DecisionQuestion>>['answers'];
609
+ /** Token usage for the decision operation. */
610
+ readonly usage: DecisionResult<Record<string, DecisionQuestion>>['usage'];
611
+ /** Warnings from the decision model. */
612
+ readonly warnings: DecisionResult<Record<string, DecisionQuestion>>['warnings'];
613
613
  /** Provider-declared decimal precision for probabilities and scores. */
614
- readonly rounding: EvaluationResult<Record<string, EvaluationQuestion>>['rounding'];
614
+ readonly rounding: DecisionResult<Record<string, DecisionQuestion>>['rounding'];
615
615
  /** Optional provider-specific metadata. */
616
- readonly providerMetadata: EvaluationResult<Record<string, EvaluationQuestion>>['providerMetadata'];
616
+ readonly providerMetadata: DecisionResult<Record<string, DecisionQuestion>>['providerMetadata'];
617
617
  /** Response metadata, including the resolved model ID and timestamp. */
618
- readonly response: EvaluationResult<Record<string, EvaluationQuestion>>['response'];
618
+ readonly response: DecisionResult<Record<string, DecisionQuestion>>['response'];
619
619
  };
620
620
  /**
621
- * Event fired when the evaluation model call begins.
621
+ * Event fired when the decision model call begins.
622
622
  *
623
623
  * The logical model call includes any provider retries.
624
624
  */
625
- type EvaluationModelCallStartEvent = {
626
- /** Unique identifier for the outer evaluation call. */
625
+ type DecisionModelCallStartEvent = {
626
+ /** Unique identifier for the outer decision call. */
627
627
  readonly callId: string;
628
- /** Identifies the inner operation (`ai.evaluate.doEvaluate`). */
629
- readonly operationId: 'ai.evaluate.doEvaluate';
628
+ /** Identifies the inner operation (`ai.decide.doDecide`). */
629
+ readonly operationId: 'ai.decide.doDecide';
630
630
  /** The provider identifier. */
631
631
  readonly provider: string;
632
- /** The evaluation model identifier. */
632
+ /** The decision model identifier. */
633
633
  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>>;
634
+ /** The shared state used to make decisions. */
635
+ readonly state: Experimental_DecisionModelV4CallOptions['state'];
636
+ /** The questions to decide against the shared state. */
637
+ readonly questions: Readonly<Record<string, DecisionQuestion>>;
638
638
  };
639
639
  /**
640
- * Event fired after the evaluation model response has been validated.
640
+ * Event fired after the decision model response has been validated.
641
641
  *
642
642
  * Contains the result of the logical model call, including any retries.
643
643
  */
644
- type EvaluationModelCallEndEvent = EvaluationModelCallStartEvent & {
644
+ type DecisionModelCallEndEvent = DecisionModelCallStartEvent & {
645
645
  /** 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'];
646
+ readonly answers: Experimental_DecisionModelV4Result['answers'];
647
+ /** Token usage reported by the decision model. */
648
+ readonly usage?: Experimental_DecisionModelV4Result['usage'];
649
+ /** Warnings from the decision model. */
650
+ readonly warnings: Experimental_DecisionModelV4Result['warnings'];
651
651
  /** Provider-declared decimal precision for probabilities and scores. */
652
- readonly rounding?: Experimental_EvaluationModelV4Result['rounding'];
652
+ readonly rounding?: Experimental_DecisionModelV4Result['rounding'];
653
653
  /** Optional provider-specific metadata. */
654
- readonly providerMetadata?: Experimental_EvaluationModelV4Result['providerMetadata'];
654
+ readonly providerMetadata?: Experimental_DecisionModelV4Result['providerMetadata'];
655
655
  /** Optional raw response metadata from the provider. */
656
- readonly response?: Experimental_EvaluationModelV4Result['response'];
656
+ readonly response?: Experimental_DecisionModelV4Result['response'];
657
657
  };
658
658
  //#endregion
659
659
  //#region src/prompt/language-model-call-options.d.ts
@@ -4634,7 +4634,7 @@ type StreamTranscriptionEndEvent = TranscriptionEndEventFor<'ai.streamTranscribe
4634
4634
  //#endregion
4635
4635
  //#region src/telemetry/tracing-channel.d.ts
4636
4636
  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';
4637
+ type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'generateSpeech' | 'transcribe' | 'streamTranscribe' | 'experimental_decide';
4638
4638
  type TelemetryTracingChannelMessage<EVENT = unknown> = {
4639
4639
  readonly type: TelemetryTracingEventType;
4640
4640
  readonly event: EVENT;
@@ -4743,20 +4743,28 @@ interface Telemetry {
4743
4743
  * Contains the ranking results from the model response.
4744
4744
  */
4745
4745
  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.
4746
+ /** @deprecated Use `experimental_onDecideStart` instead. */
4747
+ experimental_onEvaluateStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
4748
+ /** @deprecated Use `experimental_onDecisionModelCallStart` instead. */
4749
+ experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
4750
+ /** @deprecated Use `experimental_onDecisionModelCallEnd` instead. */
4751
+ experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
4752
+ /** @deprecated Use `experimental_onDecideEnd` instead. */
4753
+ experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
4754
+ /** Called when an experimental decision operation begins. */
4755
+ experimental_onDecideStart?: Callback<InferTelemetryEvent<DecideStartEvent>>;
4756
+ /**
4757
+ * Called immediately before an experimental decision model call begins.
4750
4758
  * The logical model call includes any provider retries.
4751
4759
  */
4752
- experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<EvaluationModelCallStartEvent>>;
4760
+ experimental_onDecisionModelCallStart?: Callback<InferTelemetryEvent<DecisionModelCallStartEvent>>;
4753
4761
  /**
4754
- * Called after an experimental evaluation model response has been validated.
4762
+ * Called after an experimental decision model response has been validated.
4755
4763
  * The logical model call includes any provider retries.
4756
4764
  */
4757
- experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<EvaluationModelCallEndEvent>>;
4758
- /** Called when an experimental evaluation operation completes. */
4759
- experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<EvaluateEndEvent>>;
4765
+ experimental_onDecisionModelCallEnd?: Callback<InferTelemetryEvent<DecisionModelCallEndEvent>>;
4766
+ /** Called when an experimental decision operation completes. */
4767
+ experimental_onDecideEnd?: Callback<InferTelemetryEvent<DecideEndEvent>>;
4760
4768
  /** Called when an experimental streaming transcription operation begins. */
4761
4769
  experimental_onStreamTranscriptionStart?: Callback<InferTelemetryEvent<StreamTranscriptionStartEvent>>;
4762
4770
  /** Called when an experimental streaming transcription operation completes. */
@@ -4819,7 +4827,7 @@ declare global {
4819
4827
  * String model ids are resolved to the default provider and model id.
4820
4828
  *
4821
4829
  * If not set, the default provider is the Vercel AI gateway provider.
4822
- * Experimental evaluation requires an explicitly configured evaluation-capable provider.
4830
+ * An explicitly configured provider must support decision models to use experimental_decide.
4823
4831
  *
4824
4832
  * @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
4825
4833
  */
@@ -8057,12 +8065,18 @@ export declare class RetryError extends AISDKError$1 {
8057
8065
  static isInstance(error: unknown): error is RetryError;
8058
8066
  }
8059
8067
  //#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'];
8068
+ //#region src/error/index.d.ts
8069
+ /** @deprecated Use `Experimental_DecisionUnsupportedQuestionTypeError` instead. */
8070
+ export declare const Experimental_EvaluationUnsupportedQuestionTypeError: typeof Experimental_DecisionUnsupportedQuestionTypeError$1;
8071
+ /** @deprecated Use `Experimental_DecisionUnsupportedQuestionTypeError` instead. */
8072
+ export type Experimental_EvaluationUnsupportedQuestionTypeError = Experimental_DecisionUnsupportedQuestionTypeError$1;
8073
+ //#endregion
8074
+ //#region src/decide/decide.d.ts
8075
+ /** Decide answers to typed questions against one shared state. Experimental. */
8076
+ 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 } }: {
8077
+ /** A decision model instance or an ID resolved by the configured default provider. */
8078
+ model: DecisionModel;
8079
+ state: Experimental_DecisionModelV4CallOptions['state'];
8066
8080
  questions: QUESTIONS;
8067
8081
  /** Maximum retries for transient provider failures. Defaults to 2. */
8068
8082
  maxRetries?: number;
@@ -8073,15 +8087,35 @@ declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuest
8073
8087
  telemetry?: TelemetryOptions<RUNTIME_CONTEXT>;
8074
8088
  /** User-defined runtime context. Treat runtime context as immutable. */
8075
8089
  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>>;
8090
+ /** Called when the decide operation begins. */
8091
+ onStart?: Callback<DecideStartEvent<RUNTIME_CONTEXT>>;
8092
+ /** Called when the decide operation completes. */
8093
+ onEnd?: Callback<DecideEndEvent<RUNTIME_CONTEXT>>;
8080
8094
  /** Internal. For test use only. May change without notice. */
8081
8095
  _internal?: {
8082
8096
  generateCallId?: () => string;
8083
8097
  };
8084
- }): Promise<EvaluationResult<QUESTIONS>>;
8098
+ }): Promise<DecisionResult<QUESTIONS>>;
8099
+ //#endregion
8100
+ //#region src/decide/index.d.ts
8101
+ /** @deprecated Use `experimental_decide` instead. */
8102
+ export declare const experimental_evaluate: typeof decide;
8103
+ /** @deprecated Use `Experimental_DecideStartEvent` instead. */
8104
+ export type Experimental_EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = DecideStartEvent<RUNTIME_CONTEXT>;
8105
+ /** @deprecated Use `Experimental_DecideEndEvent` instead. */
8106
+ export type Experimental_EvaluateEndEvent<RUNTIME_CONTEXT extends Context = Context> = DecideEndEvent<RUNTIME_CONTEXT>;
8107
+ /** @deprecated Use `Experimental_DecisionModelCallStartEvent` instead. */
8108
+ export type Experimental_EvaluationModelCallStartEvent = DecisionModelCallStartEvent;
8109
+ /** @deprecated Use `Experimental_DecisionModelCallEndEvent` instead. */
8110
+ export type Experimental_EvaluationModelCallEndEvent = DecisionModelCallEndEvent;
8111
+ /** @deprecated Use `Experimental_DecisionModel` instead. */
8112
+ export type Experimental_EvaluationModel = DecisionModel;
8113
+ /** @deprecated Use `Experimental_DecisionQuestion` instead. */
8114
+ export type Experimental_EvaluationQuestion = DecisionQuestion;
8115
+ /** @deprecated Use `Experimental_DecisionAnswer` instead. */
8116
+ export type Experimental_EvaluationAnswer<QUESTION extends DecisionQuestion> = DecisionAnswer<QUESTION>;
8117
+ /** @deprecated Use `Experimental_DecisionResult` instead. */
8118
+ export type Experimental_EvaluationResult<QUESTIONS extends Record<string, DecisionQuestion>> = DecisionResult<QUESTIONS>;
8085
8119
  //#endregion
8086
8120
  //#region src/generate-object/generate-object-result.d.ts
8087
8121
  /**
@@ -9286,15 +9320,19 @@ export declare function extractJsonMiddleware(options?: {
9286
9320
  //#endregion
9287
9321
  //#region src/middleware/extract-reasoning-middleware.d.ts
9288
9322
  /**
9289
- * Extracts an XML-tagged reasoning section from the generated text and exposes it
9323
+ * Extracts a delimited reasoning section from the generated text and exposes it
9290
9324
  * as a `reasoning` property on the result.
9291
9325
  *
9292
- * @param tagName - The name of the XML tag to extract reasoning from.
9326
+ * @param tagName - An XML tag name (without angle brackets), or literal opening
9327
+ * and closing delimiters for formats such as Gemma's thought channel.
9293
9328
  * @param separator - The separator to use between reasoning and text sections.
9294
9329
  * @param startWithReasoning - Whether to start with reasoning tokens.
9295
9330
  */
9296
9331
  export declare function extractReasoningMiddleware({ tagName, separator, startWithReasoning }: {
9297
- tagName: string;
9332
+ tagName: string | {
9333
+ opening: string;
9334
+ closing: string;
9335
+ };
9298
9336
  separator?: string;
9299
9337
  startWithReasoning?: boolean;
9300
9338
  }): LanguageModelMiddleware;
@@ -9624,6 +9662,85 @@ type RealtimeSetupResponse = {
9624
9662
  tools?: RealtimeToolDefinition[];
9625
9663
  };
9626
9664
  //#endregion
9665
+ //#region src/util/extract-literal-union.d.ts
9666
+ /**
9667
+ * If `text` is exactly the wide `string` type, there are no string literals to
9668
+ * preserve, so this resolves to `never`.
9669
+ *
9670
+ * If `text` is a string literal or a union of string literals, this resolves
9671
+ * to that literal union unchanged.
9672
+ *
9673
+ * This is used when building template-literal model identifiers (for example
9674
+ * `"provider:modelId"`) so that editors can suggest concrete `modelId` values
9675
+ * when the underlying method parameter is narrowed, while falling back to a
9676
+ * generic `"provider:${string}"` style overload when the parameter is only
9677
+ * typed as `string`.
9678
+ */
9679
+ type ExtractLiteralUnion<text> = text extends string ? string extends text ? never : text : never;
9680
+ //#endregion
9681
+ //#region src/registry/provider-registry.d.ts
9682
+ type ProviderVideoModelIdentifier<PROVIDER> = PROVIDER extends {
9683
+ videoModel: (...args: infer ARGS) => unknown;
9684
+ } ? ExtractLiteralUnion<ARGS[0]> : never;
9685
+ type ProviderDecisionModelIdentifier<PROVIDER> = PROVIDER extends {
9686
+ decisionModel: (...args: infer ARGS) => unknown;
9687
+ } ? ExtractLiteralUnion<ARGS[0]> : PROVIDER extends {
9688
+ evaluationModel: (...args: infer ARGS) => unknown;
9689
+ } ? ExtractLiteralUnion<ARGS[0]> : never;
9690
+ /** Registry with experimental decision access, separate from the stable interface. */
9691
+ type DecisionProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> = ProviderRegistryProvider<PROVIDERS, SEPARATOR> & {
9692
+ decisionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderDecisionModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_DecisionModelV4;
9693
+ decisionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_DecisionModelV4;
9694
+ /** @deprecated Use `decisionModel` instead. */
9695
+ evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderDecisionModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_DecisionModelV4 & {
9696
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9697
+ };
9698
+ /** @deprecated Use `decisionModel` instead. */
9699
+ evaluationModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_DecisionModelV4 & {
9700
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9701
+ };
9702
+ };
9703
+ interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> {
9704
+ languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV4;
9705
+ languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): LanguageModelV4;
9706
+ embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['embeddingModel']>>[0]>}` : never): EmbeddingModelV4;
9707
+ embeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): EmbeddingModelV4;
9708
+ imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never): ImageModelV4;
9709
+ imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): ImageModelV4;
9710
+ transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['transcriptionModel']>>[0]>}` : never): TranscriptionModelV4;
9711
+ transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): TranscriptionModelV4;
9712
+ speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['speechModel']>>[0]>}` : never): SpeechModelV4;
9713
+ speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): SpeechModelV4;
9714
+ rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['rerankingModel']>>[0]>}` : never): RerankingModelV4;
9715
+ rerankingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): RerankingModelV4;
9716
+ videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ProviderVideoModelIdentifier<PROVIDERS[KEY]>}` : never): Experimental_VideoModelV4;
9717
+ videoModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): Experimental_VideoModelV4;
9718
+ files<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): FilesV4;
9719
+ skills<KEY extends keyof PROVIDERS>(id: KEY extends string ? KEY & string : never): SkillsV4;
9720
+ }
9721
+ /**
9722
+ * Creates a registry for the given providers with optional middleware functionality.
9723
+ * This function allows you to register multiple providers and optionally apply middleware
9724
+ * to all language models from the registry, enabling you to transform parameters, wrap generate
9725
+ * operations, and wrap stream operations for every language model accessed through the registry.
9726
+ *
9727
+ * @param providers - A record of provider instances to be registered in the registry.
9728
+ * @param options - Configuration options for the provider registry.
9729
+ * @param options.separator - The separator used between provider ID and model ID in the combined identifier. Defaults to ':'.
9730
+ * @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.
9731
+ * @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.
9732
+ * @returns A new ProviderRegistryProvider instance that provides access to all registered providers with optional middleware applied to language and image models.
9733
+ */
9734
+ export declare function createProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'>(providers: PROVIDERS, { separator, languageModelMiddleware, imageModelMiddleware }?: {
9735
+ separator?: SEPARATOR;
9736
+ languageModelMiddleware?: LanguageModelMiddleware | LanguageModelMiddleware[];
9737
+ imageModelMiddleware?: ImageModelMiddleware | ImageModelMiddleware[];
9738
+ }): DecisionProviderRegistry<PROVIDERS, SEPARATOR>;
9739
+ /**
9740
+ * @deprecated Use `createProviderRegistry` instead.
9741
+ */
9742
+ export declare const experimental_createProviderRegistry: typeof createProviderRegistry;
9743
+ //#endregion
9627
9744
  //#region src/registry/custom-provider.d.ts
9628
9745
  /**
9629
9746
  * 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 +9753,7 @@ type RealtimeSetupResponse = {
9636
9753
  * @param {Record<string, SpeechModel>} [options.speechModels] - A record of speech models, where keys are model IDs and values are speech model instances.
9637
9754
  * @param {Record<string, RerankingModel>} [options.rerankingModels] - A record of reranking models, where keys are model IDs and values are reranking model instances.
9638
9755
  * @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.
9756
+ * @param {Record<string, DecisionModel>} [options.decisionModels] - Experimental decision models or default-provider model IDs, keyed by alias.
9640
9757
  * @param {FilesV4} [options.files] - A files interface for uploading files.
9641
9758
  * @param {SkillsV4} [options.skills] - A skills interface for uploading skills.
9642
9759
  * @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 +9761,7 @@ type RealtimeSetupResponse = {
9644
9761
  *
9645
9762
  * @throws {NoSuchModelError} Throws when a requested model is not found and no fallback provider is available.
9646
9763
  */
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 }: {
9764
+ 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
9765
  languageModels?: LANGUAGE_MODELS;
9649
9766
  embeddingModels?: EMBEDDING_MODELS;
9650
9767
  imageModels?: IMAGE_MODELS;
@@ -9652,7 +9769,9 @@ export declare function customProvider<LANGUAGE_MODELS extends Record<string, La
9652
9769
  speechModels?: SPEECH_MODELS;
9653
9770
  rerankingModels?: RERANKING_MODELS;
9654
9771
  videoModels?: VIDEO_MODELS;
9655
- evaluationModels?: EVALUATION_MODELS;
9772
+ decisionModels?: DECISION_MODELS;
9773
+ /** @deprecated Use `decisionModels` instead. When both are set, `decisionModels` takes precedence. */
9774
+ evaluationModels?: DECISION_MODELS;
9656
9775
  files?: FILES;
9657
9776
  skills?: SKILLS;
9658
9777
  fallbackProvider?: FALLBACK;
@@ -9664,7 +9783,11 @@ export declare function customProvider<LANGUAGE_MODELS extends Record<string, La
9664
9783
  rerankingModel(modelId: ExtractModelId<RERANKING_MODELS>): RerankingModelV4;
9665
9784
  speechModel(modelId: ExtractModelId<SPEECH_MODELS>): SpeechModelV4;
9666
9785
  videoModel(modelId: ExtractModelId<VIDEO_MODELS>): Experimental_VideoModelV4;
9667
- evaluationModel(modelId: ExtractModelId<EVALUATION_MODELS>): Experimental_EvaluationModelV4;
9786
+ decisionModel(modelId: ExtractModelId<DECISION_MODELS>): Experimental_DecisionModelV4;
9787
+ /** @deprecated Use `decisionModel` instead. */
9788
+ evaluationModel(modelId: ExtractModelId<DECISION_MODELS>): Experimental_DecisionModelV4 & {
9789
+ doEvaluate: Experimental_DecisionModelV4['doDecide'];
9790
+ };
9668
9791
  } & (FILES extends FilesV4 ? {
9669
9792
  files(): FilesV4;
9670
9793
  } : [FALLBACK] extends [{
@@ -9692,7 +9815,9 @@ export declare class NoSuchProviderError extends NoSuchModelError$1 {
9692
9815
  readonly availableProviders: string[];
9693
9816
  constructor({ modelId, modelType, providerId, availableProviders, message }: {
9694
9817
  modelId: string;
9695
- modelType: 'languageModel' | 'embeddingModel' | 'imageModel' | 'transcriptionModel' | 'speechModel' | 'rerankingModel' | 'videoModel' | 'evaluationModel';
9818
+ modelType: 'languageModel' | 'embeddingModel' | 'imageModel' | 'transcriptionModel' | 'speechModel' | 'rerankingModel' | 'videoModel' | 'decisionModel' |
9819
+ /** @deprecated Use `decisionModel` instead. */
9820
+ 'evaluationModel';
9696
9821
  providerId: string;
9697
9822
  availableProviders: string[];
9698
9823
  message?: string;
@@ -9700,74 +9825,9 @@ export declare class NoSuchProviderError extends NoSuchModelError$1 {
9700
9825
  static isInstance(error: unknown): error is NoSuchProviderError;
9701
9826
  }
9702
9827
  //#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;
9828
+ //#region src/registry/index.d.ts
9829
+ /** @deprecated Use `Experimental_DecisionProviderRegistry` instead. */
9830
+ export type Experimental_EvaluationProviderRegistry<PROVIDERS extends Record<string, ProviderV4 | ProviderV3> = Record<string, ProviderV4 | ProviderV3>, SEPARATOR extends string = ':'> = DecisionProviderRegistry<PROVIDERS, SEPARATOR>;
9771
9831
  //#endregion
9772
9832
  //#region src/rerank/rerank-result.d.ts
9773
9833
  /**
@@ -9984,6 +10044,13 @@ export declare function toTextStream<TOOLS extends ToolSet$1 = ToolSet$1>({ stre
9984
10044
  }): ReadableStream<string>;
9985
10045
  //#endregion
9986
10046
  //#region src/tool-search/tool-search.d.ts
10047
+ type ToolSearchFunction = (options: {
10048
+ query: string;
10049
+ tools: Array<{
10050
+ name: string;
10051
+ description?: string;
10052
+ }>;
10053
+ }) => string[] | PromiseLike<string[]>;
9987
10054
  type ToolSearchInput = {
9988
10055
  query: string;
9989
10056
  };
@@ -9998,7 +10065,20 @@ type ToolSearchOutput = {
9998
10065
  * binds the search registry and makes matches available on the next step.
9999
10066
  * Use directly or through code mode with `toolDiscovery: 'conversation'`.
10000
10067
  */
10001
- export declare function toolSearch(): Tool$1<ToolSearchInput, ToolSearchOutput> & {
10068
+ export declare function toolSearch({ search, maxResults }?: {
10069
+ /**
10070
+ * Search eligible deferred tools and return their names in ranked order.
10071
+ * Supports synchronous and asynchronous callbacks. Unknown names and
10072
+ * duplicates are ignored before applying the result limit.
10073
+ */
10074
+ search?: ToolSearchFunction;
10075
+ /**
10076
+ * Maximum number of matching tools returned per search.
10077
+ *
10078
+ * @default 5
10079
+ */
10080
+ maxResults?: number;
10081
+ }): Tool$1<ToolSearchInput, ToolSearchOutput> & {
10002
10082
  type: 'function';
10003
10083
  };
10004
10084
  //#endregion
@@ -10541,5 +10621,5 @@ export declare function uploadSkill({ api, files, displayTitle, providerOptions
10541
10621
  files: UploadSkillFile[];
10542
10622
  }): Promise<UploadSkillResult>;
10543
10623
  //#endregion
10544
- 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 };
10624
+ 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 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 };
10545
10625
  //# sourceMappingURL=index.d.ts.map