@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.
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
30
30
 
31
31
  // src/anthropic-messages-language-model.ts
32
32
  var import_provider3 = require("@ai-sdk/provider");
33
- var import_provider_utils11 = require("@ai-sdk/provider-utils");
33
+ var import_provider_utils12 = require("@ai-sdk/provider-utils");
34
34
 
35
35
  // src/anthropic-error.ts
36
36
  var import_provider_utils = require("@ai-sdk/provider-utils");
@@ -54,7 +54,7 @@ var anthropicFailedResponseHandler = (0, import_provider_utils.createJsonErrorRe
54
54
  // src/anthropic-messages-api.ts
55
55
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
56
56
  var import_v42 = require("zod/v4");
57
- var anthropicStopDetailsSchema = import_v42.z.object({
57
+ var anthropicStopDetailsSchema = () => import_v42.z.object({
58
58
  type: import_v42.z.string(),
59
59
  category: import_v42.z.string().nullish(),
60
60
  explanation: import_v42.z.string().nullish(),
@@ -260,7 +260,7 @@ var anthropicMessagesResponseSchema = (0, import_provider_utils2.lazySchema)(
260
260
  ),
261
261
  stop_reason: import_v42.z.string().nullish(),
262
262
  stop_sequence: import_v42.z.string().nullish(),
263
- stop_details: anthropicStopDetailsSchema.nullish(),
263
+ stop_details: anthropicStopDetailsSchema().nullish(),
264
264
  usage: import_v42.z.looseObject({
265
265
  input_tokens: import_v42.z.number(),
266
266
  output_tokens: import_v42.z.number(),
@@ -564,7 +564,7 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
564
564
  delta: import_v42.z.object({
565
565
  stop_reason: import_v42.z.string().nullish(),
566
566
  stop_sequence: import_v42.z.string().nullish(),
567
- stop_details: anthropicStopDetailsSchema.nullish(),
567
+ stop_details: anthropicStopDetailsSchema().nullish(),
568
568
  container: import_v42.z.object({
569
569
  expires_at: import_v42.z.string(),
570
570
  id: import_v42.z.string(),
@@ -640,314 +640,327 @@ var anthropicReasoningMetadataSchema = (0, import_provider_utils2.lazySchema)(
640
640
  );
641
641
 
642
642
  // src/anthropic-messages-options.ts
643
+ var import_provider_utils3 = require("@ai-sdk/provider-utils");
643
644
  var import_v43 = require("zod/v4");
644
- var anthropicFilePartProviderOptions = import_v43.z.object({
645
- /**
646
- * Citation configuration for this document.
647
- * When enabled, this document will generate citations in the response.
648
- */
649
- citations: import_v43.z.object({
650
- /**
651
- * Enable citations for this document
652
- */
653
- enabled: import_v43.z.boolean()
654
- }).optional(),
655
- /**
656
- * Custom title for the document.
657
- * If not provided, the filename will be used.
658
- */
659
- title: import_v43.z.string().optional(),
660
- /**
661
- * Context about the document that will be passed to the model
662
- * but not used towards cited content.
663
- * Useful for storing document metadata as text or stringified JSON.
664
- */
665
- context: import_v43.z.string().optional()
666
- });
667
- var anthropicSystemMessageProviderOptions = import_v43.z.object({
668
- /**
669
- * Controls when a mid-conversation system message is cleared.
670
- *
671
- * The value is forwarded to Anthropic as `clear_at`. The required
672
- * `mid-conversation-system-clear-at-2026-08-21` beta is added automatically.
673
- */
674
- clearAt: import_v43.z.literal("next_user_message").optional(),
675
- /**
676
- * Sets the model effort from the next user turn until a later message
677
- * changes it. An effort-only system message with empty content can appear
678
- * first. The required `mid-conversation-output-config-2026-07-01` beta is
679
- * added automatically.
680
- */
681
- effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
682
- /**
683
- * Mid-conversation tool changes. Adds or removes tools from the
684
- * conversation's tool set between turns without invalidating the prompt
685
- * cache.
686
- *
687
- * Only supported on system messages that appear mid-conversation (not the
688
- * initial system prompt). A system message carrying tool changes must come
689
- * right before an assistant message or at the end of the messages.
690
- *
691
- * Tools referenced by a `tool_addition` must be declared in the `tools`
692
- * option (typically with `deferLoading: true` so they are not loaded until
693
- * the addition surfaces them). The required
694
- * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
695
- */
696
- toolChanges: import_v43.z.array(
697
- import_v43.z.discriminatedUnion("type", [
698
- import_v43.z.object({
699
- type: import_v43.z.literal("tool_addition"),
700
- toolName: import_v43.z.string()
701
- }),
702
- import_v43.z.object({
703
- type: import_v43.z.literal("tool_removal"),
704
- toolName: import_v43.z.string()
705
- })
706
- ])
707
- ).optional()
708
- });
709
- var anthropicThinkingBlockBinding = import_v43.z.object({
710
- /**
711
- * Controls behavior when a replayed thinking block does not match its
712
- * conversation prefix. The `drop_block` behavior drops the mismatched block
713
- * instead of returning an invalid signature error.
714
- */
715
- prefixMismatchBehavior: import_v43.z.literal("drop_block")
716
- });
717
- var anthropicProviderOptions = import_v43.z.object({
718
- /**
719
- * Whether to send reasoning to the model.
720
- *
721
- * This allows you to deactivate reasoning inputs for models that do not support them.
722
- */
723
- sendReasoning: import_v43.z.boolean().optional(),
724
- /**
725
- * Determines how structured outputs are generated.
726
- *
727
- * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
728
- * - `jsonTool`: Use a special JSON response tool to specify the structured output format (default for most models).
729
- * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default for Sonnet 5.5, Opus 5.5, and Fable 5.1).
730
- */
731
- structuredOutputMode: import_v43.z.enum(["outputFormat", "jsonTool", "auto"]).optional(),
732
- /**
733
- * Configuration for enabling Claude's extended thinking.
734
- *
735
- * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
736
- * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
737
- *
738
- * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
739
- * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
740
- * provider drops the unsupported setting, emits a warning, and sends an
741
- * adaptive thinking request. Use `effort` to control how much they think.
742
- *
743
- * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
744
- * and the provider uses it in place of `disabled` for that model.
745
- */
746
- thinking: import_v43.z.union([
645
+ var anthropicFilePartProviderOptions = (0, import_provider_utils3.lazySchema)(
646
+ () => (0, import_provider_utils3.zodSchema)(
747
647
  import_v43.z.object({
748
- /** for Sonnet 4.6, Opus 4.6, and newer models */
749
- type: import_v43.z.literal("adaptive"),
750
648
  /**
751
- * Controls whether thinking content is included in the response.
752
- * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
753
- * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
754
- * - `"updates"`: Thinking summaries are emitted between tool calls.
649
+ * Citation configuration for this document.
650
+ * When enabled, this document will generate citations in the response.
755
651
  */
756
- display: import_v43.z.enum(["omitted", "summarized", "updates"]).optional(),
652
+ citations: import_v43.z.object({
653
+ /**
654
+ * Enable citations for this document
655
+ */
656
+ enabled: import_v43.z.boolean()
657
+ }).optional(),
757
658
  /**
758
- * Controls handling for thinking blocks whose conversation prefix no
759
- * longer matches. Forwarded as `block_binding`.
659
+ * Custom title for the document.
660
+ * If not provided, the filename will be used.
760
661
  */
761
- blockBinding: anthropicThinkingBlockBinding.optional()
762
- }),
763
- import_v43.z.object({
764
- /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
765
- type: import_v43.z.literal("enabled"),
766
- budgetTokens: import_v43.z.number().optional(),
662
+ title: import_v43.z.string().optional(),
767
663
  /**
768
- * Controls handling for thinking blocks whose conversation prefix no
769
- * longer matches. Forwarded as `block_binding`.
664
+ * Context about the document that will be passed to the model
665
+ * but not used towards cited content.
666
+ * Useful for storing document metadata as text or stringified JSON.
770
667
  */
771
- blockBinding: anthropicThinkingBlockBinding.optional()
772
- }),
773
- import_v43.z.object({
774
- type: import_v43.z.literal("disabled")
775
- }),
668
+ context: import_v43.z.string().optional()
669
+ })
670
+ )
671
+ );
672
+ var anthropicSystemMessageProviderOptions = (0, import_provider_utils3.lazySchema)(
673
+ () => (0, import_provider_utils3.zodSchema)(
776
674
  import_v43.z.object({
777
675
  /**
778
- * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
779
- * between tool calls are returned as summarized thinking blocks.
780
- * Only supported at `low`, `medium`, and `high` effort.
676
+ * Controls when a mid-conversation system message is cleared.
677
+ *
678
+ * The value is forwarded to Anthropic as `clear_at`. The required
679
+ * `mid-conversation-system-clear-at-2026-08-21` beta is added automatically.
781
680
  */
782
- type: import_v43.z.literal("between_tools")
783
- }),
784
- import_v43.z.object({
681
+ clearAt: import_v43.z.literal("next_user_message").optional(),
682
+ /**
683
+ * Sets the model effort from the next user turn until a later message
684
+ * changes it. An effort-only system message with empty content can appear
685
+ * first. The required `mid-conversation-output-config-2026-07-01` beta is
686
+ * added automatically.
687
+ */
688
+ effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
785
689
  /**
786
- * Configure prefix mismatch handling without changing the model's
787
- * default thinking mode.
690
+ * Mid-conversation tool changes. Adds or removes tools from the
691
+ * conversation's tool set between turns without invalidating the prompt
692
+ * cache.
693
+ *
694
+ * Only supported on system messages that appear mid-conversation (not the
695
+ * initial system prompt). A system message carrying tool changes must come
696
+ * right before an assistant message or at the end of the messages.
697
+ *
698
+ * Tools referenced by a `tool_addition` must be declared in the `tools`
699
+ * option (typically with `deferLoading: true` so they are not loaded until
700
+ * the addition surfaces them). The required
701
+ * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
788
702
  */
789
- blockBinding: anthropicThinkingBlockBinding
703
+ toolChanges: import_v43.z.array(
704
+ import_v43.z.discriminatedUnion("type", [
705
+ import_v43.z.object({
706
+ type: import_v43.z.literal("tool_addition"),
707
+ toolName: import_v43.z.string()
708
+ }),
709
+ import_v43.z.object({
710
+ type: import_v43.z.literal("tool_removal"),
711
+ toolName: import_v43.z.string()
712
+ })
713
+ ])
714
+ ).optional()
790
715
  })
791
- ]).optional(),
792
- /**
793
- * Whether to disable parallel function calling during tool use. Default is false.
794
- * When set to true, Claude will use at most one tool per response.
795
- */
796
- disableParallelToolUse: import_v43.z.boolean().optional(),
797
- /**
798
- * Cache control settings for this message.
799
- * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
800
- */
801
- cacheControl: import_v43.z.object({
802
- type: import_v43.z.literal("ephemeral"),
803
- ttl: import_v43.z.union([import_v43.z.literal("5m"), import_v43.z.literal("1h")]).optional()
804
- }).optional(),
805
- /**
806
- * Metadata to include with the request.
807
- *
808
- * See https://platform.claude.com/docs/en/api/messages/create for details.
809
- */
810
- metadata: import_v43.z.object({
716
+ )
717
+ );
718
+ var anthropicProviderOptions = (0, import_provider_utils3.lazySchema)(() => {
719
+ const anthropicThinkingBlockBinding = import_v43.z.object({
811
720
  /**
812
- * An external identifier for the user associated with the request.
813
- *
814
- * Should be a UUID, hash value, or other opaque identifier.
815
- * Must not contain PII (name, email, phone number, etc.).
721
+ * Controls behavior when a replayed thinking block does not match its
722
+ * conversation prefix. The `drop_block` behavior drops the mismatched block
723
+ * instead of returning an invalid signature error.
816
724
  */
817
- userId: import_v43.z.string().optional()
818
- }).optional(),
819
- /**
820
- * Agent Skills configuration. Skills enable Claude to perform specialized tasks
821
- * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
822
- * Requires code execution tool to be enabled.
823
- */
824
- container: import_v43.z.object({
825
- id: import_v43.z.string().optional(),
826
- skills: import_v43.z.array(
827
- import_v43.z.object({
828
- type: import_v43.z.union([import_v43.z.literal("anthropic"), import_v43.z.literal("custom")]),
829
- skillId: import_v43.z.string(),
830
- version: import_v43.z.string().optional()
831
- })
832
- ).optional()
833
- }).optional(),
834
- /**
835
- * @default 'high'
836
- */
837
- effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
838
- /**
839
- * Task budget for agentic turns. Informs the model of the total token budget
840
- * available for the current task, allowing it to prioritize work and wind down
841
- * gracefully as the budget is consumed.
842
- *
843
- * Advisory only — does not enforce a hard token limit.
844
- */
845
- taskBudget: import_v43.z.object({
846
- type: import_v43.z.literal("tokens"),
847
- total: import_v43.z.number().int().min(2e4),
848
- remaining: import_v43.z.number().int().min(0).optional()
849
- }).optional(),
850
- /**
851
- * Enable fast mode for faster inference (2.5x faster output token speeds).
852
- * Only supported with claude-opus-4-6.
853
- */
854
- speed: import_v43.z.enum(["fast", "standard"]).optional(),
855
- /**
856
- * Controls where model inference runs for this request.
857
- *
858
- * - `"global"`: Inference may run in any available geography (default).
859
- * - `"us"`: Inference runs only in US-based infrastructure.
860
- *
861
- * See https://platform.claude.com/docs/en/build-with-claude/data-residency
862
- */
863
- inferenceGeo: import_v43.z.enum(["us", "global"]).optional(),
864
- /**
865
- * Server-side fallback configuration.
866
- *
867
- * When the primary model's safety classifiers block a turn, the API
868
- * automatically retries it server-side on a fallback model. A
869
- * `content-filter` finish reason means the fallback(s) refused as well.
870
- *
871
- * - `'default'` (recommended): the API routes the retry to Anthropic's
872
- * recommended fallback model based on the refusal category. Requires the
873
- * `server-side-fallback-2026-07-01` beta, which is added automatically.
874
- * - Array form: an explicit fallback chain. Each entry is merged into the
875
- * request as a direct request to that entry's model, so it must be
876
- * formatted accordingly: `model` is required, and an entry may
877
- * additionally override `max_tokens`, `thinking`, `output_config`, and
878
- * `speed` for that attempt only (`speed` additionally requires the speed
879
- * beta). The value is passed through to the API as-is, and the
880
- * `server-side-fallback-2026-06-01` beta is added automatically.
881
- */
882
- fallbacks: import_v43.z.union([
883
- import_v43.z.literal("default"),
884
- import_v43.z.array(
885
- import_v43.z.object({
886
- model: import_v43.z.string(),
887
- max_tokens: import_v43.z.number().int().optional(),
888
- thinking: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown()).optional(),
889
- output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown()).optional(),
890
- speed: import_v43.z.enum(["fast", "standard"]).optional()
891
- })
892
- )
893
- ]).optional(),
894
- /**
895
- * Context management configuration for automatic context window management.
896
- * Enables features like automatic compaction and clearing of tool uses/thinking blocks.
897
- */
898
- contextManagement: import_v43.z.object({
899
- edits: import_v43.z.array(
900
- import_v43.z.discriminatedUnion("type", [
725
+ prefixMismatchBehavior: import_v43.z.literal("drop_block")
726
+ });
727
+ return (0, import_provider_utils3.zodSchema)(
728
+ import_v43.z.object({
729
+ /**
730
+ * Whether to send reasoning to the model.
731
+ *
732
+ * This allows you to deactivate reasoning inputs for models that do not support them.
733
+ */
734
+ sendReasoning: import_v43.z.boolean().optional(),
735
+ /**
736
+ * Determines how structured outputs are generated.
737
+ *
738
+ * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
739
+ * - `jsonTool`: Use a special JSON response tool to specify the structured output format (default for most models).
740
+ * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default for Sonnet 5.5, Opus 5.5, and Fable 5.1).
741
+ */
742
+ structuredOutputMode: import_v43.z.enum(["outputFormat", "jsonTool", "auto"]).optional(),
743
+ /**
744
+ * Configuration for enabling Claude's extended thinking.
745
+ *
746
+ * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
747
+ * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
748
+ *
749
+ * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
750
+ * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
751
+ * provider drops the unsupported setting, emits a warning, and sends an
752
+ * adaptive thinking request. Use `effort` to control how much they think.
753
+ *
754
+ * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
755
+ * and the provider uses it in place of `disabled` for that model.
756
+ */
757
+ thinking: import_v43.z.union([
901
758
  import_v43.z.object({
902
- type: import_v43.z.literal("clear_tool_uses_20250919"),
903
- trigger: import_v43.z.discriminatedUnion("type", [
904
- import_v43.z.object({
905
- type: import_v43.z.literal("input_tokens"),
906
- value: import_v43.z.number()
907
- }),
908
- import_v43.z.object({
909
- type: import_v43.z.literal("tool_uses"),
910
- value: import_v43.z.number()
911
- })
912
- ]).optional(),
913
- keep: import_v43.z.object({
914
- type: import_v43.z.literal("tool_uses"),
915
- value: import_v43.z.number()
916
- }).optional(),
917
- clearAtLeast: import_v43.z.object({
918
- type: import_v43.z.literal("input_tokens"),
919
- value: import_v43.z.number()
920
- }).optional(),
921
- clearToolInputs: import_v43.z.boolean().optional(),
922
- excludeTools: import_v43.z.array(import_v43.z.string()).optional()
759
+ /** for Sonnet 4.6, Opus 4.6, and newer models */
760
+ type: import_v43.z.literal("adaptive"),
761
+ /**
762
+ * Controls whether thinking content is included in the response.
763
+ * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
764
+ * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
765
+ * - `"updates"`: Thinking summaries are emitted between tool calls.
766
+ */
767
+ display: import_v43.z.enum(["omitted", "summarized", "updates"]).optional(),
768
+ /**
769
+ * Controls handling for thinking blocks whose conversation prefix no
770
+ * longer matches. Forwarded as `block_binding`.
771
+ */
772
+ blockBinding: anthropicThinkingBlockBinding.optional()
923
773
  }),
924
774
  import_v43.z.object({
925
- type: import_v43.z.literal("clear_thinking_20251015"),
926
- keep: import_v43.z.union([
927
- import_v43.z.literal("all"),
928
- import_v43.z.object({
929
- type: import_v43.z.literal("thinking_turns"),
930
- value: import_v43.z.number()
931
- })
932
- ]).optional()
775
+ /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
776
+ type: import_v43.z.literal("enabled"),
777
+ budgetTokens: import_v43.z.number().optional(),
778
+ /**
779
+ * Controls handling for thinking blocks whose conversation prefix no
780
+ * longer matches. Forwarded as `block_binding`.
781
+ */
782
+ blockBinding: anthropicThinkingBlockBinding.optional()
933
783
  }),
934
784
  import_v43.z.object({
935
- type: import_v43.z.literal("compact_20260112"),
936
- trigger: import_v43.z.object({
937
- type: import_v43.z.literal("input_tokens"),
938
- value: import_v43.z.number()
939
- }).optional(),
940
- pauseAfterCompaction: import_v43.z.boolean().optional(),
941
- instructions: import_v43.z.string().optional()
785
+ type: import_v43.z.literal("disabled")
786
+ }),
787
+ import_v43.z.object({
788
+ /**
789
+ * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
790
+ * between tool calls are returned as summarized thinking blocks.
791
+ * Only supported at `low`, `medium`, and `high` effort.
792
+ */
793
+ type: import_v43.z.literal("between_tools")
794
+ }),
795
+ import_v43.z.object({
796
+ /**
797
+ * Configure prefix mismatch handling without changing the model's
798
+ * default thinking mode.
799
+ */
800
+ blockBinding: anthropicThinkingBlockBinding
942
801
  })
943
- ])
944
- )
945
- }).optional(),
946
- /**
947
- * A set of beta features to enable.
948
- * Allow a provider to receive the full `betas` set if it needs it.
949
- */
950
- anthropicBeta: import_v43.z.array(import_v43.z.string()).optional()
802
+ ]).optional(),
803
+ /**
804
+ * Whether to disable parallel function calling during tool use. Default is false.
805
+ * When set to true, Claude will use at most one tool per response.
806
+ */
807
+ disableParallelToolUse: import_v43.z.boolean().optional(),
808
+ /**
809
+ * Cache control settings for this message.
810
+ * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
811
+ */
812
+ cacheControl: import_v43.z.object({
813
+ type: import_v43.z.literal("ephemeral"),
814
+ ttl: import_v43.z.union([import_v43.z.literal("5m"), import_v43.z.literal("1h")]).optional()
815
+ }).optional(),
816
+ /**
817
+ * Metadata to include with the request.
818
+ *
819
+ * See https://platform.claude.com/docs/en/api/messages/create for details.
820
+ */
821
+ metadata: import_v43.z.object({
822
+ /**
823
+ * An external identifier for the user associated with the request.
824
+ *
825
+ * Should be a UUID, hash value, or other opaque identifier.
826
+ * Must not contain PII (name, email, phone number, etc.).
827
+ */
828
+ userId: import_v43.z.string().optional()
829
+ }).optional(),
830
+ /**
831
+ * Agent Skills configuration. Skills enable Claude to perform specialized tasks
832
+ * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
833
+ * Requires code execution tool to be enabled.
834
+ */
835
+ container: import_v43.z.object({
836
+ id: import_v43.z.string().optional(),
837
+ skills: import_v43.z.array(
838
+ import_v43.z.object({
839
+ type: import_v43.z.union([import_v43.z.literal("anthropic"), import_v43.z.literal("custom")]),
840
+ skillId: import_v43.z.string(),
841
+ version: import_v43.z.string().optional()
842
+ })
843
+ ).optional()
844
+ }).optional(),
845
+ /**
846
+ * @default 'high'
847
+ */
848
+ effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
849
+ /**
850
+ * Task budget for agentic turns. Informs the model of the total token budget
851
+ * available for the current task, allowing it to prioritize work and wind down
852
+ * gracefully as the budget is consumed.
853
+ *
854
+ * Advisory only — does not enforce a hard token limit.
855
+ */
856
+ taskBudget: import_v43.z.object({
857
+ type: import_v43.z.literal("tokens"),
858
+ total: import_v43.z.number().int().min(2e4),
859
+ remaining: import_v43.z.number().int().min(0).optional()
860
+ }).optional(),
861
+ /**
862
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
863
+ * Only supported with claude-opus-4-6.
864
+ */
865
+ speed: import_v43.z.enum(["fast", "standard"]).optional(),
866
+ /**
867
+ * Controls where model inference runs for this request.
868
+ *
869
+ * - `"global"`: Inference may run in any available geography (default).
870
+ * - `"us"`: Inference runs only in US-based infrastructure.
871
+ *
872
+ * See https://platform.claude.com/docs/en/build-with-claude/data-residency
873
+ */
874
+ inferenceGeo: import_v43.z.enum(["us", "global"]).optional(),
875
+ /**
876
+ * Server-side fallback configuration.
877
+ *
878
+ * When the primary model's safety classifiers block a turn, the API
879
+ * automatically retries it server-side on a fallback model. A
880
+ * `content-filter` finish reason means the fallback(s) refused as well.
881
+ *
882
+ * - `'default'` (recommended): the API routes the retry to Anthropic's
883
+ * recommended fallback model based on the refusal category. Requires the
884
+ * `server-side-fallback-2026-07-01` beta, which is added automatically.
885
+ * - Array form: an explicit fallback chain. Each entry is merged into the
886
+ * request as a direct request to that entry's model, so it must be
887
+ * formatted accordingly: `model` is required, and an entry may
888
+ * additionally override `max_tokens`, `thinking`, `output_config`, and
889
+ * `speed` for that attempt only (`speed` additionally requires the speed
890
+ * beta). The value is passed through to the API as-is, and the
891
+ * `server-side-fallback-2026-06-01` beta is added automatically.
892
+ */
893
+ fallbacks: import_v43.z.union([
894
+ import_v43.z.literal("default"),
895
+ import_v43.z.array(
896
+ import_v43.z.object({
897
+ model: import_v43.z.string(),
898
+ max_tokens: import_v43.z.number().int().optional(),
899
+ thinking: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown()).optional(),
900
+ output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.unknown()).optional(),
901
+ speed: import_v43.z.enum(["fast", "standard"]).optional()
902
+ })
903
+ )
904
+ ]).optional(),
905
+ /**
906
+ * Context management configuration for automatic context window management.
907
+ * Enables features like automatic compaction and clearing of tool uses/thinking blocks.
908
+ */
909
+ contextManagement: import_v43.z.object({
910
+ edits: import_v43.z.array(
911
+ import_v43.z.discriminatedUnion("type", [
912
+ import_v43.z.object({
913
+ type: import_v43.z.literal("clear_tool_uses_20250919"),
914
+ trigger: import_v43.z.discriminatedUnion("type", [
915
+ import_v43.z.object({
916
+ type: import_v43.z.literal("input_tokens"),
917
+ value: import_v43.z.number()
918
+ }),
919
+ import_v43.z.object({
920
+ type: import_v43.z.literal("tool_uses"),
921
+ value: import_v43.z.number()
922
+ })
923
+ ]).optional(),
924
+ keep: import_v43.z.object({
925
+ type: import_v43.z.literal("tool_uses"),
926
+ value: import_v43.z.number()
927
+ }).optional(),
928
+ clearAtLeast: import_v43.z.object({
929
+ type: import_v43.z.literal("input_tokens"),
930
+ value: import_v43.z.number()
931
+ }).optional(),
932
+ clearToolInputs: import_v43.z.boolean().optional(),
933
+ excludeTools: import_v43.z.array(import_v43.z.string()).optional()
934
+ }),
935
+ import_v43.z.object({
936
+ type: import_v43.z.literal("clear_thinking_20251015"),
937
+ keep: import_v43.z.union([
938
+ import_v43.z.literal("all"),
939
+ import_v43.z.object({
940
+ type: import_v43.z.literal("thinking_turns"),
941
+ value: import_v43.z.number()
942
+ })
943
+ ]).optional()
944
+ }),
945
+ import_v43.z.object({
946
+ type: import_v43.z.literal("compact_20260112"),
947
+ trigger: import_v43.z.object({
948
+ type: import_v43.z.literal("input_tokens"),
949
+ value: import_v43.z.number()
950
+ }).optional(),
951
+ pauseAfterCompaction: import_v43.z.boolean().optional(),
952
+ instructions: import_v43.z.string().optional()
953
+ })
954
+ ])
955
+ )
956
+ }).optional(),
957
+ /**
958
+ * A set of beta features to enable.
959
+ * Allow a provider to receive the full `betas` set if it needs it.
960
+ */
961
+ anthropicBeta: import_v43.z.array(import_v43.z.string()).optional()
962
+ })
963
+ );
951
964
  });
952
965
 
953
966
  // src/anthropic-prepare-tools.ts
@@ -996,7 +1009,7 @@ var CacheControlValidator = class {
996
1009
  };
997
1010
 
998
1011
  // src/tool/computer-toolset_20260801.ts
999
- var import_provider_utils3 = require("@ai-sdk/provider-utils");
1012
+ var import_provider_utils4 = require("@ai-sdk/provider-utils");
1000
1013
  var import_v44 = require("zod/v4");
1001
1014
  var computerToolset_20260801Members = [
1002
1015
  "screenshot",
@@ -1017,8 +1030,8 @@ var computerToolset_20260801Members = [
1017
1030
  "hold_key",
1018
1031
  "wait"
1019
1032
  ];
1020
- var computerToolset_20260801InputSchema = (0, import_provider_utils3.lazySchema)(
1021
- () => (0, import_provider_utils3.zodSchema)(
1033
+ var computerToolset_20260801InputSchema = (0, import_provider_utils4.lazySchema)(
1034
+ () => (0, import_provider_utils4.zodSchema)(
1022
1035
  import_v44.z.object({
1023
1036
  action: import_v44.z.enum(computerToolset_20260801Members),
1024
1037
  coordinate: import_v44.z.tuple([import_v44.z.number().int(), import_v44.z.number().int()]).optional(),
@@ -1037,8 +1050,8 @@ var computerToolset_20260801InputSchema = (0, import_provider_utils3.lazySchema)
1037
1050
  })
1038
1051
  )
1039
1052
  );
1040
- var computerToolset_20260801ArgsSchema = (0, import_provider_utils3.lazySchema)(
1041
- () => (0, import_provider_utils3.zodSchema)(
1053
+ var computerToolset_20260801ArgsSchema = (0, import_provider_utils4.lazySchema)(
1054
+ () => (0, import_provider_utils4.zodSchema)(
1042
1055
  import_v44.z.object({
1043
1056
  configs: import_v44.z.partialRecord(
1044
1057
  import_v44.z.enum(computerToolset_20260801Members),
@@ -1050,24 +1063,24 @@ var computerToolset_20260801ArgsSchema = (0, import_provider_utils3.lazySchema)(
1050
1063
  })
1051
1064
  )
1052
1065
  );
1053
- var computerToolset_20260801 = (0, import_provider_utils3.createProviderDefinedToolFactory)({
1066
+ var computerToolset_20260801 = (0, import_provider_utils4.createProviderDefinedToolFactory)({
1054
1067
  id: "anthropic.computer_toolset_20260801",
1055
1068
  name: "computer",
1056
1069
  inputSchema: computerToolset_20260801InputSchema
1057
1070
  });
1058
1071
 
1059
1072
  // src/tool/text-editor_20250728.ts
1060
- var import_provider_utils4 = require("@ai-sdk/provider-utils");
1073
+ var import_provider_utils5 = require("@ai-sdk/provider-utils");
1061
1074
  var import_v45 = require("zod/v4");
1062
- var textEditor_20250728ArgsSchema = (0, import_provider_utils4.lazySchema)(
1063
- () => (0, import_provider_utils4.zodSchema)(
1075
+ var textEditor_20250728ArgsSchema = (0, import_provider_utils5.lazySchema)(
1076
+ () => (0, import_provider_utils5.zodSchema)(
1064
1077
  import_v45.z.object({
1065
1078
  maxCharacters: import_v45.z.number().optional()
1066
1079
  })
1067
1080
  )
1068
1081
  );
1069
- var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
1070
- () => (0, import_provider_utils4.zodSchema)(
1082
+ var textEditor_20250728InputSchema = (0, import_provider_utils5.lazySchema)(
1083
+ () => (0, import_provider_utils5.zodSchema)(
1071
1084
  import_v45.z.object({
1072
1085
  command: import_v45.z.enum(["view", "create", "str_replace", "insert"]),
1073
1086
  path: import_v45.z.string(),
@@ -1079,7 +1092,7 @@ var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
1079
1092
  })
1080
1093
  )
1081
1094
  );
1082
- var factory = (0, import_provider_utils4.createProviderDefinedToolFactory)({
1095
+ var factory = (0, import_provider_utils5.createProviderDefinedToolFactory)({
1083
1096
  id: "anthropic.text_editor_20250728",
1084
1097
  name: "str_replace_based_edit_tool",
1085
1098
  inputSchema: textEditor_20250728InputSchema
@@ -1089,10 +1102,10 @@ var textEditor_20250728 = (args = {}) => {
1089
1102
  };
1090
1103
 
1091
1104
  // src/tool/web-search_20250305.ts
1092
- var import_provider_utils5 = require("@ai-sdk/provider-utils");
1105
+ var import_provider_utils6 = require("@ai-sdk/provider-utils");
1093
1106
  var import_v46 = require("zod/v4");
1094
- var webSearch_20250305ArgsSchema = (0, import_provider_utils5.lazySchema)(
1095
- () => (0, import_provider_utils5.zodSchema)(
1107
+ var webSearch_20250305ArgsSchema = (0, import_provider_utils6.lazySchema)(
1108
+ () => (0, import_provider_utils6.zodSchema)(
1096
1109
  import_v46.z.object({
1097
1110
  maxUses: import_v46.z.number().optional(),
1098
1111
  allowedDomains: import_v46.z.array(import_v46.z.string()).optional(),
@@ -1107,8 +1120,8 @@ var webSearch_20250305ArgsSchema = (0, import_provider_utils5.lazySchema)(
1107
1120
  })
1108
1121
  )
1109
1122
  );
1110
- var webSearch_20250305OutputSchema = (0, import_provider_utils5.lazySchema)(
1111
- () => (0, import_provider_utils5.zodSchema)(
1123
+ var webSearch_20250305OutputSchema = (0, import_provider_utils6.lazySchema)(
1124
+ () => (0, import_provider_utils6.zodSchema)(
1112
1125
  import_v46.z.array(
1113
1126
  import_v46.z.object({
1114
1127
  url: import_v46.z.string(),
@@ -1120,14 +1133,14 @@ var webSearch_20250305OutputSchema = (0, import_provider_utils5.lazySchema)(
1120
1133
  )
1121
1134
  )
1122
1135
  );
1123
- var webSearch_20250305InputSchema = (0, import_provider_utils5.lazySchema)(
1124
- () => (0, import_provider_utils5.zodSchema)(
1136
+ var webSearch_20250305InputSchema = (0, import_provider_utils6.lazySchema)(
1137
+ () => (0, import_provider_utils6.zodSchema)(
1125
1138
  import_v46.z.object({
1126
1139
  query: import_v46.z.string()
1127
1140
  })
1128
1141
  )
1129
1142
  );
1130
- var factory2 = (0, import_provider_utils5.createProviderDefinedToolFactoryWithOutputSchema)({
1143
+ var factory2 = (0, import_provider_utils6.createProviderDefinedToolFactoryWithOutputSchema)({
1131
1144
  id: "anthropic.web_search_20250305",
1132
1145
  name: "web_search",
1133
1146
  inputSchema: webSearch_20250305InputSchema,
@@ -1138,10 +1151,10 @@ var webSearch_20250305 = (args = {}) => {
1138
1151
  };
1139
1152
 
1140
1153
  // src/tool/web-fetch-20250910.ts
1141
- var import_provider_utils6 = require("@ai-sdk/provider-utils");
1154
+ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1142
1155
  var import_v47 = require("zod/v4");
1143
- var webFetch_20250910ArgsSchema = (0, import_provider_utils6.lazySchema)(
1144
- () => (0, import_provider_utils6.zodSchema)(
1156
+ var webFetch_20250910ArgsSchema = (0, import_provider_utils7.lazySchema)(
1157
+ () => (0, import_provider_utils7.zodSchema)(
1145
1158
  import_v47.z.object({
1146
1159
  maxUses: import_v47.z.number().optional(),
1147
1160
  allowedDomains: import_v47.z.array(import_v47.z.string()).optional(),
@@ -1151,8 +1164,8 @@ var webFetch_20250910ArgsSchema = (0, import_provider_utils6.lazySchema)(
1151
1164
  })
1152
1165
  )
1153
1166
  );
1154
- var webFetch_20250910OutputSchema = (0, import_provider_utils6.lazySchema)(
1155
- () => (0, import_provider_utils6.zodSchema)(
1167
+ var webFetch_20250910OutputSchema = (0, import_provider_utils7.lazySchema)(
1168
+ () => (0, import_provider_utils7.zodSchema)(
1156
1169
  import_v47.z.object({
1157
1170
  type: import_v47.z.literal("web_fetch_result"),
1158
1171
  url: import_v47.z.string(),
@@ -1177,14 +1190,14 @@ var webFetch_20250910OutputSchema = (0, import_provider_utils6.lazySchema)(
1177
1190
  })
1178
1191
  )
1179
1192
  );
1180
- var webFetch_20250910InputSchema = (0, import_provider_utils6.lazySchema)(
1181
- () => (0, import_provider_utils6.zodSchema)(
1193
+ var webFetch_20250910InputSchema = (0, import_provider_utils7.lazySchema)(
1194
+ () => (0, import_provider_utils7.zodSchema)(
1182
1195
  import_v47.z.object({
1183
1196
  url: import_v47.z.string()
1184
1197
  })
1185
1198
  )
1186
1199
  );
1187
- var factory3 = (0, import_provider_utils6.createProviderDefinedToolFactoryWithOutputSchema)({
1200
+ var factory3 = (0, import_provider_utils7.createProviderDefinedToolFactoryWithOutputSchema)({
1188
1201
  id: "anthropic.web_fetch_20250910",
1189
1202
  name: "web_fetch",
1190
1203
  inputSchema: webFetch_20250910InputSchema,
@@ -1195,7 +1208,7 @@ var webFetch_20250910 = (args = {}) => {
1195
1208
  };
1196
1209
 
1197
1210
  // src/anthropic-prepare-tools.ts
1198
- var import_provider_utils7 = require("@ai-sdk/provider-utils");
1211
+ var import_provider_utils8 = require("@ai-sdk/provider-utils");
1199
1212
  async function prepareTools({
1200
1213
  tools,
1201
1214
  toolChoice,
@@ -1257,7 +1270,7 @@ async function prepareTools({
1257
1270
  break;
1258
1271
  }
1259
1272
  case "anthropic.computer_toolset_20260801": {
1260
- const args = await (0, import_provider_utils7.validateTypes)({
1273
+ const args = await (0, import_provider_utils8.validateTypes)({
1261
1274
  value: tool.args,
1262
1275
  schema: computerToolset_20260801ArgsSchema
1263
1276
  });
@@ -1333,7 +1346,7 @@ async function prepareTools({
1333
1346
  break;
1334
1347
  }
1335
1348
  case "anthropic.text_editor_20250728": {
1336
- const args = await (0, import_provider_utils7.validateTypes)({
1349
+ const args = await (0, import_provider_utils8.validateTypes)({
1337
1350
  value: tool.args,
1338
1351
  schema: textEditor_20250728ArgsSchema
1339
1352
  });
@@ -1373,7 +1386,7 @@ async function prepareTools({
1373
1386
  }
1374
1387
  case "anthropic.web_fetch_20250910": {
1375
1388
  betas.add("web-fetch-2025-09-10");
1376
- const args = await (0, import_provider_utils7.validateTypes)({
1389
+ const args = await (0, import_provider_utils8.validateTypes)({
1377
1390
  value: tool.args,
1378
1391
  schema: webFetch_20250910ArgsSchema
1379
1392
  });
@@ -1390,7 +1403,7 @@ async function prepareTools({
1390
1403
  break;
1391
1404
  }
1392
1405
  case "anthropic.web_search_20250305": {
1393
- const args = await (0, import_provider_utils7.validateTypes)({
1406
+ const args = await (0, import_provider_utils8.validateTypes)({
1394
1407
  value: tool.args,
1395
1408
  schema: webSearch_20250305ArgsSchema
1396
1409
  });
@@ -1506,13 +1519,13 @@ async function prepareTools({
1506
1519
 
1507
1520
  // src/convert-to-anthropic-messages-prompt.ts
1508
1521
  var import_provider2 = require("@ai-sdk/provider");
1509
- var import_provider_utils10 = require("@ai-sdk/provider-utils");
1522
+ var import_provider_utils11 = require("@ai-sdk/provider-utils");
1510
1523
 
1511
1524
  // src/tool/code-execution_20250522.ts
1512
- var import_provider_utils8 = require("@ai-sdk/provider-utils");
1525
+ var import_provider_utils9 = require("@ai-sdk/provider-utils");
1513
1526
  var import_v48 = require("zod/v4");
1514
- var codeExecution_20250522OutputSchema = (0, import_provider_utils8.lazySchema)(
1515
- () => (0, import_provider_utils8.zodSchema)(
1527
+ var codeExecution_20250522OutputSchema = (0, import_provider_utils9.lazySchema)(
1528
+ () => (0, import_provider_utils9.zodSchema)(
1516
1529
  import_v48.z.object({
1517
1530
  type: import_v48.z.literal("code_execution_result"),
1518
1531
  stdout: import_v48.z.string(),
@@ -1521,14 +1534,14 @@ var codeExecution_20250522OutputSchema = (0, import_provider_utils8.lazySchema)(
1521
1534
  })
1522
1535
  )
1523
1536
  );
1524
- var codeExecution_20250522InputSchema = (0, import_provider_utils8.lazySchema)(
1525
- () => (0, import_provider_utils8.zodSchema)(
1537
+ var codeExecution_20250522InputSchema = (0, import_provider_utils9.lazySchema)(
1538
+ () => (0, import_provider_utils9.zodSchema)(
1526
1539
  import_v48.z.object({
1527
1540
  code: import_v48.z.string()
1528
1541
  })
1529
1542
  )
1530
1543
  );
1531
- var factory4 = (0, import_provider_utils8.createProviderDefinedToolFactoryWithOutputSchema)({
1544
+ var factory4 = (0, import_provider_utils9.createProviderDefinedToolFactoryWithOutputSchema)({
1532
1545
  id: "anthropic.code_execution_20250522",
1533
1546
  name: "code_execution",
1534
1547
  inputSchema: codeExecution_20250522InputSchema,
@@ -1539,10 +1552,10 @@ var codeExecution_20250522 = (args = {}) => {
1539
1552
  };
1540
1553
 
1541
1554
  // src/tool/code-execution_20250825.ts
1542
- var import_provider_utils9 = require("@ai-sdk/provider-utils");
1555
+ var import_provider_utils10 = require("@ai-sdk/provider-utils");
1543
1556
  var import_v49 = require("zod/v4");
1544
- var codeExecution_20250825OutputSchema = (0, import_provider_utils9.lazySchema)(
1545
- () => (0, import_provider_utils9.zodSchema)(
1557
+ var codeExecution_20250825OutputSchema = (0, import_provider_utils10.lazySchema)(
1558
+ () => (0, import_provider_utils10.zodSchema)(
1546
1559
  import_v49.z.discriminatedUnion("type", [
1547
1560
  import_v49.z.object({
1548
1561
  type: import_v49.z.literal("bash_code_execution_result"),
@@ -1587,8 +1600,8 @@ var codeExecution_20250825OutputSchema = (0, import_provider_utils9.lazySchema)(
1587
1600
  ])
1588
1601
  )
1589
1602
  );
1590
- var codeExecution_20250825InputSchema = (0, import_provider_utils9.lazySchema)(
1591
- () => (0, import_provider_utils9.zodSchema)(
1603
+ var codeExecution_20250825InputSchema = (0, import_provider_utils10.lazySchema)(
1604
+ () => (0, import_provider_utils10.zodSchema)(
1592
1605
  import_v49.z.discriminatedUnion("type", [
1593
1606
  import_v49.z.object({
1594
1607
  type: import_v49.z.literal("bash_code_execution"),
@@ -1617,7 +1630,7 @@ var codeExecution_20250825InputSchema = (0, import_provider_utils9.lazySchema)(
1617
1630
  ])
1618
1631
  )
1619
1632
  );
1620
- var factory5 = (0, import_provider_utils9.createProviderDefinedToolFactoryWithOutputSchema)({
1633
+ var factory5 = (0, import_provider_utils10.createProviderDefinedToolFactoryWithOutputSchema)({
1621
1634
  id: "anthropic.code_execution_20250825",
1622
1635
  name: "code_execution",
1623
1636
  inputSchema: codeExecution_20250825InputSchema,
@@ -1659,7 +1672,7 @@ async function convertToAnthropicMessagesPrompt({
1659
1672
  const messages = [];
1660
1673
  async function shouldEnableCitations(providerMetadata) {
1661
1674
  var _a2, _b2;
1662
- const anthropicOptions = await (0, import_provider_utils10.parseProviderOptions)({
1675
+ const anthropicOptions = await (0, import_provider_utils11.parseProviderOptions)({
1663
1676
  provider: "anthropic",
1664
1677
  providerOptions: providerMetadata,
1665
1678
  schema: anthropicFilePartProviderOptions
@@ -1667,7 +1680,7 @@ async function convertToAnthropicMessagesPrompt({
1667
1680
  return (_b2 = (_a2 = anthropicOptions == null ? void 0 : anthropicOptions.citations) == null ? void 0 : _a2.enabled) != null ? _b2 : false;
1668
1681
  }
1669
1682
  async function getDocumentMetadata(providerMetadata) {
1670
- const anthropicOptions = await (0, import_provider_utils10.parseProviderOptions)({
1683
+ const anthropicOptions = await (0, import_provider_utils11.parseProviderOptions)({
1671
1684
  provider: "anthropic",
1672
1685
  providerOptions: providerMetadata,
1673
1686
  schema: anthropicFilePartProviderOptions
@@ -1687,7 +1700,7 @@ async function convertToAnthropicMessagesPrompt({
1687
1700
  let toolChangeCount = 0;
1688
1701
  let hasMidConversationOptions = false;
1689
1702
  for (const { content: text, providerOptions } of block.messages) {
1690
- const systemMessageOptions = await (0, import_provider_utils10.parseProviderOptions)({
1703
+ const systemMessageOptions = await (0, import_provider_utils11.parseProviderOptions)({
1691
1704
  provider: "anthropic",
1692
1705
  providerOptions,
1693
1706
  schema: anthropicSystemMessageProviderOptions
@@ -1797,7 +1810,7 @@ async function convertToAnthropicMessagesPrompt({
1797
1810
  } : {
1798
1811
  type: "base64",
1799
1812
  media_type: part.mediaType === "image/*" ? "image/jpeg" : part.mediaType,
1800
- data: (0, import_provider_utils10.convertToBase64)(part.data)
1813
+ data: (0, import_provider_utils11.convertToBase64)(part.data)
1801
1814
  },
1802
1815
  cache_control: cacheControl
1803
1816
  });
@@ -1817,7 +1830,7 @@ async function convertToAnthropicMessagesPrompt({
1817
1830
  } : {
1818
1831
  type: "base64",
1819
1832
  media_type: "application/pdf",
1820
- data: (0, import_provider_utils10.convertToBase64)(part.data)
1833
+ data: (0, import_provider_utils11.convertToBase64)(part.data)
1821
1834
  },
1822
1835
  title: (_c = metadata.title) != null ? _c : part.filename,
1823
1836
  ...metadata.context && { context: metadata.context },
@@ -1991,7 +2004,7 @@ async function convertToAnthropicMessagesPrompt({
1991
2004
  }
1992
2005
  case "reasoning": {
1993
2006
  if (sendReasoning) {
1994
- const reasoningMetadata = await (0, import_provider_utils10.parseProviderOptions)({
2007
+ const reasoningMetadata = await (0, import_provider_utils11.parseProviderOptions)({
1995
2008
  provider: "anthropic",
1996
2009
  providerOptions: part.providerOptions,
1997
2010
  schema: anthropicReasoningMetadataSchema
@@ -2116,7 +2129,7 @@ async function convertToAnthropicMessagesPrompt({
2116
2129
  break;
2117
2130
  }
2118
2131
  if (output.value.type === "code_execution_result") {
2119
- const codeExecutionOutput = await (0, import_provider_utils10.validateTypes)({
2132
+ const codeExecutionOutput = await (0, import_provider_utils11.validateTypes)({
2120
2133
  value: output.value,
2121
2134
  schema: codeExecution_20250522OutputSchema
2122
2135
  });
@@ -2132,7 +2145,7 @@ async function convertToAnthropicMessagesPrompt({
2132
2145
  cache_control: cacheControl
2133
2146
  });
2134
2147
  } else {
2135
- const codeExecutionOutput = await (0, import_provider_utils10.validateTypes)({
2148
+ const codeExecutionOutput = await (0, import_provider_utils11.validateTypes)({
2136
2149
  value: output.value,
2137
2150
  schema: codeExecution_20250825OutputSchema
2138
2151
  });
@@ -2169,7 +2182,7 @@ async function convertToAnthropicMessagesPrompt({
2169
2182
  });
2170
2183
  break;
2171
2184
  }
2172
- const webFetchOutput = await (0, import_provider_utils10.validateTypes)({
2185
+ const webFetchOutput = await (0, import_provider_utils11.validateTypes)({
2173
2186
  value: output.value,
2174
2187
  schema: webFetch_20250910OutputSchema
2175
2188
  });
@@ -2204,7 +2217,7 @@ async function convertToAnthropicMessagesPrompt({
2204
2217
  });
2205
2218
  break;
2206
2219
  }
2207
- const webSearchOutput = await (0, import_provider_utils10.validateTypes)({
2220
+ const webSearchOutput = await (0, import_provider_utils11.validateTypes)({
2208
2221
  value: output.value,
2209
2222
  schema: webSearch_20250305OutputSchema
2210
2223
  });
@@ -2561,7 +2574,7 @@ var AnthropicMessagesLanguageModel = class {
2561
2574
  var _a;
2562
2575
  this.modelId = modelId;
2563
2576
  this.config = config;
2564
- this.generateId = (_a = config.generateId) != null ? _a : import_provider_utils11.generateId;
2577
+ this.generateId = (_a = config.generateId) != null ? _a : import_provider_utils12.generateId;
2565
2578
  }
2566
2579
  supportsUrl(url) {
2567
2580
  return url.protocol === "https:";
@@ -2633,7 +2646,7 @@ var AnthropicMessagesLanguageModel = class {
2633
2646
  });
2634
2647
  }
2635
2648
  }
2636
- const anthropicOptions = await (0, import_provider_utils11.parseProviderOptions)({
2649
+ const anthropicOptions = await (0, import_provider_utils12.parseProviderOptions)({
2637
2650
  provider: "anthropic",
2638
2651
  providerOptions,
2639
2652
  schema: anthropicProviderOptions
@@ -2644,6 +2657,7 @@ var AnthropicMessagesLanguageModel = class {
2644
2657
  rejectsSamplingParameters,
2645
2658
  rejectsThinkingDisabledAboveHighEffort,
2646
2659
  rejectsThinkingDisabled,
2660
+ rejectsBudgetThinking,
2647
2661
  rejectsForcedToolUse,
2648
2662
  supportsBetweenToolsThinking,
2649
2663
  isKnownModel
@@ -2730,20 +2744,22 @@ var AnthropicMessagesLanguageModel = class {
2730
2744
  details: `thinking cannot be disabled for ${this.modelId}; it always uses adaptive thinking. The thinking setting has been removed. Lower 'effort' to reduce thinking.`
2731
2745
  });
2732
2746
  anthropicOptions.thinking = void 0;
2733
- } else if ("type" in thinking && thinking.type === "enabled") {
2734
- warnings.push({
2735
- type: "unsupported-setting",
2736
- setting: "providerOptions.anthropic.thinking",
2737
- 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.`
2738
- });
2739
- anthropicOptions.thinking = {
2740
- type: "adaptive",
2741
- ...thinking.blockBinding != null && {
2742
- blockBinding: thinking.blockBinding
2743
- }
2744
- };
2745
2747
  }
2746
2748
  }
2749
+ const budgetThinking = anthropicOptions == null ? void 0 : anthropicOptions.thinking;
2750
+ if (anthropicOptions != null && rejectsBudgetThinking && budgetThinking != null && "type" in budgetThinking && budgetThinking.type === "enabled") {
2751
+ warnings.push({
2752
+ type: "unsupported-setting",
2753
+ setting: "providerOptions.anthropic.thinking",
2754
+ 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.`
2755
+ });
2756
+ anthropicOptions.thinking = {
2757
+ type: "adaptive",
2758
+ ...budgetThinking.blockBinding != null && {
2759
+ blockBinding: budgetThinking.blockBinding
2760
+ }
2761
+ };
2762
+ }
2747
2763
  const thinkingOptions = anthropicOptions == null ? void 0 : anthropicOptions.thinking;
2748
2764
  const thinkingType = thinkingOptions != null && "type" in thinkingOptions ? thinkingOptions.type : void 0;
2749
2765
  if (rejectsThinkingDisabledAboveHighEffort && thinkingType === "disabled" && anthropicOptions != null && (anthropicOptions.effort === "xhigh" || anthropicOptions.effort === "max")) {
@@ -3024,15 +3040,15 @@ var AnthropicMessagesLanguageModel = class {
3024
3040
  betas,
3025
3041
  headers
3026
3042
  }) {
3027
- return (0, import_provider_utils11.combineHeaders)(
3028
- await (0, import_provider_utils11.resolve)(this.config.headers),
3043
+ return (0, import_provider_utils12.combineHeaders)(
3044
+ await (0, import_provider_utils12.resolve)(this.config.headers),
3029
3045
  headers,
3030
3046
  betas.size > 0 ? { "anthropic-beta": Array.from(betas).join(",") } : {}
3031
3047
  );
3032
3048
  }
3033
3049
  async getBetasFromHeaders(requestHeaders) {
3034
3050
  var _a, _b;
3035
- const configHeaders = await (0, import_provider_utils11.resolve)(this.config.headers);
3051
+ const configHeaders = await (0, import_provider_utils12.resolve)(this.config.headers);
3036
3052
  const configBetaHeader = (_a = configHeaders["anthropic-beta"]) != null ? _a : "";
3037
3053
  const requestBetaHeader = (_b = requestHeaders == null ? void 0 : requestHeaders["anthropic-beta"]) != null ? _b : "";
3038
3054
  return new Set(
@@ -3084,12 +3100,12 @@ var AnthropicMessagesLanguageModel = class {
3084
3100
  responseHeaders,
3085
3101
  value: response,
3086
3102
  rawValue: rawResponse
3087
- } = await (0, import_provider_utils11.postJsonToApi)({
3103
+ } = await (0, import_provider_utils12.postJsonToApi)({
3088
3104
  url: this.buildRequestUrl(false),
3089
3105
  headers: await this.getHeaders({ betas, headers: options.headers }),
3090
3106
  body: this.transformRequestBody(args, betas),
3091
3107
  failedResponseHandler: anthropicFailedResponseHandler,
3092
- successfulResponseHandler: (0, import_provider_utils11.createJsonResponseHandler)(
3108
+ successfulResponseHandler: (0, import_provider_utils12.createJsonResponseHandler)(
3093
3109
  anthropicMessagesResponseSchema
3094
3110
  ),
3095
3111
  abortSignal: options.abortSignal,
@@ -3453,12 +3469,12 @@ var AnthropicMessagesLanguageModel = class {
3453
3469
  const citationDocuments = this.extractCitationDocuments(options.prompt);
3454
3470
  const body = { ...args, stream: true };
3455
3471
  const url = this.buildRequestUrl(true);
3456
- const { responseHeaders, value: response } = await (0, import_provider_utils11.postJsonToApi)({
3472
+ const { responseHeaders, value: response } = await (0, import_provider_utils12.postJsonToApi)({
3457
3473
  url,
3458
3474
  headers: await this.getHeaders({ betas, headers: options.headers }),
3459
3475
  body: this.transformRequestBody(body, betas),
3460
3476
  failedResponseHandler: anthropicFailedResponseHandler,
3461
- successfulResponseHandler: (0, import_provider_utils11.createEventSourceResponseHandler)(
3477
+ successfulResponseHandler: (0, import_provider_utils12.createEventSourceResponseHandler)(
3462
3478
  anthropicMessagesChunkSchema
3463
3479
  ),
3464
3480
  abortSignal: options.abortSignal,
@@ -4134,6 +4150,7 @@ function getModelCapabilities(modelId) {
4134
4150
  rejectsSamplingParameters: true,
4135
4151
  rejectsThinkingDisabledAboveHighEffort: true,
4136
4152
  rejectsThinkingDisabled: true,
4153
+ rejectsBudgetThinking: true,
4137
4154
  rejectsForcedToolUse: true,
4138
4155
  supportsBetweenToolsThinking: true,
4139
4156
  isKnownModel: true
@@ -4145,10 +4162,23 @@ function getModelCapabilities(modelId) {
4145
4162
  rejectsSamplingParameters: true,
4146
4163
  rejectsThinkingDisabledAboveHighEffort: true,
4147
4164
  rejectsThinkingDisabled: true,
4165
+ rejectsBudgetThinking: true,
4148
4166
  rejectsForcedToolUse: true,
4149
4167
  supportsBetweenToolsThinking: false,
4150
4168
  isKnownModel: true
4151
4169
  };
4170
+ } else if (modelId.includes("claude-haiku-5-5")) {
4171
+ return {
4172
+ maxOutputTokens: 128e3,
4173
+ supportsStructuredOutput: true,
4174
+ rejectsSamplingParameters: true,
4175
+ rejectsThinkingDisabledAboveHighEffort: true,
4176
+ rejectsThinkingDisabled: false,
4177
+ rejectsBudgetThinking: true,
4178
+ rejectsForcedToolUse: false,
4179
+ supportsBetweenToolsThinking: false,
4180
+ isKnownModel: true
4181
+ };
4152
4182
  } else if (modelId.includes("claude-opus-5")) {
4153
4183
  return {
4154
4184
  maxOutputTokens: 128e3,
@@ -4156,6 +4186,7 @@ function getModelCapabilities(modelId) {
4156
4186
  rejectsSamplingParameters: true,
4157
4187
  rejectsThinkingDisabledAboveHighEffort: true,
4158
4188
  rejectsThinkingDisabled: false,
4189
+ rejectsBudgetThinking: false,
4159
4190
  rejectsForcedToolUse: false,
4160
4191
  supportsBetweenToolsThinking: false,
4161
4192
  isKnownModel: true
@@ -4167,6 +4198,7 @@ function getModelCapabilities(modelId) {
4167
4198
  rejectsSamplingParameters: true,
4168
4199
  rejectsThinkingDisabledAboveHighEffort: false,
4169
4200
  rejectsThinkingDisabled: true,
4201
+ rejectsBudgetThinking: true,
4170
4202
  rejectsForcedToolUse: true,
4171
4203
  supportsBetweenToolsThinking: false,
4172
4204
  isKnownModel: true
@@ -4178,6 +4210,7 @@ function getModelCapabilities(modelId) {
4178
4210
  rejectsSamplingParameters: true,
4179
4211
  rejectsThinkingDisabledAboveHighEffort: false,
4180
4212
  rejectsThinkingDisabled: true,
4213
+ rejectsBudgetThinking: true,
4181
4214
  rejectsForcedToolUse: false,
4182
4215
  supportsBetweenToolsThinking: false,
4183
4216
  isKnownModel: true
@@ -4189,6 +4222,7 @@ function getModelCapabilities(modelId) {
4189
4222
  rejectsSamplingParameters: true,
4190
4223
  rejectsThinkingDisabledAboveHighEffort: false,
4191
4224
  rejectsThinkingDisabled: false,
4225
+ rejectsBudgetThinking: false,
4192
4226
  rejectsForcedToolUse: false,
4193
4227
  supportsBetweenToolsThinking: false,
4194
4228
  isKnownModel: true
@@ -4200,6 +4234,7 @@ function getModelCapabilities(modelId) {
4200
4234
  rejectsSamplingParameters: false,
4201
4235
  rejectsThinkingDisabledAboveHighEffort: false,
4202
4236
  rejectsThinkingDisabled: false,
4237
+ rejectsBudgetThinking: false,
4203
4238
  rejectsForcedToolUse: false,
4204
4239
  supportsBetweenToolsThinking: false,
4205
4240
  isKnownModel: true
@@ -4211,6 +4246,7 @@ function getModelCapabilities(modelId) {
4211
4246
  rejectsSamplingParameters: false,
4212
4247
  rejectsThinkingDisabledAboveHighEffort: false,
4213
4248
  rejectsThinkingDisabled: false,
4249
+ rejectsBudgetThinking: false,
4214
4250
  rejectsForcedToolUse: false,
4215
4251
  supportsBetweenToolsThinking: false,
4216
4252
  isKnownModel: true
@@ -4222,6 +4258,7 @@ function getModelCapabilities(modelId) {
4222
4258
  rejectsSamplingParameters: false,
4223
4259
  rejectsThinkingDisabledAboveHighEffort: false,
4224
4260
  rejectsThinkingDisabled: false,
4261
+ rejectsBudgetThinking: false,
4225
4262
  rejectsForcedToolUse: false,
4226
4263
  supportsBetweenToolsThinking: false,
4227
4264
  isKnownModel: true
@@ -4233,6 +4270,7 @@ function getModelCapabilities(modelId) {
4233
4270
  rejectsSamplingParameters: false,
4234
4271
  rejectsThinkingDisabledAboveHighEffort: false,
4235
4272
  rejectsThinkingDisabled: false,
4273
+ rejectsBudgetThinking: false,
4236
4274
  rejectsForcedToolUse: false,
4237
4275
  supportsBetweenToolsThinking: false,
4238
4276
  isKnownModel: true
@@ -4244,6 +4282,7 @@ function getModelCapabilities(modelId) {
4244
4282
  rejectsSamplingParameters: false,
4245
4283
  rejectsThinkingDisabledAboveHighEffort: false,
4246
4284
  rejectsThinkingDisabled: false,
4285
+ rejectsBudgetThinking: false,
4247
4286
  rejectsForcedToolUse: false,
4248
4287
  supportsBetweenToolsThinking: false,
4249
4288
  isKnownModel: true
@@ -4255,6 +4294,7 @@ function getModelCapabilities(modelId) {
4255
4294
  rejectsSamplingParameters: false,
4256
4295
  rejectsThinkingDisabledAboveHighEffort: false,
4257
4296
  rejectsThinkingDisabled: false,
4297
+ rejectsBudgetThinking: false,
4258
4298
  rejectsForcedToolUse: false,
4259
4299
  supportsBetweenToolsThinking: false,
4260
4300
  isKnownModel: true
@@ -4266,6 +4306,7 @@ function getModelCapabilities(modelId) {
4266
4306
  rejectsSamplingParameters: false,
4267
4307
  rejectsThinkingDisabledAboveHighEffort: false,
4268
4308
  rejectsThinkingDisabled: false,
4309
+ rejectsBudgetThinking: false,
4269
4310
  rejectsForcedToolUse: false,
4270
4311
  supportsBetweenToolsThinking: false,
4271
4312
  isKnownModel: false
@@ -4277,6 +4318,7 @@ function getModelCapabilities(modelId) {
4277
4318
  rejectsSamplingParameters: true,
4278
4319
  rejectsThinkingDisabledAboveHighEffort: true,
4279
4320
  rejectsThinkingDisabled: false,
4321
+ rejectsBudgetThinking: false,
4280
4322
  rejectsForcedToolUse: false,
4281
4323
  supportsBetweenToolsThinking: false,
4282
4324
  isKnownModel: false
@@ -4288,6 +4330,7 @@ function getModelCapabilities(modelId) {
4288
4330
  rejectsSamplingParameters: false,
4289
4331
  rejectsThinkingDisabledAboveHighEffort: false,
4290
4332
  rejectsThinkingDisabled: false,
4333
+ rejectsBudgetThinking: false,
4291
4334
  rejectsForcedToolUse: false,
4292
4335
  supportsBetweenToolsThinking: false,
4293
4336
  isKnownModel: false
@@ -4307,44 +4350,44 @@ function mapAnthropicStopDetails(stopDetails) {
4307
4350
  }
4308
4351
 
4309
4352
  // src/tool/bash_20241022.ts
4310
- var import_provider_utils12 = require("@ai-sdk/provider-utils");
4353
+ var import_provider_utils13 = require("@ai-sdk/provider-utils");
4311
4354
  var import_v410 = require("zod/v4");
4312
- var bash_20241022InputSchema = (0, import_provider_utils12.lazySchema)(
4313
- () => (0, import_provider_utils12.zodSchema)(
4355
+ var bash_20241022InputSchema = (0, import_provider_utils13.lazySchema)(
4356
+ () => (0, import_provider_utils13.zodSchema)(
4314
4357
  import_v410.z.object({
4315
4358
  command: import_v410.z.string(),
4316
4359
  restart: import_v410.z.boolean().optional()
4317
4360
  })
4318
4361
  )
4319
4362
  );
4320
- var bash_20241022 = (0, import_provider_utils12.createProviderDefinedToolFactory)({
4363
+ var bash_20241022 = (0, import_provider_utils13.createProviderDefinedToolFactory)({
4321
4364
  id: "anthropic.bash_20241022",
4322
4365
  name: "bash",
4323
4366
  inputSchema: bash_20241022InputSchema
4324
4367
  });
4325
4368
 
4326
4369
  // src/tool/bash_20250124.ts
4327
- var import_provider_utils13 = require("@ai-sdk/provider-utils");
4370
+ var import_provider_utils14 = require("@ai-sdk/provider-utils");
4328
4371
  var import_v411 = require("zod/v4");
4329
- var bash_20250124InputSchema = (0, import_provider_utils13.lazySchema)(
4330
- () => (0, import_provider_utils13.zodSchema)(
4372
+ var bash_20250124InputSchema = (0, import_provider_utils14.lazySchema)(
4373
+ () => (0, import_provider_utils14.zodSchema)(
4331
4374
  import_v411.z.object({
4332
4375
  command: import_v411.z.string(),
4333
4376
  restart: import_v411.z.boolean().optional()
4334
4377
  })
4335
4378
  )
4336
4379
  );
4337
- var bash_20250124 = (0, import_provider_utils13.createProviderDefinedToolFactory)({
4380
+ var bash_20250124 = (0, import_provider_utils14.createProviderDefinedToolFactory)({
4338
4381
  id: "anthropic.bash_20250124",
4339
4382
  name: "bash",
4340
4383
  inputSchema: bash_20250124InputSchema
4341
4384
  });
4342
4385
 
4343
4386
  // src/tool/code-execution_20260120.ts
4344
- var import_provider_utils14 = require("@ai-sdk/provider-utils");
4387
+ var import_provider_utils15 = require("@ai-sdk/provider-utils");
4345
4388
  var import_v412 = require("zod/v4");
4346
- var codeExecution_20260120OutputSchema = (0, import_provider_utils14.lazySchema)(
4347
- () => (0, import_provider_utils14.zodSchema)(
4389
+ var codeExecution_20260120OutputSchema = (0, import_provider_utils15.lazySchema)(
4390
+ () => (0, import_provider_utils15.zodSchema)(
4348
4391
  import_v412.z.discriminatedUnion("type", [
4349
4392
  import_v412.z.object({
4350
4393
  type: import_v412.z.literal("code_execution_result"),
@@ -4401,8 +4444,8 @@ var codeExecution_20260120OutputSchema = (0, import_provider_utils14.lazySchema)
4401
4444
  ])
4402
4445
  )
4403
4446
  );
4404
- var codeExecution_20260120InputSchema = (0, import_provider_utils14.lazySchema)(
4405
- () => (0, import_provider_utils14.zodSchema)(
4447
+ var codeExecution_20260120InputSchema = (0, import_provider_utils15.lazySchema)(
4448
+ () => (0, import_provider_utils15.zodSchema)(
4406
4449
  import_v412.z.discriminatedUnion("type", [
4407
4450
  import_v412.z.object({
4408
4451
  type: import_v412.z.literal("programmatic-tool-call"),
@@ -4435,7 +4478,7 @@ var codeExecution_20260120InputSchema = (0, import_provider_utils14.lazySchema)(
4435
4478
  ])
4436
4479
  )
4437
4480
  );
4438
- var factory6 = (0, import_provider_utils14.createProviderDefinedToolFactoryWithOutputSchema)({
4481
+ var factory6 = (0, import_provider_utils15.createProviderDefinedToolFactoryWithOutputSchema)({
4439
4482
  id: "anthropic.code_execution_20260120",
4440
4483
  name: "code_execution",
4441
4484
  inputSchema: codeExecution_20260120InputSchema,
@@ -4446,10 +4489,10 @@ var codeExecution_20260120 = (args = {}) => {
4446
4489
  };
4447
4490
 
4448
4491
  // src/tool/computer_20241022.ts
4449
- var import_provider_utils15 = require("@ai-sdk/provider-utils");
4492
+ var import_provider_utils16 = require("@ai-sdk/provider-utils");
4450
4493
  var import_v413 = require("zod/v4");
4451
- var computer_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
4452
- () => (0, import_provider_utils15.zodSchema)(
4494
+ var computer_20241022InputSchema = (0, import_provider_utils16.lazySchema)(
4495
+ () => (0, import_provider_utils16.zodSchema)(
4453
4496
  import_v413.z.object({
4454
4497
  action: import_v413.z.enum([
4455
4498
  "key",
@@ -4468,17 +4511,17 @@ var computer_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
4468
4511
  })
4469
4512
  )
4470
4513
  );
4471
- var computer_20241022 = (0, import_provider_utils15.createProviderDefinedToolFactory)({
4514
+ var computer_20241022 = (0, import_provider_utils16.createProviderDefinedToolFactory)({
4472
4515
  id: "anthropic.computer_20241022",
4473
4516
  name: "computer",
4474
4517
  inputSchema: computer_20241022InputSchema
4475
4518
  });
4476
4519
 
4477
4520
  // src/tool/computer_20250124.ts
4478
- var import_provider_utils16 = require("@ai-sdk/provider-utils");
4521
+ var import_provider_utils17 = require("@ai-sdk/provider-utils");
4479
4522
  var import_v414 = require("zod/v4");
4480
- var computer_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
4481
- () => (0, import_provider_utils16.zodSchema)(
4523
+ var computer_20250124InputSchema = (0, import_provider_utils17.lazySchema)(
4524
+ () => (0, import_provider_utils17.zodSchema)(
4482
4525
  import_v414.z.object({
4483
4526
  action: import_v414.z.enum([
4484
4527
  "key",
@@ -4507,17 +4550,17 @@ var computer_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
4507
4550
  })
4508
4551
  )
4509
4552
  );
4510
- var computer_20250124 = (0, import_provider_utils16.createProviderDefinedToolFactory)({
4553
+ var computer_20250124 = (0, import_provider_utils17.createProviderDefinedToolFactory)({
4511
4554
  id: "anthropic.computer_20250124",
4512
4555
  name: "computer",
4513
4556
  inputSchema: computer_20250124InputSchema
4514
4557
  });
4515
4558
 
4516
4559
  // src/tool/memory_20250818.ts
4517
- var import_provider_utils17 = require("@ai-sdk/provider-utils");
4560
+ var import_provider_utils18 = require("@ai-sdk/provider-utils");
4518
4561
  var import_v415 = require("zod/v4");
4519
- var memory_20250818InputSchema = (0, import_provider_utils17.lazySchema)(
4520
- () => (0, import_provider_utils17.zodSchema)(
4562
+ var memory_20250818InputSchema = (0, import_provider_utils18.lazySchema)(
4563
+ () => (0, import_provider_utils18.zodSchema)(
4521
4564
  import_v415.z.discriminatedUnion("command", [
4522
4565
  import_v415.z.object({
4523
4566
  command: import_v415.z.literal("view"),
@@ -4553,17 +4596,17 @@ var memory_20250818InputSchema = (0, import_provider_utils17.lazySchema)(
4553
4596
  ])
4554
4597
  )
4555
4598
  );
4556
- var memory_20250818 = (0, import_provider_utils17.createProviderDefinedToolFactory)({
4599
+ var memory_20250818 = (0, import_provider_utils18.createProviderDefinedToolFactory)({
4557
4600
  id: "anthropic.memory_20250818",
4558
4601
  name: "memory",
4559
4602
  inputSchema: memory_20250818InputSchema
4560
4603
  });
4561
4604
 
4562
4605
  // src/tool/text-editor_20241022.ts
4563
- var import_provider_utils18 = require("@ai-sdk/provider-utils");
4606
+ var import_provider_utils19 = require("@ai-sdk/provider-utils");
4564
4607
  var import_v416 = require("zod/v4");
4565
- var textEditor_20241022InputSchema = (0, import_provider_utils18.lazySchema)(
4566
- () => (0, import_provider_utils18.zodSchema)(
4608
+ var textEditor_20241022InputSchema = (0, import_provider_utils19.lazySchema)(
4609
+ () => (0, import_provider_utils19.zodSchema)(
4567
4610
  import_v416.z.object({
4568
4611
  command: import_v416.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4569
4612
  path: import_v416.z.string(),
@@ -4575,17 +4618,17 @@ var textEditor_20241022InputSchema = (0, import_provider_utils18.lazySchema)(
4575
4618
  })
4576
4619
  )
4577
4620
  );
4578
- var textEditor_20241022 = (0, import_provider_utils18.createProviderDefinedToolFactory)({
4621
+ var textEditor_20241022 = (0, import_provider_utils19.createProviderDefinedToolFactory)({
4579
4622
  id: "anthropic.text_editor_20241022",
4580
4623
  name: "str_replace_editor",
4581
4624
  inputSchema: textEditor_20241022InputSchema
4582
4625
  });
4583
4626
 
4584
4627
  // src/tool/text-editor_20250124.ts
4585
- var import_provider_utils19 = require("@ai-sdk/provider-utils");
4628
+ var import_provider_utils20 = require("@ai-sdk/provider-utils");
4586
4629
  var import_v417 = require("zod/v4");
4587
- var textEditor_20250124InputSchema = (0, import_provider_utils19.lazySchema)(
4588
- () => (0, import_provider_utils19.zodSchema)(
4630
+ var textEditor_20250124InputSchema = (0, import_provider_utils20.lazySchema)(
4631
+ () => (0, import_provider_utils20.zodSchema)(
4589
4632
  import_v417.z.object({
4590
4633
  command: import_v417.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4591
4634
  path: import_v417.z.string(),
@@ -4597,17 +4640,17 @@ var textEditor_20250124InputSchema = (0, import_provider_utils19.lazySchema)(
4597
4640
  })
4598
4641
  )
4599
4642
  );
4600
- var textEditor_20250124 = (0, import_provider_utils19.createProviderDefinedToolFactory)({
4643
+ var textEditor_20250124 = (0, import_provider_utils20.createProviderDefinedToolFactory)({
4601
4644
  id: "anthropic.text_editor_20250124",
4602
4645
  name: "str_replace_editor",
4603
4646
  inputSchema: textEditor_20250124InputSchema
4604
4647
  });
4605
4648
 
4606
4649
  // src/tool/text-editor_20250429.ts
4607
- var import_provider_utils20 = require("@ai-sdk/provider-utils");
4650
+ var import_provider_utils21 = require("@ai-sdk/provider-utils");
4608
4651
  var import_v418 = require("zod/v4");
4609
- var textEditor_20250429InputSchema = (0, import_provider_utils20.lazySchema)(
4610
- () => (0, import_provider_utils20.zodSchema)(
4652
+ var textEditor_20250429InputSchema = (0, import_provider_utils21.lazySchema)(
4653
+ () => (0, import_provider_utils21.zodSchema)(
4611
4654
  import_v418.z.object({
4612
4655
  command: import_v418.z.enum(["view", "create", "str_replace", "insert"]),
4613
4656
  path: import_v418.z.string(),
@@ -4619,7 +4662,7 @@ var textEditor_20250429InputSchema = (0, import_provider_utils20.lazySchema)(
4619
4662
  })
4620
4663
  )
4621
4664
  );
4622
- var textEditor_20250429 = (0, import_provider_utils20.createProviderDefinedToolFactory)({
4665
+ var textEditor_20250429 = (0, import_provider_utils21.createProviderDefinedToolFactory)({
4623
4666
  id: "anthropic.text_editor_20250429",
4624
4667
  name: "str_replace_based_edit_tool",
4625
4668
  inputSchema: textEditor_20250429InputSchema