@ai-sdk/anthropic 2.0.108 → 2.0.110

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.
@@ -42,7 +42,7 @@ import {
42
42
  zodSchema as zodSchema2
43
43
  } from "@ai-sdk/provider-utils";
44
44
  import { z as z2 } from "zod/v4";
45
- var anthropicStopDetailsSchema = z2.object({
45
+ var anthropicStopDetailsSchema = () => z2.object({
46
46
  type: z2.string(),
47
47
  category: z2.string().nullish(),
48
48
  explanation: z2.string().nullish(),
@@ -248,7 +248,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
248
248
  ),
249
249
  stop_reason: z2.string().nullish(),
250
250
  stop_sequence: z2.string().nullish(),
251
- stop_details: anthropicStopDetailsSchema.nullish(),
251
+ stop_details: anthropicStopDetailsSchema().nullish(),
252
252
  usage: z2.looseObject({
253
253
  input_tokens: z2.number(),
254
254
  output_tokens: z2.number(),
@@ -552,7 +552,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
552
552
  delta: z2.object({
553
553
  stop_reason: z2.string().nullish(),
554
554
  stop_sequence: z2.string().nullish(),
555
- stop_details: anthropicStopDetailsSchema.nullish(),
555
+ stop_details: anthropicStopDetailsSchema().nullish(),
556
556
  container: z2.object({
557
557
  expires_at: z2.string(),
558
558
  id: z2.string(),
@@ -628,314 +628,330 @@ var anthropicReasoningMetadataSchema = lazySchema2(
628
628
  );
629
629
 
630
630
  // src/anthropic-messages-options.ts
631
+ import {
632
+ lazySchema as lazySchema3,
633
+ zodSchema as zodSchema3
634
+ } from "@ai-sdk/provider-utils";
631
635
  import { z as z3 } from "zod/v4";
632
- var anthropicFilePartProviderOptions = z3.object({
633
- /**
634
- * Citation configuration for this document.
635
- * When enabled, this document will generate citations in the response.
636
- */
637
- citations: z3.object({
638
- /**
639
- * Enable citations for this document
640
- */
641
- enabled: z3.boolean()
642
- }).optional(),
643
- /**
644
- * Custom title for the document.
645
- * If not provided, the filename will be used.
646
- */
647
- title: z3.string().optional(),
648
- /**
649
- * Context about the document that will be passed to the model
650
- * but not used towards cited content.
651
- * Useful for storing document metadata as text or stringified JSON.
652
- */
653
- context: z3.string().optional()
654
- });
655
- var anthropicSystemMessageProviderOptions = z3.object({
656
- /**
657
- * Controls when a mid-conversation system message is cleared.
658
- *
659
- * The value is forwarded to Anthropic as `clear_at`. The required
660
- * `mid-conversation-system-clear-at-2026-08-21` beta is added automatically.
661
- */
662
- clearAt: z3.literal("next_user_message").optional(),
663
- /**
664
- * Sets the model effort from the next user turn until a later message
665
- * changes it. An effort-only system message with empty content can appear
666
- * first. The required `mid-conversation-output-config-2026-07-01` beta is
667
- * added automatically.
668
- */
669
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
670
- /**
671
- * Mid-conversation tool changes. Adds or removes tools from the
672
- * conversation's tool set between turns without invalidating the prompt
673
- * cache.
674
- *
675
- * Only supported on system messages that appear mid-conversation (not the
676
- * initial system prompt). A system message carrying tool changes must come
677
- * right before an assistant message or at the end of the messages.
678
- *
679
- * Tools referenced by a `tool_addition` must be declared in the `tools`
680
- * option (typically with `deferLoading: true` so they are not loaded until
681
- * the addition surfaces them). The required
682
- * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
683
- */
684
- toolChanges: z3.array(
685
- z3.discriminatedUnion("type", [
686
- z3.object({
687
- type: z3.literal("tool_addition"),
688
- toolName: z3.string()
689
- }),
690
- z3.object({
691
- type: z3.literal("tool_removal"),
692
- toolName: z3.string()
693
- })
694
- ])
695
- ).optional()
696
- });
697
- var anthropicThinkingBlockBinding = z3.object({
698
- /**
699
- * Controls behavior when a replayed thinking block does not match its
700
- * conversation prefix. The `drop_block` behavior drops the mismatched block
701
- * instead of returning an invalid signature error.
702
- */
703
- prefixMismatchBehavior: z3.literal("drop_block")
704
- });
705
- var anthropicProviderOptions = z3.object({
706
- /**
707
- * Whether to send reasoning to the model.
708
- *
709
- * This allows you to deactivate reasoning inputs for models that do not support them.
710
- */
711
- sendReasoning: z3.boolean().optional(),
712
- /**
713
- * Determines how structured outputs are generated.
714
- *
715
- * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
716
- * - `jsonTool`: Use a special JSON response tool to specify the structured output format (default for most models).
717
- * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default for Sonnet 5.5, Opus 5.5, and Fable 5.1).
718
- */
719
- structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
720
- /**
721
- * Configuration for enabling Claude's extended thinking.
722
- *
723
- * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
724
- * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
725
- *
726
- * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
727
- * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
728
- * provider drops the unsupported setting, emits a warning, and sends an
729
- * adaptive thinking request. Use `effort` to control how much they think.
730
- *
731
- * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
732
- * and the provider uses it in place of `disabled` for that model.
733
- */
734
- thinking: z3.union([
636
+ var anthropicFilePartProviderOptions = lazySchema3(
637
+ () => zodSchema3(
735
638
  z3.object({
736
- /** for Sonnet 4.6, Opus 4.6, and newer models */
737
- type: z3.literal("adaptive"),
738
639
  /**
739
- * Controls whether thinking content is included in the response.
740
- * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
741
- * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
742
- * - `"updates"`: Thinking summaries are emitted between tool calls.
640
+ * Citation configuration for this document.
641
+ * When enabled, this document will generate citations in the response.
743
642
  */
744
- display: z3.enum(["omitted", "summarized", "updates"]).optional(),
643
+ citations: z3.object({
644
+ /**
645
+ * Enable citations for this document
646
+ */
647
+ enabled: z3.boolean()
648
+ }).optional(),
745
649
  /**
746
- * Controls handling for thinking blocks whose conversation prefix no
747
- * longer matches. Forwarded as `block_binding`.
650
+ * Custom title for the document.
651
+ * If not provided, the filename will be used.
748
652
  */
749
- blockBinding: anthropicThinkingBlockBinding.optional()
750
- }),
751
- z3.object({
752
- /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
753
- type: z3.literal("enabled"),
754
- budgetTokens: z3.number().optional(),
653
+ title: z3.string().optional(),
755
654
  /**
756
- * Controls handling for thinking blocks whose conversation prefix no
757
- * longer matches. Forwarded as `block_binding`.
655
+ * Context about the document that will be passed to the model
656
+ * but not used towards cited content.
657
+ * Useful for storing document metadata as text or stringified JSON.
758
658
  */
759
- blockBinding: anthropicThinkingBlockBinding.optional()
760
- }),
761
- z3.object({
762
- type: z3.literal("disabled")
763
- }),
659
+ context: z3.string().optional()
660
+ })
661
+ )
662
+ );
663
+ var anthropicSystemMessageProviderOptions = lazySchema3(
664
+ () => zodSchema3(
764
665
  z3.object({
765
666
  /**
766
- * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
767
- * between tool calls are returned as summarized thinking blocks.
768
- * Only supported at `low`, `medium`, and `high` effort.
667
+ * Controls when a mid-conversation system message is cleared.
668
+ *
669
+ * The value is forwarded to Anthropic as `clear_at`. The required
670
+ * `mid-conversation-system-clear-at-2026-08-21` beta is added automatically.
769
671
  */
770
- type: z3.literal("between_tools")
771
- }),
772
- z3.object({
672
+ clearAt: z3.literal("next_user_message").optional(),
773
673
  /**
774
- * Configure prefix mismatch handling without changing the model's
775
- * default thinking mode.
674
+ * Sets the model effort from the next user turn until a later message
675
+ * changes it. An effort-only system message with empty content can appear
676
+ * first. The required `mid-conversation-output-config-2026-07-01` beta is
677
+ * added automatically.
776
678
  */
777
- blockBinding: anthropicThinkingBlockBinding
679
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
680
+ /**
681
+ * Mid-conversation tool changes. Adds or removes tools from the
682
+ * conversation's tool set between turns without invalidating the prompt
683
+ * cache.
684
+ *
685
+ * Only supported on system messages that appear mid-conversation (not the
686
+ * initial system prompt). A system message carrying tool changes must come
687
+ * right before an assistant message or at the end of the messages.
688
+ *
689
+ * Tools referenced by a `tool_addition` must be declared in the `tools`
690
+ * option (typically with `deferLoading: true` so they are not loaded until
691
+ * the addition surfaces them). The required
692
+ * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
693
+ */
694
+ toolChanges: z3.array(
695
+ z3.discriminatedUnion("type", [
696
+ z3.object({
697
+ type: z3.literal("tool_addition"),
698
+ toolName: z3.string()
699
+ }),
700
+ z3.object({
701
+ type: z3.literal("tool_removal"),
702
+ toolName: z3.string()
703
+ })
704
+ ])
705
+ ).optional()
778
706
  })
779
- ]).optional(),
780
- /**
781
- * Whether to disable parallel function calling during tool use. Default is false.
782
- * When set to true, Claude will use at most one tool per response.
783
- */
784
- disableParallelToolUse: z3.boolean().optional(),
785
- /**
786
- * Cache control settings for this message.
787
- * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
788
- */
789
- cacheControl: z3.object({
790
- type: z3.literal("ephemeral"),
791
- ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
792
- }).optional(),
793
- /**
794
- * Metadata to include with the request.
795
- *
796
- * See https://platform.claude.com/docs/en/api/messages/create for details.
797
- */
798
- metadata: z3.object({
707
+ )
708
+ );
709
+ var anthropicProviderOptions = lazySchema3(() => {
710
+ const anthropicThinkingBlockBinding = z3.object({
799
711
  /**
800
- * An external identifier for the user associated with the request.
801
- *
802
- * Should be a UUID, hash value, or other opaque identifier.
803
- * Must not contain PII (name, email, phone number, etc.).
712
+ * Controls behavior when a replayed thinking block does not match its
713
+ * conversation prefix. The `drop_block` behavior drops the mismatched block
714
+ * instead of returning an invalid signature error.
804
715
  */
805
- userId: z3.string().optional()
806
- }).optional(),
807
- /**
808
- * Agent Skills configuration. Skills enable Claude to perform specialized tasks
809
- * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
810
- * Requires code execution tool to be enabled.
811
- */
812
- container: z3.object({
813
- id: z3.string().optional(),
814
- skills: z3.array(
815
- z3.object({
816
- type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
817
- skillId: z3.string(),
818
- version: z3.string().optional()
819
- })
820
- ).optional()
821
- }).optional(),
822
- /**
823
- * @default 'high'
824
- */
825
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
826
- /**
827
- * Task budget for agentic turns. Informs the model of the total token budget
828
- * available for the current task, allowing it to prioritize work and wind down
829
- * gracefully as the budget is consumed.
830
- *
831
- * Advisory only — does not enforce a hard token limit.
832
- */
833
- taskBudget: z3.object({
834
- type: z3.literal("tokens"),
835
- total: z3.number().int().min(2e4),
836
- remaining: z3.number().int().min(0).optional()
837
- }).optional(),
838
- /**
839
- * Enable fast mode for faster inference (2.5x faster output token speeds).
840
- * Only supported with claude-opus-4-6.
841
- */
842
- speed: z3.enum(["fast", "standard"]).optional(),
843
- /**
844
- * Controls where model inference runs for this request.
845
- *
846
- * - `"global"`: Inference may run in any available geography (default).
847
- * - `"us"`: Inference runs only in US-based infrastructure.
848
- *
849
- * See https://platform.claude.com/docs/en/build-with-claude/data-residency
850
- */
851
- inferenceGeo: z3.enum(["us", "global"]).optional(),
852
- /**
853
- * Server-side fallback configuration.
854
- *
855
- * When the primary model's safety classifiers block a turn, the API
856
- * automatically retries it server-side on a fallback model. A
857
- * `content-filter` finish reason means the fallback(s) refused as well.
858
- *
859
- * - `'default'` (recommended): the API routes the retry to Anthropic's
860
- * recommended fallback model based on the refusal category. Requires the
861
- * `server-side-fallback-2026-07-01` beta, which is added automatically.
862
- * - Array form: an explicit fallback chain. Each entry is merged into the
863
- * request as a direct request to that entry's model, so it must be
864
- * formatted accordingly: `model` is required, and an entry may
865
- * additionally override `max_tokens`, `thinking`, `output_config`, and
866
- * `speed` for that attempt only (`speed` additionally requires the speed
867
- * beta). The value is passed through to the API as-is, and the
868
- * `server-side-fallback-2026-06-01` beta is added automatically.
869
- */
870
- fallbacks: z3.union([
871
- z3.literal("default"),
872
- z3.array(
873
- z3.object({
874
- model: z3.string(),
875
- max_tokens: z3.number().int().optional(),
876
- thinking: z3.record(z3.string(), z3.unknown()).optional(),
877
- output_config: z3.record(z3.string(), z3.unknown()).optional(),
878
- speed: z3.enum(["fast", "standard"]).optional()
879
- })
880
- )
881
- ]).optional(),
882
- /**
883
- * Context management configuration for automatic context window management.
884
- * Enables features like automatic compaction and clearing of tool uses/thinking blocks.
885
- */
886
- contextManagement: z3.object({
887
- edits: z3.array(
888
- z3.discriminatedUnion("type", [
716
+ prefixMismatchBehavior: z3.literal("drop_block")
717
+ });
718
+ return zodSchema3(
719
+ z3.object({
720
+ /**
721
+ * Whether to send reasoning to the model.
722
+ *
723
+ * This allows you to deactivate reasoning inputs for models that do not support them.
724
+ */
725
+ sendReasoning: z3.boolean().optional(),
726
+ /**
727
+ * Determines how structured outputs are generated.
728
+ *
729
+ * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
730
+ * - `jsonTool`: Use a special JSON response tool to specify the structured output format (default for most models).
731
+ * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default for Sonnet 5.5, Opus 5.5, and Fable 5.1).
732
+ */
733
+ structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
734
+ /**
735
+ * Configuration for enabling Claude's extended thinking.
736
+ *
737
+ * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
738
+ * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
739
+ *
740
+ * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
741
+ * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
742
+ * provider drops the unsupported setting, emits a warning, and sends an
743
+ * adaptive thinking request. Use `effort` to control how much they think.
744
+ *
745
+ * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
746
+ * and the provider uses it in place of `disabled` for that model.
747
+ */
748
+ thinking: z3.union([
889
749
  z3.object({
890
- type: z3.literal("clear_tool_uses_20250919"),
891
- trigger: z3.discriminatedUnion("type", [
892
- z3.object({
893
- type: z3.literal("input_tokens"),
894
- value: z3.number()
895
- }),
896
- z3.object({
897
- type: z3.literal("tool_uses"),
898
- value: z3.number()
899
- })
900
- ]).optional(),
901
- keep: z3.object({
902
- type: z3.literal("tool_uses"),
903
- value: z3.number()
904
- }).optional(),
905
- clearAtLeast: z3.object({
906
- type: z3.literal("input_tokens"),
907
- value: z3.number()
908
- }).optional(),
909
- clearToolInputs: z3.boolean().optional(),
910
- excludeTools: z3.array(z3.string()).optional()
750
+ /** for Sonnet 4.6, Opus 4.6, and newer models */
751
+ type: z3.literal("adaptive"),
752
+ /**
753
+ * Controls whether thinking content is included in the response.
754
+ * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
755
+ * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
756
+ * - `"updates"`: Thinking summaries are emitted between tool calls.
757
+ */
758
+ display: z3.enum(["omitted", "summarized", "updates"]).optional(),
759
+ /**
760
+ * Controls handling for thinking blocks whose conversation prefix no
761
+ * longer matches. Forwarded as `block_binding`.
762
+ */
763
+ blockBinding: anthropicThinkingBlockBinding.optional()
911
764
  }),
912
765
  z3.object({
913
- type: z3.literal("clear_thinking_20251015"),
914
- keep: z3.union([
915
- z3.literal("all"),
916
- z3.object({
917
- type: z3.literal("thinking_turns"),
918
- value: z3.number()
919
- })
920
- ]).optional()
766
+ /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
767
+ type: z3.literal("enabled"),
768
+ budgetTokens: z3.number().optional(),
769
+ /**
770
+ * Controls handling for thinking blocks whose conversation prefix no
771
+ * longer matches. Forwarded as `block_binding`.
772
+ */
773
+ blockBinding: anthropicThinkingBlockBinding.optional()
774
+ }),
775
+ z3.object({
776
+ type: z3.literal("disabled")
777
+ }),
778
+ z3.object({
779
+ /**
780
+ * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
781
+ * between tool calls are returned as summarized thinking blocks.
782
+ * Only supported at `low`, `medium`, and `high` effort.
783
+ */
784
+ type: z3.literal("between_tools")
921
785
  }),
922
786
  z3.object({
923
- type: z3.literal("compact_20260112"),
924
- trigger: z3.object({
925
- type: z3.literal("input_tokens"),
926
- value: z3.number()
927
- }).optional(),
928
- pauseAfterCompaction: z3.boolean().optional(),
929
- instructions: z3.string().optional()
787
+ /**
788
+ * Configure prefix mismatch handling without changing the model's
789
+ * default thinking mode.
790
+ */
791
+ blockBinding: anthropicThinkingBlockBinding
930
792
  })
931
- ])
932
- )
933
- }).optional(),
934
- /**
935
- * A set of beta features to enable.
936
- * Allow a provider to receive the full `betas` set if it needs it.
937
- */
938
- anthropicBeta: z3.array(z3.string()).optional()
793
+ ]).optional(),
794
+ /**
795
+ * Whether to disable parallel function calling during tool use. Default is false.
796
+ * When set to true, Claude will use at most one tool per response.
797
+ */
798
+ disableParallelToolUse: z3.boolean().optional(),
799
+ /**
800
+ * Cache control settings for this message.
801
+ * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
802
+ */
803
+ cacheControl: z3.object({
804
+ type: z3.literal("ephemeral"),
805
+ ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
806
+ }).optional(),
807
+ /**
808
+ * Metadata to include with the request.
809
+ *
810
+ * See https://platform.claude.com/docs/en/api/messages/create for details.
811
+ */
812
+ metadata: z3.object({
813
+ /**
814
+ * An external identifier for the user associated with the request.
815
+ *
816
+ * Should be a UUID, hash value, or other opaque identifier.
817
+ * Must not contain PII (name, email, phone number, etc.).
818
+ */
819
+ userId: z3.string().optional()
820
+ }).optional(),
821
+ /**
822
+ * Agent Skills configuration. Skills enable Claude to perform specialized tasks
823
+ * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
824
+ * Requires code execution tool to be enabled.
825
+ */
826
+ container: z3.object({
827
+ id: z3.string().optional(),
828
+ skills: z3.array(
829
+ z3.object({
830
+ type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
831
+ skillId: z3.string(),
832
+ version: z3.string().optional()
833
+ })
834
+ ).optional()
835
+ }).optional(),
836
+ /**
837
+ * @default 'high'
838
+ */
839
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
840
+ /**
841
+ * Task budget for agentic turns. Informs the model of the total token budget
842
+ * available for the current task, allowing it to prioritize work and wind down
843
+ * gracefully as the budget is consumed.
844
+ *
845
+ * Advisory only — does not enforce a hard token limit.
846
+ */
847
+ taskBudget: z3.object({
848
+ type: z3.literal("tokens"),
849
+ total: z3.number().int().min(2e4),
850
+ remaining: z3.number().int().min(0).optional()
851
+ }).optional(),
852
+ /**
853
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
854
+ * Only supported with claude-opus-4-6.
855
+ */
856
+ speed: z3.enum(["fast", "standard"]).optional(),
857
+ /**
858
+ * Controls where model inference runs for this request.
859
+ *
860
+ * - `"global"`: Inference may run in any available geography (default).
861
+ * - `"us"`: Inference runs only in US-based infrastructure.
862
+ *
863
+ * See https://platform.claude.com/docs/en/build-with-claude/data-residency
864
+ */
865
+ inferenceGeo: z3.enum(["us", "global"]).optional(),
866
+ /**
867
+ * Server-side fallback configuration.
868
+ *
869
+ * When the primary model's safety classifiers block a turn, the API
870
+ * automatically retries it server-side on a fallback model. A
871
+ * `content-filter` finish reason means the fallback(s) refused as well.
872
+ *
873
+ * - `'default'` (recommended): the API routes the retry to Anthropic's
874
+ * recommended fallback model based on the refusal category. Requires the
875
+ * `server-side-fallback-2026-07-01` beta, which is added automatically.
876
+ * - Array form: an explicit fallback chain. Each entry is merged into the
877
+ * request as a direct request to that entry's model, so it must be
878
+ * formatted accordingly: `model` is required, and an entry may
879
+ * additionally override `max_tokens`, `thinking`, `output_config`, and
880
+ * `speed` for that attempt only (`speed` additionally requires the speed
881
+ * beta). The value is passed through to the API as-is, and the
882
+ * `server-side-fallback-2026-06-01` beta is added automatically.
883
+ */
884
+ fallbacks: z3.union([
885
+ z3.literal("default"),
886
+ z3.array(
887
+ z3.object({
888
+ model: z3.string(),
889
+ max_tokens: z3.number().int().optional(),
890
+ thinking: z3.record(z3.string(), z3.unknown()).optional(),
891
+ output_config: z3.record(z3.string(), z3.unknown()).optional(),
892
+ speed: z3.enum(["fast", "standard"]).optional()
893
+ })
894
+ )
895
+ ]).optional(),
896
+ /**
897
+ * Context management configuration for automatic context window management.
898
+ * Enables features like automatic compaction and clearing of tool uses/thinking blocks.
899
+ */
900
+ contextManagement: z3.object({
901
+ edits: z3.array(
902
+ z3.discriminatedUnion("type", [
903
+ z3.object({
904
+ type: z3.literal("clear_tool_uses_20250919"),
905
+ trigger: z3.discriminatedUnion("type", [
906
+ z3.object({
907
+ type: z3.literal("input_tokens"),
908
+ value: z3.number()
909
+ }),
910
+ z3.object({
911
+ type: z3.literal("tool_uses"),
912
+ value: z3.number()
913
+ })
914
+ ]).optional(),
915
+ keep: z3.object({
916
+ type: z3.literal("tool_uses"),
917
+ value: z3.number()
918
+ }).optional(),
919
+ clearAtLeast: z3.object({
920
+ type: z3.literal("input_tokens"),
921
+ value: z3.number()
922
+ }).optional(),
923
+ clearToolInputs: z3.boolean().optional(),
924
+ excludeTools: z3.array(z3.string()).optional()
925
+ }),
926
+ z3.object({
927
+ type: z3.literal("clear_thinking_20251015"),
928
+ keep: z3.union([
929
+ z3.literal("all"),
930
+ z3.object({
931
+ type: z3.literal("thinking_turns"),
932
+ value: z3.number()
933
+ })
934
+ ]).optional()
935
+ }),
936
+ z3.object({
937
+ type: z3.literal("compact_20260112"),
938
+ trigger: z3.object({
939
+ type: z3.literal("input_tokens"),
940
+ value: z3.number()
941
+ }).optional(),
942
+ pauseAfterCompaction: z3.boolean().optional(),
943
+ instructions: z3.string().optional()
944
+ })
945
+ ])
946
+ )
947
+ }).optional(),
948
+ /**
949
+ * A set of beta features to enable.
950
+ * Allow a provider to receive the full `betas` set if it needs it.
951
+ */
952
+ anthropicBeta: z3.array(z3.string()).optional()
953
+ })
954
+ );
939
955
  });
940
956
 
941
957
  // src/anthropic-prepare-tools.ts
@@ -988,8 +1004,8 @@ var CacheControlValidator = class {
988
1004
  // src/tool/computer-toolset_20260801.ts
989
1005
  import {
990
1006
  createProviderDefinedToolFactory,
991
- lazySchema as lazySchema3,
992
- zodSchema as zodSchema3
1007
+ lazySchema as lazySchema4,
1008
+ zodSchema as zodSchema4
993
1009
  } from "@ai-sdk/provider-utils";
994
1010
  import { z as z4 } from "zod/v4";
995
1011
  var computerToolset_20260801Members = [
@@ -1011,8 +1027,8 @@ var computerToolset_20260801Members = [
1011
1027
  "hold_key",
1012
1028
  "wait"
1013
1029
  ];
1014
- var computerToolset_20260801InputSchema = lazySchema3(
1015
- () => zodSchema3(
1030
+ var computerToolset_20260801InputSchema = lazySchema4(
1031
+ () => zodSchema4(
1016
1032
  z4.object({
1017
1033
  action: z4.enum(computerToolset_20260801Members),
1018
1034
  coordinate: z4.tuple([z4.number().int(), z4.number().int()]).optional(),
@@ -1031,8 +1047,8 @@ var computerToolset_20260801InputSchema = lazySchema3(
1031
1047
  })
1032
1048
  )
1033
1049
  );
1034
- var computerToolset_20260801ArgsSchema = lazySchema3(
1035
- () => zodSchema3(
1050
+ var computerToolset_20260801ArgsSchema = lazySchema4(
1051
+ () => zodSchema4(
1036
1052
  z4.object({
1037
1053
  configs: z4.partialRecord(
1038
1054
  z4.enum(computerToolset_20260801Members),
@@ -1053,19 +1069,19 @@ var computerToolset_20260801 = createProviderDefinedToolFactory({
1053
1069
  // src/tool/text-editor_20250728.ts
1054
1070
  import {
1055
1071
  createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
1056
- lazySchema as lazySchema4,
1057
- zodSchema as zodSchema4
1072
+ lazySchema as lazySchema5,
1073
+ zodSchema as zodSchema5
1058
1074
  } from "@ai-sdk/provider-utils";
1059
1075
  import { z as z5 } from "zod/v4";
1060
- var textEditor_20250728ArgsSchema = lazySchema4(
1061
- () => zodSchema4(
1076
+ var textEditor_20250728ArgsSchema = lazySchema5(
1077
+ () => zodSchema5(
1062
1078
  z5.object({
1063
1079
  maxCharacters: z5.number().optional()
1064
1080
  })
1065
1081
  )
1066
1082
  );
1067
- var textEditor_20250728InputSchema = lazySchema4(
1068
- () => zodSchema4(
1083
+ var textEditor_20250728InputSchema = lazySchema5(
1084
+ () => zodSchema5(
1069
1085
  z5.object({
1070
1086
  command: z5.enum(["view", "create", "str_replace", "insert"]),
1071
1087
  path: z5.string(),
@@ -1089,12 +1105,12 @@ var textEditor_20250728 = (args = {}) => {
1089
1105
  // src/tool/web-search_20250305.ts
1090
1106
  import {
1091
1107
  createProviderDefinedToolFactoryWithOutputSchema,
1092
- lazySchema as lazySchema5,
1093
- zodSchema as zodSchema5
1108
+ lazySchema as lazySchema6,
1109
+ zodSchema as zodSchema6
1094
1110
  } from "@ai-sdk/provider-utils";
1095
1111
  import { z as z6 } from "zod/v4";
1096
- var webSearch_20250305ArgsSchema = lazySchema5(
1097
- () => zodSchema5(
1112
+ var webSearch_20250305ArgsSchema = lazySchema6(
1113
+ () => zodSchema6(
1098
1114
  z6.object({
1099
1115
  maxUses: z6.number().optional(),
1100
1116
  allowedDomains: z6.array(z6.string()).optional(),
@@ -1109,8 +1125,8 @@ var webSearch_20250305ArgsSchema = lazySchema5(
1109
1125
  })
1110
1126
  )
1111
1127
  );
1112
- var webSearch_20250305OutputSchema = lazySchema5(
1113
- () => zodSchema5(
1128
+ var webSearch_20250305OutputSchema = lazySchema6(
1129
+ () => zodSchema6(
1114
1130
  z6.array(
1115
1131
  z6.object({
1116
1132
  url: z6.string(),
@@ -1122,8 +1138,8 @@ var webSearch_20250305OutputSchema = lazySchema5(
1122
1138
  )
1123
1139
  )
1124
1140
  );
1125
- var webSearch_20250305InputSchema = lazySchema5(
1126
- () => zodSchema5(
1141
+ var webSearch_20250305InputSchema = lazySchema6(
1142
+ () => zodSchema6(
1127
1143
  z6.object({
1128
1144
  query: z6.string()
1129
1145
  })
@@ -1142,12 +1158,12 @@ var webSearch_20250305 = (args = {}) => {
1142
1158
  // src/tool/web-fetch-20250910.ts
1143
1159
  import {
1144
1160
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
1145
- lazySchema as lazySchema6,
1146
- zodSchema as zodSchema6
1161
+ lazySchema as lazySchema7,
1162
+ zodSchema as zodSchema7
1147
1163
  } from "@ai-sdk/provider-utils";
1148
1164
  import { z as z7 } from "zod/v4";
1149
- var webFetch_20250910ArgsSchema = lazySchema6(
1150
- () => zodSchema6(
1165
+ var webFetch_20250910ArgsSchema = lazySchema7(
1166
+ () => zodSchema7(
1151
1167
  z7.object({
1152
1168
  maxUses: z7.number().optional(),
1153
1169
  allowedDomains: z7.array(z7.string()).optional(),
@@ -1157,8 +1173,8 @@ var webFetch_20250910ArgsSchema = lazySchema6(
1157
1173
  })
1158
1174
  )
1159
1175
  );
1160
- var webFetch_20250910OutputSchema = lazySchema6(
1161
- () => zodSchema6(
1176
+ var webFetch_20250910OutputSchema = lazySchema7(
1177
+ () => zodSchema7(
1162
1178
  z7.object({
1163
1179
  type: z7.literal("web_fetch_result"),
1164
1180
  url: z7.string(),
@@ -1183,8 +1199,8 @@ var webFetch_20250910OutputSchema = lazySchema6(
1183
1199
  })
1184
1200
  )
1185
1201
  );
1186
- var webFetch_20250910InputSchema = lazySchema6(
1187
- () => zodSchema6(
1202
+ var webFetch_20250910InputSchema = lazySchema7(
1203
+ () => zodSchema7(
1188
1204
  z7.object({
1189
1205
  url: z7.string()
1190
1206
  })
@@ -1523,12 +1539,12 @@ import {
1523
1539
  // src/tool/code-execution_20250522.ts
1524
1540
  import {
1525
1541
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
1526
- lazySchema as lazySchema7,
1527
- zodSchema as zodSchema7
1542
+ lazySchema as lazySchema8,
1543
+ zodSchema as zodSchema8
1528
1544
  } from "@ai-sdk/provider-utils";
1529
1545
  import { z as z8 } from "zod/v4";
1530
- var codeExecution_20250522OutputSchema = lazySchema7(
1531
- () => zodSchema7(
1546
+ var codeExecution_20250522OutputSchema = lazySchema8(
1547
+ () => zodSchema8(
1532
1548
  z8.object({
1533
1549
  type: z8.literal("code_execution_result"),
1534
1550
  stdout: z8.string(),
@@ -1537,8 +1553,8 @@ var codeExecution_20250522OutputSchema = lazySchema7(
1537
1553
  })
1538
1554
  )
1539
1555
  );
1540
- var codeExecution_20250522InputSchema = lazySchema7(
1541
- () => zodSchema7(
1556
+ var codeExecution_20250522InputSchema = lazySchema8(
1557
+ () => zodSchema8(
1542
1558
  z8.object({
1543
1559
  code: z8.string()
1544
1560
  })
@@ -1557,12 +1573,12 @@ var codeExecution_20250522 = (args = {}) => {
1557
1573
  // src/tool/code-execution_20250825.ts
1558
1574
  import {
1559
1575
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
1560
- lazySchema as lazySchema8,
1561
- zodSchema as zodSchema8
1576
+ lazySchema as lazySchema9,
1577
+ zodSchema as zodSchema9
1562
1578
  } from "@ai-sdk/provider-utils";
1563
1579
  import { z as z9 } from "zod/v4";
1564
- var codeExecution_20250825OutputSchema = lazySchema8(
1565
- () => zodSchema8(
1580
+ var codeExecution_20250825OutputSchema = lazySchema9(
1581
+ () => zodSchema9(
1566
1582
  z9.discriminatedUnion("type", [
1567
1583
  z9.object({
1568
1584
  type: z9.literal("bash_code_execution_result"),
@@ -1607,8 +1623,8 @@ var codeExecution_20250825OutputSchema = lazySchema8(
1607
1623
  ])
1608
1624
  )
1609
1625
  );
1610
- var codeExecution_20250825InputSchema = lazySchema8(
1611
- () => zodSchema8(
1626
+ var codeExecution_20250825InputSchema = lazySchema9(
1627
+ () => zodSchema9(
1612
1628
  z9.discriminatedUnion("type", [
1613
1629
  z9.object({
1614
1630
  type: z9.literal("bash_code_execution"),
@@ -2664,6 +2680,7 @@ var AnthropicMessagesLanguageModel = class {
2664
2680
  rejectsSamplingParameters,
2665
2681
  rejectsThinkingDisabledAboveHighEffort,
2666
2682
  rejectsThinkingDisabled,
2683
+ rejectsBudgetThinking,
2667
2684
  rejectsForcedToolUse,
2668
2685
  supportsBetweenToolsThinking,
2669
2686
  isKnownModel
@@ -2750,20 +2767,22 @@ var AnthropicMessagesLanguageModel = class {
2750
2767
  details: `thinking cannot be disabled for ${this.modelId}; it always uses adaptive thinking. The thinking setting has been removed. Lower 'effort' to reduce thinking.`
2751
2768
  });
2752
2769
  anthropicOptions.thinking = void 0;
2753
- } else if ("type" in thinking && thinking.type === "enabled") {
2754
- warnings.push({
2755
- type: "unsupported-setting",
2756
- setting: "providerOptions.anthropic.thinking",
2757
- details: `budget-based thinking is not supported by ${this.modelId}; it always uses adaptive thinking. Using adaptive thinking instead. Use 'effort' to control how much the model thinks.`
2758
- });
2759
- anthropicOptions.thinking = {
2760
- type: "adaptive",
2761
- ...thinking.blockBinding != null && {
2762
- blockBinding: thinking.blockBinding
2763
- }
2764
- };
2765
2770
  }
2766
2771
  }
2772
+ const budgetThinking = anthropicOptions == null ? void 0 : anthropicOptions.thinking;
2773
+ if (anthropicOptions != null && rejectsBudgetThinking && budgetThinking != null && "type" in budgetThinking && budgetThinking.type === "enabled") {
2774
+ warnings.push({
2775
+ type: "unsupported-setting",
2776
+ setting: "providerOptions.anthropic.thinking",
2777
+ details: rejectsThinkingDisabled ? `budget-based thinking is not supported by ${this.modelId}; it always uses adaptive thinking. Using adaptive thinking instead. Use 'effort' to control how much the model thinks.` : `budget-based thinking is not supported by ${this.modelId}. Using adaptive thinking instead. Use 'effort' to control how much the model thinks.`
2778
+ });
2779
+ anthropicOptions.thinking = {
2780
+ type: "adaptive",
2781
+ ...budgetThinking.blockBinding != null && {
2782
+ blockBinding: budgetThinking.blockBinding
2783
+ }
2784
+ };
2785
+ }
2767
2786
  const thinkingOptions = anthropicOptions == null ? void 0 : anthropicOptions.thinking;
2768
2787
  const thinkingType = thinkingOptions != null && "type" in thinkingOptions ? thinkingOptions.type : void 0;
2769
2788
  if (rejectsThinkingDisabledAboveHighEffort && thinkingType === "disabled" && anthropicOptions != null && (anthropicOptions.effort === "xhigh" || anthropicOptions.effort === "max")) {
@@ -4154,6 +4173,7 @@ function getModelCapabilities(modelId) {
4154
4173
  rejectsSamplingParameters: true,
4155
4174
  rejectsThinkingDisabledAboveHighEffort: true,
4156
4175
  rejectsThinkingDisabled: true,
4176
+ rejectsBudgetThinking: true,
4157
4177
  rejectsForcedToolUse: true,
4158
4178
  supportsBetweenToolsThinking: true,
4159
4179
  isKnownModel: true
@@ -4165,10 +4185,23 @@ function getModelCapabilities(modelId) {
4165
4185
  rejectsSamplingParameters: true,
4166
4186
  rejectsThinkingDisabledAboveHighEffort: true,
4167
4187
  rejectsThinkingDisabled: true,
4188
+ rejectsBudgetThinking: true,
4168
4189
  rejectsForcedToolUse: true,
4169
4190
  supportsBetweenToolsThinking: false,
4170
4191
  isKnownModel: true
4171
4192
  };
4193
+ } else if (modelId.includes("claude-haiku-5-5")) {
4194
+ return {
4195
+ maxOutputTokens: 128e3,
4196
+ supportsStructuredOutput: true,
4197
+ rejectsSamplingParameters: true,
4198
+ rejectsThinkingDisabledAboveHighEffort: true,
4199
+ rejectsThinkingDisabled: false,
4200
+ rejectsBudgetThinking: true,
4201
+ rejectsForcedToolUse: false,
4202
+ supportsBetweenToolsThinking: false,
4203
+ isKnownModel: true
4204
+ };
4172
4205
  } else if (modelId.includes("claude-opus-5")) {
4173
4206
  return {
4174
4207
  maxOutputTokens: 128e3,
@@ -4176,6 +4209,7 @@ function getModelCapabilities(modelId) {
4176
4209
  rejectsSamplingParameters: true,
4177
4210
  rejectsThinkingDisabledAboveHighEffort: true,
4178
4211
  rejectsThinkingDisabled: false,
4212
+ rejectsBudgetThinking: false,
4179
4213
  rejectsForcedToolUse: false,
4180
4214
  supportsBetweenToolsThinking: false,
4181
4215
  isKnownModel: true
@@ -4187,6 +4221,7 @@ function getModelCapabilities(modelId) {
4187
4221
  rejectsSamplingParameters: true,
4188
4222
  rejectsThinkingDisabledAboveHighEffort: false,
4189
4223
  rejectsThinkingDisabled: true,
4224
+ rejectsBudgetThinking: true,
4190
4225
  rejectsForcedToolUse: true,
4191
4226
  supportsBetweenToolsThinking: false,
4192
4227
  isKnownModel: true
@@ -4198,6 +4233,7 @@ function getModelCapabilities(modelId) {
4198
4233
  rejectsSamplingParameters: true,
4199
4234
  rejectsThinkingDisabledAboveHighEffort: false,
4200
4235
  rejectsThinkingDisabled: true,
4236
+ rejectsBudgetThinking: true,
4201
4237
  rejectsForcedToolUse: false,
4202
4238
  supportsBetweenToolsThinking: false,
4203
4239
  isKnownModel: true
@@ -4209,6 +4245,7 @@ function getModelCapabilities(modelId) {
4209
4245
  rejectsSamplingParameters: true,
4210
4246
  rejectsThinkingDisabledAboveHighEffort: false,
4211
4247
  rejectsThinkingDisabled: false,
4248
+ rejectsBudgetThinking: false,
4212
4249
  rejectsForcedToolUse: false,
4213
4250
  supportsBetweenToolsThinking: false,
4214
4251
  isKnownModel: true
@@ -4220,6 +4257,7 @@ function getModelCapabilities(modelId) {
4220
4257
  rejectsSamplingParameters: false,
4221
4258
  rejectsThinkingDisabledAboveHighEffort: false,
4222
4259
  rejectsThinkingDisabled: false,
4260
+ rejectsBudgetThinking: false,
4223
4261
  rejectsForcedToolUse: false,
4224
4262
  supportsBetweenToolsThinking: false,
4225
4263
  isKnownModel: true
@@ -4231,6 +4269,7 @@ function getModelCapabilities(modelId) {
4231
4269
  rejectsSamplingParameters: false,
4232
4270
  rejectsThinkingDisabledAboveHighEffort: false,
4233
4271
  rejectsThinkingDisabled: false,
4272
+ rejectsBudgetThinking: false,
4234
4273
  rejectsForcedToolUse: false,
4235
4274
  supportsBetweenToolsThinking: false,
4236
4275
  isKnownModel: true
@@ -4242,6 +4281,7 @@ function getModelCapabilities(modelId) {
4242
4281
  rejectsSamplingParameters: false,
4243
4282
  rejectsThinkingDisabledAboveHighEffort: false,
4244
4283
  rejectsThinkingDisabled: false,
4284
+ rejectsBudgetThinking: false,
4245
4285
  rejectsForcedToolUse: false,
4246
4286
  supportsBetweenToolsThinking: false,
4247
4287
  isKnownModel: true
@@ -4253,6 +4293,7 @@ function getModelCapabilities(modelId) {
4253
4293
  rejectsSamplingParameters: false,
4254
4294
  rejectsThinkingDisabledAboveHighEffort: false,
4255
4295
  rejectsThinkingDisabled: false,
4296
+ rejectsBudgetThinking: false,
4256
4297
  rejectsForcedToolUse: false,
4257
4298
  supportsBetweenToolsThinking: false,
4258
4299
  isKnownModel: true
@@ -4264,6 +4305,7 @@ function getModelCapabilities(modelId) {
4264
4305
  rejectsSamplingParameters: false,
4265
4306
  rejectsThinkingDisabledAboveHighEffort: false,
4266
4307
  rejectsThinkingDisabled: false,
4308
+ rejectsBudgetThinking: false,
4267
4309
  rejectsForcedToolUse: false,
4268
4310
  supportsBetweenToolsThinking: false,
4269
4311
  isKnownModel: true
@@ -4275,6 +4317,7 @@ function getModelCapabilities(modelId) {
4275
4317
  rejectsSamplingParameters: false,
4276
4318
  rejectsThinkingDisabledAboveHighEffort: false,
4277
4319
  rejectsThinkingDisabled: false,
4320
+ rejectsBudgetThinking: false,
4278
4321
  rejectsForcedToolUse: false,
4279
4322
  supportsBetweenToolsThinking: false,
4280
4323
  isKnownModel: true
@@ -4286,6 +4329,7 @@ function getModelCapabilities(modelId) {
4286
4329
  rejectsSamplingParameters: false,
4287
4330
  rejectsThinkingDisabledAboveHighEffort: false,
4288
4331
  rejectsThinkingDisabled: false,
4332
+ rejectsBudgetThinking: false,
4289
4333
  rejectsForcedToolUse: false,
4290
4334
  supportsBetweenToolsThinking: false,
4291
4335
  isKnownModel: false
@@ -4297,6 +4341,7 @@ function getModelCapabilities(modelId) {
4297
4341
  rejectsSamplingParameters: true,
4298
4342
  rejectsThinkingDisabledAboveHighEffort: true,
4299
4343
  rejectsThinkingDisabled: false,
4344
+ rejectsBudgetThinking: false,
4300
4345
  rejectsForcedToolUse: false,
4301
4346
  supportsBetweenToolsThinking: false,
4302
4347
  isKnownModel: false
@@ -4308,6 +4353,7 @@ function getModelCapabilities(modelId) {
4308
4353
  rejectsSamplingParameters: false,
4309
4354
  rejectsThinkingDisabledAboveHighEffort: false,
4310
4355
  rejectsThinkingDisabled: false,
4356
+ rejectsBudgetThinking: false,
4311
4357
  rejectsForcedToolUse: false,
4312
4358
  supportsBetweenToolsThinking: false,
4313
4359
  isKnownModel: false
@@ -4329,12 +4375,12 @@ function mapAnthropicStopDetails(stopDetails) {
4329
4375
  // src/tool/bash_20241022.ts
4330
4376
  import {
4331
4377
  createProviderDefinedToolFactory as createProviderDefinedToolFactory3,
4332
- lazySchema as lazySchema9,
4333
- zodSchema as zodSchema9
4378
+ lazySchema as lazySchema10,
4379
+ zodSchema as zodSchema10
4334
4380
  } from "@ai-sdk/provider-utils";
4335
4381
  import { z as z10 } from "zod/v4";
4336
- var bash_20241022InputSchema = lazySchema9(
4337
- () => zodSchema9(
4382
+ var bash_20241022InputSchema = lazySchema10(
4383
+ () => zodSchema10(
4338
4384
  z10.object({
4339
4385
  command: z10.string(),
4340
4386
  restart: z10.boolean().optional()
@@ -4350,12 +4396,12 @@ var bash_20241022 = createProviderDefinedToolFactory3({
4350
4396
  // src/tool/bash_20250124.ts
4351
4397
  import {
4352
4398
  createProviderDefinedToolFactory as createProviderDefinedToolFactory4,
4353
- lazySchema as lazySchema10,
4354
- zodSchema as zodSchema10
4399
+ lazySchema as lazySchema11,
4400
+ zodSchema as zodSchema11
4355
4401
  } from "@ai-sdk/provider-utils";
4356
4402
  import { z as z11 } from "zod/v4";
4357
- var bash_20250124InputSchema = lazySchema10(
4358
- () => zodSchema10(
4403
+ var bash_20250124InputSchema = lazySchema11(
4404
+ () => zodSchema11(
4359
4405
  z11.object({
4360
4406
  command: z11.string(),
4361
4407
  restart: z11.boolean().optional()
@@ -4371,12 +4417,12 @@ var bash_20250124 = createProviderDefinedToolFactory4({
4371
4417
  // src/tool/code-execution_20260120.ts
4372
4418
  import {
4373
4419
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema5,
4374
- lazySchema as lazySchema11,
4375
- zodSchema as zodSchema11
4420
+ lazySchema as lazySchema12,
4421
+ zodSchema as zodSchema12
4376
4422
  } from "@ai-sdk/provider-utils";
4377
4423
  import { z as z12 } from "zod/v4";
4378
- var codeExecution_20260120OutputSchema = lazySchema11(
4379
- () => zodSchema11(
4424
+ var codeExecution_20260120OutputSchema = lazySchema12(
4425
+ () => zodSchema12(
4380
4426
  z12.discriminatedUnion("type", [
4381
4427
  z12.object({
4382
4428
  type: z12.literal("code_execution_result"),
@@ -4433,8 +4479,8 @@ var codeExecution_20260120OutputSchema = lazySchema11(
4433
4479
  ])
4434
4480
  )
4435
4481
  );
4436
- var codeExecution_20260120InputSchema = lazySchema11(
4437
- () => zodSchema11(
4482
+ var codeExecution_20260120InputSchema = lazySchema12(
4483
+ () => zodSchema12(
4438
4484
  z12.discriminatedUnion("type", [
4439
4485
  z12.object({
4440
4486
  type: z12.literal("programmatic-tool-call"),
@@ -4480,12 +4526,12 @@ var codeExecution_20260120 = (args = {}) => {
4480
4526
  // src/tool/computer_20241022.ts
4481
4527
  import {
4482
4528
  createProviderDefinedToolFactory as createProviderDefinedToolFactory5,
4483
- lazySchema as lazySchema12,
4484
- zodSchema as zodSchema12
4529
+ lazySchema as lazySchema13,
4530
+ zodSchema as zodSchema13
4485
4531
  } from "@ai-sdk/provider-utils";
4486
4532
  import { z as z13 } from "zod/v4";
4487
- var computer_20241022InputSchema = lazySchema12(
4488
- () => zodSchema12(
4533
+ var computer_20241022InputSchema = lazySchema13(
4534
+ () => zodSchema13(
4489
4535
  z13.object({
4490
4536
  action: z13.enum([
4491
4537
  "key",
@@ -4513,12 +4559,12 @@ var computer_20241022 = createProviderDefinedToolFactory5({
4513
4559
  // src/tool/computer_20250124.ts
4514
4560
  import {
4515
4561
  createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
4516
- lazySchema as lazySchema13,
4517
- zodSchema as zodSchema13
4562
+ lazySchema as lazySchema14,
4563
+ zodSchema as zodSchema14
4518
4564
  } from "@ai-sdk/provider-utils";
4519
4565
  import { z as z14 } from "zod/v4";
4520
- var computer_20250124InputSchema = lazySchema13(
4521
- () => zodSchema13(
4566
+ var computer_20250124InputSchema = lazySchema14(
4567
+ () => zodSchema14(
4522
4568
  z14.object({
4523
4569
  action: z14.enum([
4524
4570
  "key",
@@ -4556,12 +4602,12 @@ var computer_20250124 = createProviderDefinedToolFactory6({
4556
4602
  // src/tool/memory_20250818.ts
4557
4603
  import {
4558
4604
  createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
4559
- lazySchema as lazySchema14,
4560
- zodSchema as zodSchema14
4605
+ lazySchema as lazySchema15,
4606
+ zodSchema as zodSchema15
4561
4607
  } from "@ai-sdk/provider-utils";
4562
4608
  import { z as z15 } from "zod/v4";
4563
- var memory_20250818InputSchema = lazySchema14(
4564
- () => zodSchema14(
4609
+ var memory_20250818InputSchema = lazySchema15(
4610
+ () => zodSchema15(
4565
4611
  z15.discriminatedUnion("command", [
4566
4612
  z15.object({
4567
4613
  command: z15.literal("view"),
@@ -4606,12 +4652,12 @@ var memory_20250818 = createProviderDefinedToolFactory7({
4606
4652
  // src/tool/text-editor_20241022.ts
4607
4653
  import {
4608
4654
  createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
4609
- lazySchema as lazySchema15,
4610
- zodSchema as zodSchema15
4655
+ lazySchema as lazySchema16,
4656
+ zodSchema as zodSchema16
4611
4657
  } from "@ai-sdk/provider-utils";
4612
4658
  import { z as z16 } from "zod/v4";
4613
- var textEditor_20241022InputSchema = lazySchema15(
4614
- () => zodSchema15(
4659
+ var textEditor_20241022InputSchema = lazySchema16(
4660
+ () => zodSchema16(
4615
4661
  z16.object({
4616
4662
  command: z16.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4617
4663
  path: z16.string(),
@@ -4632,12 +4678,12 @@ var textEditor_20241022 = createProviderDefinedToolFactory8({
4632
4678
  // src/tool/text-editor_20250124.ts
4633
4679
  import {
4634
4680
  createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
4635
- lazySchema as lazySchema16,
4636
- zodSchema as zodSchema16
4681
+ lazySchema as lazySchema17,
4682
+ zodSchema as zodSchema17
4637
4683
  } from "@ai-sdk/provider-utils";
4638
4684
  import { z as z17 } from "zod/v4";
4639
- var textEditor_20250124InputSchema = lazySchema16(
4640
- () => zodSchema16(
4685
+ var textEditor_20250124InputSchema = lazySchema17(
4686
+ () => zodSchema17(
4641
4687
  z17.object({
4642
4688
  command: z17.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4643
4689
  path: z17.string(),
@@ -4658,12 +4704,12 @@ var textEditor_20250124 = createProviderDefinedToolFactory9({
4658
4704
  // src/tool/text-editor_20250429.ts
4659
4705
  import {
4660
4706
  createProviderDefinedToolFactory as createProviderDefinedToolFactory10,
4661
- lazySchema as lazySchema17,
4662
- zodSchema as zodSchema17
4707
+ lazySchema as lazySchema18,
4708
+ zodSchema as zodSchema18
4663
4709
  } from "@ai-sdk/provider-utils";
4664
4710
  import { z as z18 } from "zod/v4";
4665
- var textEditor_20250429InputSchema = lazySchema17(
4666
- () => zodSchema17(
4711
+ var textEditor_20250429InputSchema = lazySchema18(
4712
+ () => zodSchema18(
4667
4713
  z18.object({
4668
4714
  command: z18.enum(["view", "create", "str_replace", "insert"]),
4669
4715
  path: z18.string(),