@ai-sdk/anthropic 3.0.134 → 3.0.135

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.
@@ -44,13 +44,13 @@ import {
44
44
  zodSchema as zodSchema2
45
45
  } from "@ai-sdk/provider-utils";
46
46
  import { z as z2 } from "zod/v4";
47
- var anthropicStopDetailsSchema = z2.object({
47
+ var anthropicStopDetailsSchema = () => z2.object({
48
48
  type: z2.string(),
49
49
  category: z2.string().nullish(),
50
50
  explanation: z2.string().nullish(),
51
51
  recommended_model: z2.string().nullish()
52
52
  });
53
- var anthropicSafeguardResultSchema = z2.object({
53
+ var anthropicSafeguardResultSchema = () => z2.object({
54
54
  type: z2.string(),
55
55
  status: z2.object({
56
56
  type: z2.string(),
@@ -64,7 +64,7 @@ var anthropicSafeguardResultSchema = z2.object({
64
64
  ).nullish()
65
65
  })
66
66
  });
67
- var anthropicToolCallCallerSchema = z2.union([
67
+ var anthropicToolCallCallerSchema = () => z2.union([
68
68
  z2.object({
69
69
  type: z2.literal("code_execution_20250825"),
70
70
  tool_id: z2.string()
@@ -77,7 +77,7 @@ var anthropicToolCallCallerSchema = z2.union([
77
77
  type: z2.literal("direct")
78
78
  })
79
79
  ]);
80
- var anthropicInputTransformationSchema = z2.object({
80
+ var anthropicInputTransformationSchema = () => z2.object({
81
81
  type: z2.string(),
82
82
  path: z2.string(),
83
83
  reason: z2.string()
@@ -140,7 +140,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
140
140
  name: z2.string(),
141
141
  input: z2.unknown(),
142
142
  // Programmatic tool calling: caller info when triggered from code execution
143
- caller: anthropicToolCallCallerSchema.optional(),
143
+ caller: anthropicToolCallCallerSchema().optional(),
144
144
  // Toolsets (e.g. computer toolset): name of the toolset this member call belongs to
145
145
  toolset_name: z2.string().nullish()
146
146
  }),
@@ -149,7 +149,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
149
149
  id: z2.string(),
150
150
  name: z2.string(),
151
151
  input: z2.record(z2.string(), z2.unknown()).nullish(),
152
- caller: anthropicToolCallCallerSchema.optional()
152
+ caller: anthropicToolCallCallerSchema().optional()
153
153
  }),
154
154
  z2.object({
155
155
  type: z2.literal("mcp_tool_use"),
@@ -172,7 +172,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
172
172
  z2.object({
173
173
  type: z2.literal("web_fetch_tool_result"),
174
174
  tool_use_id: z2.string(),
175
- caller: anthropicToolCallCallerSchema.optional(),
175
+ caller: anthropicToolCallCallerSchema().optional(),
176
176
  content: z2.union([
177
177
  z2.object({
178
178
  type: z2.literal("web_fetch_result"),
@@ -205,7 +205,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
205
205
  z2.object({
206
206
  type: z2.literal("web_search_tool_result"),
207
207
  tool_use_id: z2.string(),
208
- caller: anthropicToolCallCallerSchema.optional(),
208
+ caller: anthropicToolCallCallerSchema().optional(),
209
209
  content: z2.union([
210
210
  z2.array(
211
211
  z2.object({
@@ -362,9 +362,9 @@ var anthropicMessagesResponseSchema = lazySchema2(
362
362
  ),
363
363
  stop_reason: z2.string().nullish(),
364
364
  stop_sequence: z2.string().nullish(),
365
- stop_details: anthropicStopDetailsSchema.nullish(),
366
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
367
- safeguard_results: z2.array(anthropicSafeguardResultSchema).nullish(),
365
+ stop_details: anthropicStopDetailsSchema().nullish(),
366
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
367
+ safeguard_results: z2.array(anthropicSafeguardResultSchema()).nullish(),
368
368
  usage: z2.looseObject({
369
369
  input_tokens: z2.number(),
370
370
  output_tokens: z2.number(),
@@ -444,13 +444,13 @@ var anthropicMessagesChunkSchema = lazySchema2(
444
444
  id: z2.string(),
445
445
  name: z2.string(),
446
446
  input: z2.unknown(),
447
- caller: anthropicToolCallCallerSchema.optional(),
447
+ caller: anthropicToolCallCallerSchema().optional(),
448
448
  toolset_name: z2.string().nullish()
449
449
  })
450
450
  ])
451
451
  ).nullish(),
452
452
  stop_reason: z2.string().nullish(),
453
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
453
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
454
454
  container: z2.object({
455
455
  expires_at: z2.string(),
456
456
  id: z2.string()
@@ -476,7 +476,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
476
476
  // Programmatic tool calling: input may be present directly for deferred tool calls
477
477
  input: z2.record(z2.string(), z2.unknown()).optional(),
478
478
  // Programmatic tool calling: caller info when triggered from code execution
479
- caller: anthropicToolCallCallerSchema.optional(),
479
+ caller: anthropicToolCallCallerSchema().optional(),
480
480
  // Toolsets (e.g. computer toolset): name of the toolset this member call belongs to
481
481
  toolset_name: z2.string().nullish()
482
482
  }),
@@ -493,7 +493,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
493
493
  id: z2.string(),
494
494
  name: z2.string(),
495
495
  input: z2.record(z2.string(), z2.unknown()).nullish(),
496
- caller: anthropicToolCallCallerSchema.optional()
496
+ caller: anthropicToolCallCallerSchema().optional()
497
497
  }),
498
498
  z2.object({
499
499
  type: z2.literal("mcp_tool_use"),
@@ -516,7 +516,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
516
516
  z2.object({
517
517
  type: z2.literal("web_fetch_tool_result"),
518
518
  tool_use_id: z2.string(),
519
- caller: anthropicToolCallCallerSchema.optional(),
519
+ caller: anthropicToolCallCallerSchema().optional(),
520
520
  content: z2.union([
521
521
  z2.object({
522
522
  type: z2.literal("web_fetch_result"),
@@ -549,7 +549,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
549
549
  z2.object({
550
550
  type: z2.literal("web_search_tool_result"),
551
551
  tool_use_id: z2.string(),
552
- caller: anthropicToolCallCallerSchema.optional(),
552
+ caller: anthropicToolCallCallerSchema().optional(),
553
553
  content: z2.union([
554
554
  z2.array(
555
555
  z2.object({
@@ -773,8 +773,8 @@ var anthropicMessagesChunkSchema = lazySchema2(
773
773
  delta: z2.object({
774
774
  stop_reason: z2.string().nullish(),
775
775
  stop_sequence: z2.string().nullish(),
776
- stop_details: anthropicStopDetailsSchema.nullish(),
777
- safeguard_results: z2.array(anthropicSafeguardResultSchema).nullish(),
776
+ stop_details: anthropicStopDetailsSchema().nullish(),
777
+ safeguard_results: z2.array(anthropicSafeguardResultSchema()).nullish(),
778
778
  container: z2.object({
779
779
  expires_at: z2.string(),
780
780
  id: z2.string(),
@@ -814,7 +814,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
814
814
  })
815
815
  ).nullish()
816
816
  }),
817
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
817
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
818
818
  context_management: z2.object({
819
819
  applied_edits: z2.array(
820
820
  z2.union([
@@ -854,349 +854,365 @@ var anthropicReasoningMetadataSchema = lazySchema2(
854
854
  );
855
855
 
856
856
  // src/anthropic-messages-options.ts
857
+ import {
858
+ lazySchema as lazySchema3,
859
+ zodSchema as zodSchema3
860
+ } from "@ai-sdk/provider-utils";
857
861
  import { z as z3 } from "zod/v4";
858
- var anthropicFilePartProviderOptions = z3.object({
859
- /**
860
- * Citation configuration for this document.
861
- * When enabled, this document will generate citations in the response.
862
- */
863
- citations: z3.object({
864
- /**
865
- * Enable citations for this document
866
- */
867
- enabled: z3.boolean()
868
- }).optional(),
869
- /**
870
- * Custom title for the document.
871
- * If not provided, the filename will be used.
872
- */
873
- title: z3.string().optional(),
874
- /**
875
- * Context about the document that will be passed to the model
876
- * but not used towards cited content.
877
- * Useful for storing document metadata as text or stringified JSON.
878
- */
879
- context: z3.string().optional()
880
- });
881
- var anthropicSystemMessageProviderOptions = z3.object({
882
- /**
883
- * Clears this mid-conversation system message after the current turn.
884
- *
885
- * Requires the `mid-conversation-system-clear-at-2026-08-21` beta,
886
- * which is added automatically.
887
- */
888
- clearAt: z3.literal("next_user_message").optional(),
889
- /**
890
- * Sets the model effort from the next user turn until a later message
891
- * changes it. An effort-only system message with empty content can appear
892
- * first. The required `mid-conversation-output-config-2026-07-01` beta is
893
- * added automatically.
894
- */
895
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
896
- /**
897
- * Mid-conversation tool changes. Adds or removes tools from the
898
- * conversation's tool set between turns without invalidating the prompt
899
- * cache.
900
- *
901
- * Only supported on system messages that appear mid-conversation (not the
902
- * initial system prompt). A system message carrying tool changes must come
903
- * right before an assistant message or at the end of the messages.
904
- *
905
- * Tools referenced by a `tool_addition` must be declared in the `tools`
906
- * option (typically with `deferLoading: true` so they are not loaded until
907
- * the addition surfaces them). The required
908
- * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
909
- */
910
- toolChanges: z3.array(
911
- z3.discriminatedUnion("type", [
912
- z3.object({
913
- type: z3.literal("tool_addition"),
914
- toolName: z3.string()
915
- }),
916
- z3.object({
917
- type: z3.literal("tool_removal"),
918
- toolName: z3.string()
919
- })
920
- ])
921
- ).optional()
922
- });
923
- var anthropicThinkingBlockBinding = z3.object({
924
- prefixMismatchBehavior: z3.enum(["error", "drop_block"])
925
- });
926
- var anthropicLanguageModelOptions = z3.object({
927
- /**
928
- * Whether to send reasoning to the model.
929
- *
930
- * This allows you to deactivate reasoning inputs for models that do not support them.
931
- */
932
- sendReasoning: z3.boolean().optional(),
933
- /**
934
- * Determines how structured outputs are generated.
935
- *
936
- * - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
937
- * - `jsonTool`: Use a special 'json' tool to specify the structured output format.
938
- * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
939
- */
940
- structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
941
- /**
942
- * Configuration for enabling Claude's extended thinking.
943
- *
944
- * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
945
- * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
946
- *
947
- * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
948
- * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
949
- * provider drops the unsupported setting, emits a warning, and sends an
950
- * adaptive thinking request. Use `effort` to control how much they think.
951
- *
952
- * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
953
- * and the provider uses it in place of `disabled` for that model.
954
- */
955
- thinking: z3.union([
956
- z3.discriminatedUnion("type", [
957
- z3.object({
958
- /** for Sonnet 4.6, Opus 4.6, and newer models */
959
- type: z3.literal("adaptive"),
960
- /**
961
- * Controls whether thinking content is included in the response.
962
- * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
963
- * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
964
- * - `"updates"`: Thinking updates are returned between tool calls.
965
- */
966
- display: z3.enum(["omitted", "summarized", "updates"]).optional(),
967
- /**
968
- * Controls how thinking blocks are bound to an assistant prefix.
969
- *
970
- * Requires the `thinking-binding-controls-2026-08-01` beta,
971
- * which is added automatically.
972
- */
973
- blockBinding: anthropicThinkingBlockBinding.optional()
974
- }),
975
- z3.object({
976
- /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
977
- type: z3.literal("enabled"),
978
- budgetTokens: z3.number().optional()
979
- }),
980
- z3.object({
981
- type: z3.literal("disabled")
982
- }),
983
- z3.object({
862
+ var anthropicFilePartProviderOptions = lazySchema3(
863
+ () => zodSchema3(
864
+ z3.object({
865
+ /**
866
+ * Citation configuration for this document.
867
+ * When enabled, this document will generate citations in the response.
868
+ */
869
+ citations: z3.object({
984
870
  /**
985
- * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
986
- * between tool calls are returned as summarized thinking blocks.
987
- * Only supported at `low`, `medium`, and `high` effort.
871
+ * Enable citations for this document
988
872
  */
989
- type: z3.literal("between_tools")
990
- })
991
- ]),
992
- /**
993
- * Configures prefix mismatch recovery without changing the model's
994
- * default thinking mode.
995
- */
996
- z3.object({
997
- blockBinding: anthropicThinkingBlockBinding
873
+ enabled: z3.boolean()
874
+ }).optional(),
875
+ /**
876
+ * Custom title for the document.
877
+ * If not provided, the filename will be used.
878
+ */
879
+ title: z3.string().optional(),
880
+ /**
881
+ * Context about the document that will be passed to the model
882
+ * but not used towards cited content.
883
+ * Useful for storing document metadata as text or stringified JSON.
884
+ */
885
+ context: z3.string().optional()
998
886
  })
999
- ]).optional(),
1000
- /**
1001
- * Whether to disable parallel function calling during tool use. Default is false.
1002
- * When set to true, Claude will use at most one tool per response.
1003
- */
1004
- disableParallelToolUse: z3.boolean().optional(),
1005
- /**
1006
- * Cache control settings for this message.
1007
- * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
1008
- */
1009
- cacheControl: z3.object({
1010
- type: z3.literal("ephemeral"),
1011
- ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
1012
- }).optional(),
1013
- /**
1014
- * Metadata to include with the request.
1015
- *
1016
- * See https://platform.claude.com/docs/en/api/messages/create for details.
1017
- */
1018
- metadata: z3.object({
1019
- /**
1020
- * An external identifier for the user associated with the request.
1021
- *
1022
- * Should be a UUID, hash value, or other opaque identifier.
1023
- * Must not contain PII (name, email, phone number, etc.).
1024
- */
1025
- userId: z3.string().optional()
1026
- }).optional(),
1027
- /**
1028
- * MCP servers to be utilized in this request.
1029
- */
1030
- mcpServers: z3.array(
887
+ )
888
+ );
889
+ var anthropicSystemMessageProviderOptions = lazySchema3(
890
+ () => zodSchema3(
1031
891
  z3.object({
1032
- type: z3.literal("url"),
1033
- name: z3.string(),
1034
- url: z3.string(),
1035
- authorizationToken: z3.string().nullish(),
1036
- toolConfiguration: z3.object({
1037
- enabled: z3.boolean().nullish(),
1038
- allowedTools: z3.array(z3.string()).nullish()
1039
- }).nullish()
892
+ /**
893
+ * Clears this mid-conversation system message after the current turn.
894
+ *
895
+ * Requires the `mid-conversation-system-clear-at-2026-08-21` beta,
896
+ * which is added automatically.
897
+ */
898
+ clearAt: z3.literal("next_user_message").optional(),
899
+ /**
900
+ * Sets the model effort from the next user turn until a later message
901
+ * changes it. An effort-only system message with empty content can appear
902
+ * first. The required `mid-conversation-output-config-2026-07-01` beta is
903
+ * added automatically.
904
+ */
905
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
906
+ /**
907
+ * Mid-conversation tool changes. Adds or removes tools from the
908
+ * conversation's tool set between turns without invalidating the prompt
909
+ * cache.
910
+ *
911
+ * Only supported on system messages that appear mid-conversation (not the
912
+ * initial system prompt). A system message carrying tool changes must come
913
+ * right before an assistant message or at the end of the messages.
914
+ *
915
+ * Tools referenced by a `tool_addition` must be declared in the `tools`
916
+ * option (typically with `deferLoading: true` so they are not loaded until
917
+ * the addition surfaces them). The required
918
+ * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
919
+ */
920
+ toolChanges: z3.array(
921
+ z3.discriminatedUnion("type", [
922
+ z3.object({
923
+ type: z3.literal("tool_addition"),
924
+ toolName: z3.string()
925
+ }),
926
+ z3.object({
927
+ type: z3.literal("tool_removal"),
928
+ toolName: z3.string()
929
+ })
930
+ ])
931
+ ).optional()
1040
932
  })
1041
- ).optional(),
1042
- /**
1043
- * Agent Skills configuration. Skills enable Claude to perform specialized tasks
1044
- * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
1045
- * Requires code execution tool to be enabled.
1046
- */
1047
- container: z3.object({
1048
- id: z3.string().optional(),
1049
- skills: z3.array(
1050
- z3.object({
1051
- type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
1052
- skillId: z3.string(),
1053
- version: z3.string().optional()
1054
- })
1055
- ).optional()
1056
- }).optional(),
1057
- /**
1058
- * Whether to enable fine-grained (eager) streaming of tool call inputs
1059
- * and structured outputs for every function tool in the request. When
1060
- * true (the default), each function tool receives a default of
1061
- * `eager_input_streaming: true` unless it explicitly sets
1062
- * `providerOptions.anthropic.eagerInputStreaming`.
1063
- *
1064
- * @default true
1065
- */
1066
- toolStreaming: z3.boolean().optional(),
1067
- /**
1068
- * Controls how much effort the model spends on thinking, text responses,
1069
- * and tool calls. On models that always use adaptive thinking
1070
- * (e.g. `claude-opus-5-5`), effort is the main lever for latency and cost.
1071
- *
1072
- * The API default is `high` for most models and `medium` for `claude-opus-5-5`.
1073
- */
1074
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
1075
- /**
1076
- * Task budget for agentic turns. Informs the model of the total token budget
1077
- * available for the current task, allowing it to prioritize work and wind down
1078
- * gracefully as the budget is consumed.
1079
- *
1080
- * Advisory only — does not enforce a hard token limit.
1081
- */
1082
- taskBudget: z3.object({
1083
- type: z3.literal("tokens"),
1084
- total: z3.number().int().min(2e4),
1085
- remaining: z3.number().int().min(0).optional()
1086
- }).optional(),
1087
- /**
1088
- * Enable fast mode for faster inference (2.5x faster output token speeds).
1089
- * Only supported with claude-opus-4-6.
1090
- */
1091
- speed: z3.enum(["fast", "standard"]).optional(),
1092
- /**
1093
- * Controls where model inference runs for this request.
1094
- *
1095
- * - `"global"`: Inference may run in any available geography (default).
1096
- * - `"us"`: Inference runs only in US-based infrastructure.
1097
- *
1098
- * See https://platform.claude.com/docs/en/build-with-claude/data-residency
1099
- */
1100
- inferenceGeo: z3.enum(["us", "global"]).optional(),
1101
- /**
1102
- * Server-side fallback configuration.
1103
- *
1104
- * When the primary model's safety classifiers block a turn, the API
1105
- * automatically retries it server-side on a fallback model. A
1106
- * `content-filter` finish reason means the fallback(s) refused as well.
1107
- *
1108
- * - `'default'` (recommended): the API routes the retry to Anthropic's
1109
- * recommended fallback model based on the refusal category. Requires the
1110
- * `server-side-fallback-2026-07-01` beta, which is added automatically.
1111
- * - Array form: an explicit fallback chain. Each entry is merged into the
1112
- * request as a direct request to that entry's model, so it must be
1113
- * formatted accordingly: `model` is required, and an entry may
1114
- * additionally override `max_tokens`, `thinking`, `output_config`, and
1115
- * `speed` for that attempt only (`speed` additionally requires the speed
1116
- * beta). The value is passed through to the API as-is, and the
1117
- * `server-side-fallback-2026-06-01` beta is added automatically.
1118
- */
1119
- fallbacks: z3.union([
1120
- z3.literal("default"),
1121
- z3.array(
1122
- z3.object({
1123
- model: z3.string(),
1124
- max_tokens: z3.number().int().optional(),
1125
- thinking: z3.record(z3.string(), z3.unknown()).optional(),
1126
- output_config: z3.record(z3.string(), z3.unknown()).optional(),
1127
- speed: z3.enum(["fast", "standard"]).optional()
1128
- })
1129
- )
1130
- ]).optional(),
1131
- /**
1132
- * A set of beta features to enable.
1133
- * Allow a provider to receive the full `betas` set if it needs it.
1134
- */
1135
- anthropicBeta: z3.array(z3.string()).optional(),
1136
- /**
1137
- * Server-side safeguards to run as part of the request.
1138
- *
1139
- * `dangerous_tool_use` asks the API to classify every `tool_use` block in
1140
- * the response for dangerous actions (the check Claude Code's auto mode
1141
- * relies on). The per-call verdicts are returned in
1142
- * `providerMetadata.anthropic.safeguardResults`, keyed by tool call id.
1143
- * `classifierContext` is passed through to the API as `classifier_context`.
1144
- * The `dangerous-tool-use-2026-09-03` beta is added automatically.
1145
- */
1146
- safeguards: z3.array(
933
+ )
934
+ );
935
+ var anthropicLanguageModelOptions = lazySchema3(() => {
936
+ const anthropicThinkingBlockBinding = z3.object({
937
+ prefixMismatchBehavior: z3.enum(["error", "drop_block"])
938
+ });
939
+ return zodSchema3(
1147
940
  z3.object({
1148
- type: z3.literal("dangerous_tool_use"),
1149
- classifierContext: z3.record(z3.string(), z3.unknown()).optional()
1150
- })
1151
- ).optional(),
1152
- contextManagement: z3.object({
1153
- edits: z3.array(
1154
- z3.discriminatedUnion("type", [
941
+ /**
942
+ * Whether to send reasoning to the model.
943
+ *
944
+ * This allows you to deactivate reasoning inputs for models that do not support them.
945
+ */
946
+ sendReasoning: z3.boolean().optional(),
947
+ /**
948
+ * Determines how structured outputs are generated.
949
+ *
950
+ * - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
951
+ * - `jsonTool`: Use a special 'json' tool to specify the structured output format.
952
+ * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
953
+ */
954
+ structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
955
+ /**
956
+ * Configuration for enabling Claude's extended thinking.
957
+ *
958
+ * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
959
+ * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
960
+ *
961
+ * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
962
+ * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
963
+ * provider drops the unsupported setting, emits a warning, and sends an
964
+ * adaptive thinking request. Use `effort` to control how much they think.
965
+ *
966
+ * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
967
+ * and the provider uses it in place of `disabled` for that model.
968
+ */
969
+ thinking: z3.union([
970
+ z3.discriminatedUnion("type", [
971
+ z3.object({
972
+ /** for Sonnet 4.6, Opus 4.6, and newer models */
973
+ type: z3.literal("adaptive"),
974
+ /**
975
+ * Controls whether thinking content is included in the response.
976
+ * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
977
+ * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
978
+ * - `"updates"`: Thinking updates are returned between tool calls.
979
+ */
980
+ display: z3.enum(["omitted", "summarized", "updates"]).optional(),
981
+ /**
982
+ * Controls how thinking blocks are bound to an assistant prefix.
983
+ *
984
+ * Requires the `thinking-binding-controls-2026-08-01` beta,
985
+ * which is added automatically.
986
+ */
987
+ blockBinding: anthropicThinkingBlockBinding.optional()
988
+ }),
989
+ z3.object({
990
+ /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
991
+ type: z3.literal("enabled"),
992
+ budgetTokens: z3.number().optional()
993
+ }),
994
+ z3.object({
995
+ type: z3.literal("disabled")
996
+ }),
997
+ z3.object({
998
+ /**
999
+ * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
1000
+ * between tool calls are returned as summarized thinking blocks.
1001
+ * Only supported at `low`, `medium`, and `high` effort.
1002
+ */
1003
+ type: z3.literal("between_tools")
1004
+ })
1005
+ ]),
1006
+ /**
1007
+ * Configures prefix mismatch recovery without changing the model's
1008
+ * default thinking mode.
1009
+ */
1010
+ z3.object({
1011
+ blockBinding: anthropicThinkingBlockBinding
1012
+ })
1013
+ ]).optional(),
1014
+ /**
1015
+ * Whether to disable parallel function calling during tool use. Default is false.
1016
+ * When set to true, Claude will use at most one tool per response.
1017
+ */
1018
+ disableParallelToolUse: z3.boolean().optional(),
1019
+ /**
1020
+ * Cache control settings for this message.
1021
+ * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
1022
+ */
1023
+ cacheControl: z3.object({
1024
+ type: z3.literal("ephemeral"),
1025
+ ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
1026
+ }).optional(),
1027
+ /**
1028
+ * Metadata to include with the request.
1029
+ *
1030
+ * See https://platform.claude.com/docs/en/api/messages/create for details.
1031
+ */
1032
+ metadata: z3.object({
1033
+ /**
1034
+ * An external identifier for the user associated with the request.
1035
+ *
1036
+ * Should be a UUID, hash value, or other opaque identifier.
1037
+ * Must not contain PII (name, email, phone number, etc.).
1038
+ */
1039
+ userId: z3.string().optional()
1040
+ }).optional(),
1041
+ /**
1042
+ * MCP servers to be utilized in this request.
1043
+ */
1044
+ mcpServers: z3.array(
1045
+ z3.object({
1046
+ type: z3.literal("url"),
1047
+ name: z3.string(),
1048
+ url: z3.string(),
1049
+ authorizationToken: z3.string().nullish(),
1050
+ toolConfiguration: z3.object({
1051
+ enabled: z3.boolean().nullish(),
1052
+ allowedTools: z3.array(z3.string()).nullish()
1053
+ }).nullish()
1054
+ })
1055
+ ).optional(),
1056
+ /**
1057
+ * Agent Skills configuration. Skills enable Claude to perform specialized tasks
1058
+ * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
1059
+ * Requires code execution tool to be enabled.
1060
+ */
1061
+ container: z3.object({
1062
+ id: z3.string().optional(),
1063
+ skills: z3.array(
1064
+ z3.object({
1065
+ type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
1066
+ skillId: z3.string(),
1067
+ version: z3.string().optional()
1068
+ })
1069
+ ).optional()
1070
+ }).optional(),
1071
+ /**
1072
+ * Whether to enable fine-grained (eager) streaming of tool call inputs
1073
+ * and structured outputs for every function tool in the request. When
1074
+ * true (the default), each function tool receives a default of
1075
+ * `eager_input_streaming: true` unless it explicitly sets
1076
+ * `providerOptions.anthropic.eagerInputStreaming`.
1077
+ *
1078
+ * @default true
1079
+ */
1080
+ toolStreaming: z3.boolean().optional(),
1081
+ /**
1082
+ * Controls how much effort the model spends on thinking, text responses,
1083
+ * and tool calls. On models that always use adaptive thinking
1084
+ * (e.g. `claude-opus-5-5`), effort is the main lever for latency and cost.
1085
+ *
1086
+ * The API default is `high` for most models and `medium` for `claude-opus-5-5`.
1087
+ */
1088
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
1089
+ /**
1090
+ * Task budget for agentic turns. Informs the model of the total token budget
1091
+ * available for the current task, allowing it to prioritize work and wind down
1092
+ * gracefully as the budget is consumed.
1093
+ *
1094
+ * Advisory only — does not enforce a hard token limit.
1095
+ */
1096
+ taskBudget: z3.object({
1097
+ type: z3.literal("tokens"),
1098
+ total: z3.number().int().min(2e4),
1099
+ remaining: z3.number().int().min(0).optional()
1100
+ }).optional(),
1101
+ /**
1102
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
1103
+ * Only supported with claude-opus-4-6.
1104
+ */
1105
+ speed: z3.enum(["fast", "standard"]).optional(),
1106
+ /**
1107
+ * Controls where model inference runs for this request.
1108
+ *
1109
+ * - `"global"`: Inference may run in any available geography (default).
1110
+ * - `"us"`: Inference runs only in US-based infrastructure.
1111
+ *
1112
+ * See https://platform.claude.com/docs/en/build-with-claude/data-residency
1113
+ */
1114
+ inferenceGeo: z3.enum(["us", "global"]).optional(),
1115
+ /**
1116
+ * Server-side fallback configuration.
1117
+ *
1118
+ * When the primary model's safety classifiers block a turn, the API
1119
+ * automatically retries it server-side on a fallback model. A
1120
+ * `content-filter` finish reason means the fallback(s) refused as well.
1121
+ *
1122
+ * - `'default'` (recommended): the API routes the retry to Anthropic's
1123
+ * recommended fallback model based on the refusal category. Requires the
1124
+ * `server-side-fallback-2026-07-01` beta, which is added automatically.
1125
+ * - Array form: an explicit fallback chain. Each entry is merged into the
1126
+ * request as a direct request to that entry's model, so it must be
1127
+ * formatted accordingly: `model` is required, and an entry may
1128
+ * additionally override `max_tokens`, `thinking`, `output_config`, and
1129
+ * `speed` for that attempt only (`speed` additionally requires the speed
1130
+ * beta). The value is passed through to the API as-is, and the
1131
+ * `server-side-fallback-2026-06-01` beta is added automatically.
1132
+ */
1133
+ fallbacks: z3.union([
1134
+ z3.literal("default"),
1135
+ z3.array(
1136
+ z3.object({
1137
+ model: z3.string(),
1138
+ max_tokens: z3.number().int().optional(),
1139
+ thinking: z3.record(z3.string(), z3.unknown()).optional(),
1140
+ output_config: z3.record(z3.string(), z3.unknown()).optional(),
1141
+ speed: z3.enum(["fast", "standard"]).optional()
1142
+ })
1143
+ )
1144
+ ]).optional(),
1145
+ /**
1146
+ * A set of beta features to enable.
1147
+ * Allow a provider to receive the full `betas` set if it needs it.
1148
+ */
1149
+ anthropicBeta: z3.array(z3.string()).optional(),
1150
+ /**
1151
+ * Server-side safeguards to run as part of the request.
1152
+ *
1153
+ * `dangerous_tool_use` asks the API to classify every `tool_use` block in
1154
+ * the response for dangerous actions (the check Claude Code's auto mode
1155
+ * relies on). The per-call verdicts are returned in
1156
+ * `providerMetadata.anthropic.safeguardResults`, keyed by tool call id.
1157
+ * `classifierContext` is passed through to the API as `classifier_context`.
1158
+ * The `dangerous-tool-use-2026-09-03` beta is added automatically.
1159
+ */
1160
+ safeguards: z3.array(
1155
1161
  z3.object({
1156
- type: z3.literal("clear_tool_uses_20250919"),
1157
- trigger: z3.discriminatedUnion("type", [
1162
+ type: z3.literal("dangerous_tool_use"),
1163
+ classifierContext: z3.record(z3.string(), z3.unknown()).optional()
1164
+ })
1165
+ ).optional(),
1166
+ contextManagement: z3.object({
1167
+ edits: z3.array(
1168
+ z3.discriminatedUnion("type", [
1158
1169
  z3.object({
1159
- type: z3.literal("input_tokens"),
1160
- value: z3.number()
1170
+ type: z3.literal("clear_tool_uses_20250919"),
1171
+ trigger: z3.discriminatedUnion("type", [
1172
+ z3.object({
1173
+ type: z3.literal("input_tokens"),
1174
+ value: z3.number()
1175
+ }),
1176
+ z3.object({
1177
+ type: z3.literal("tool_uses"),
1178
+ value: z3.number()
1179
+ })
1180
+ ]).optional(),
1181
+ keep: z3.object({
1182
+ type: z3.literal("tool_uses"),
1183
+ value: z3.number()
1184
+ }).optional(),
1185
+ clearAtLeast: z3.object({
1186
+ type: z3.literal("input_tokens"),
1187
+ value: z3.number()
1188
+ }).optional(),
1189
+ clearToolInputs: z3.boolean().optional(),
1190
+ excludeTools: z3.array(z3.string()).optional()
1161
1191
  }),
1162
1192
  z3.object({
1163
- type: z3.literal("tool_uses"),
1164
- value: z3.number()
1165
- })
1166
- ]).optional(),
1167
- keep: z3.object({
1168
- type: z3.literal("tool_uses"),
1169
- value: z3.number()
1170
- }).optional(),
1171
- clearAtLeast: z3.object({
1172
- type: z3.literal("input_tokens"),
1173
- value: z3.number()
1174
- }).optional(),
1175
- clearToolInputs: z3.boolean().optional(),
1176
- excludeTools: z3.array(z3.string()).optional()
1177
- }),
1178
- z3.object({
1179
- type: z3.literal("clear_thinking_20251015"),
1180
- keep: z3.union([
1181
- z3.literal("all"),
1193
+ type: z3.literal("clear_thinking_20251015"),
1194
+ keep: z3.union([
1195
+ z3.literal("all"),
1196
+ z3.object({
1197
+ type: z3.literal("thinking_turns"),
1198
+ value: z3.number()
1199
+ })
1200
+ ]).optional()
1201
+ }),
1182
1202
  z3.object({
1183
- type: z3.literal("thinking_turns"),
1184
- value: z3.number()
1203
+ type: z3.literal("compact_20260112"),
1204
+ trigger: z3.object({
1205
+ type: z3.literal("input_tokens"),
1206
+ value: z3.number()
1207
+ }).optional(),
1208
+ pauseAfterCompaction: z3.boolean().optional(),
1209
+ instructions: z3.string().optional()
1185
1210
  })
1186
- ]).optional()
1187
- }),
1188
- z3.object({
1189
- type: z3.literal("compact_20260112"),
1190
- trigger: z3.object({
1191
- type: z3.literal("input_tokens"),
1192
- value: z3.number()
1193
- }).optional(),
1194
- pauseAfterCompaction: z3.boolean().optional(),
1195
- instructions: z3.string().optional()
1196
- })
1197
- ])
1198
- )
1199
- }).optional()
1211
+ ])
1212
+ )
1213
+ }).optional()
1214
+ })
1215
+ );
1200
1216
  });
1201
1217
 
1202
1218
  // src/anthropic-prepare-tools.ts
@@ -1254,12 +1270,12 @@ var CacheControlValidator = class {
1254
1270
  // src/tool/advisor_20260301.ts
1255
1271
  import {
1256
1272
  createProviderToolFactoryWithOutputSchema,
1257
- lazySchema as lazySchema3,
1258
- zodSchema as zodSchema3
1273
+ lazySchema as lazySchema4,
1274
+ zodSchema as zodSchema4
1259
1275
  } from "@ai-sdk/provider-utils";
1260
1276
  import { z as z4 } from "zod/v4";
1261
- var advisor_20260301ArgsSchema = lazySchema3(
1262
- () => zodSchema3(
1277
+ var advisor_20260301ArgsSchema = lazySchema4(
1278
+ () => zodSchema4(
1263
1279
  z4.object({
1264
1280
  model: z4.string(),
1265
1281
  maxUses: z4.number().optional(),
@@ -1270,8 +1286,8 @@ var advisor_20260301ArgsSchema = lazySchema3(
1270
1286
  })
1271
1287
  )
1272
1288
  );
1273
- var advisor_20260301OutputSchema = lazySchema3(
1274
- () => zodSchema3(
1289
+ var advisor_20260301OutputSchema = lazySchema4(
1290
+ () => zodSchema4(
1275
1291
  z4.discriminatedUnion("type", [
1276
1292
  z4.object({
1277
1293
  type: z4.literal("advisor_result"),
@@ -1288,8 +1304,8 @@ var advisor_20260301OutputSchema = lazySchema3(
1288
1304
  ])
1289
1305
  )
1290
1306
  );
1291
- var advisor_20260301InputSchema = lazySchema3(
1292
- () => zodSchema3(z4.object({}).strict())
1307
+ var advisor_20260301InputSchema = lazySchema4(
1308
+ () => zodSchema4(z4.object({}).strict())
1293
1309
  );
1294
1310
  var factory = createProviderToolFactoryWithOutputSchema({
1295
1311
  id: "anthropic.advisor_20260301",
@@ -1304,8 +1320,8 @@ var advisor_20260301 = (args) => {
1304
1320
  // src/tool/computer-toolset_20260801.ts
1305
1321
  import {
1306
1322
  createProviderToolFactory,
1307
- lazySchema as lazySchema4,
1308
- zodSchema as zodSchema4
1323
+ lazySchema as lazySchema5,
1324
+ zodSchema as zodSchema5
1309
1325
  } from "@ai-sdk/provider-utils";
1310
1326
  import { z as z5 } from "zod/v4";
1311
1327
  var computerToolset_20260801Members = [
@@ -1327,8 +1343,8 @@ var computerToolset_20260801Members = [
1327
1343
  "hold_key",
1328
1344
  "wait"
1329
1345
  ];
1330
- var computerToolset_20260801InputSchema = lazySchema4(
1331
- () => zodSchema4(
1346
+ var computerToolset_20260801InputSchema = lazySchema5(
1347
+ () => zodSchema5(
1332
1348
  z5.object({
1333
1349
  action: z5.enum(computerToolset_20260801Members),
1334
1350
  coordinate: z5.tuple([z5.number().int(), z5.number().int()]).optional(),
@@ -1347,8 +1363,8 @@ var computerToolset_20260801InputSchema = lazySchema4(
1347
1363
  })
1348
1364
  )
1349
1365
  );
1350
- var computerToolset_20260801ArgsSchema = lazySchema4(
1351
- () => zodSchema4(
1366
+ var computerToolset_20260801ArgsSchema = lazySchema5(
1367
+ () => zodSchema5(
1352
1368
  z5.object({
1353
1369
  configs: z5.partialRecord(
1354
1370
  z5.enum(computerToolset_20260801Members),
@@ -1368,19 +1384,19 @@ var computerToolset_20260801 = createProviderToolFactory({
1368
1384
  // src/tool/text-editor_20250728.ts
1369
1385
  import {
1370
1386
  createProviderToolFactory as createProviderToolFactory2,
1371
- lazySchema as lazySchema5,
1372
- zodSchema as zodSchema5
1387
+ lazySchema as lazySchema6,
1388
+ zodSchema as zodSchema6
1373
1389
  } from "@ai-sdk/provider-utils";
1374
1390
  import { z as z6 } from "zod/v4";
1375
- var textEditor_20250728ArgsSchema = lazySchema5(
1376
- () => zodSchema5(
1391
+ var textEditor_20250728ArgsSchema = lazySchema6(
1392
+ () => zodSchema6(
1377
1393
  z6.object({
1378
1394
  maxCharacters: z6.number().optional()
1379
1395
  })
1380
1396
  )
1381
1397
  );
1382
- var textEditor_20250728InputSchema = lazySchema5(
1383
- () => zodSchema5(
1398
+ var textEditor_20250728InputSchema = lazySchema6(
1399
+ () => zodSchema6(
1384
1400
  z6.object({
1385
1401
  command: z6.enum(["view", "create", "str_replace", "insert"]),
1386
1402
  path: z6.string(),
@@ -1404,12 +1420,12 @@ var textEditor_20250728 = (args = {}) => {
1404
1420
  // src/tool/web-search_20260209.ts
1405
1421
  import {
1406
1422
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
1407
- lazySchema as lazySchema6,
1408
- zodSchema as zodSchema6
1423
+ lazySchema as lazySchema7,
1424
+ zodSchema as zodSchema7
1409
1425
  } from "@ai-sdk/provider-utils";
1410
1426
  import { z as z7 } from "zod/v4";
1411
- var webSearch_20260209ArgsSchema = lazySchema6(
1412
- () => zodSchema6(
1427
+ var webSearch_20260209ArgsSchema = lazySchema7(
1428
+ () => zodSchema7(
1413
1429
  z7.object({
1414
1430
  maxUses: z7.number().optional(),
1415
1431
  allowedDomains: z7.array(z7.string()).optional(),
@@ -1424,8 +1440,8 @@ var webSearch_20260209ArgsSchema = lazySchema6(
1424
1440
  })
1425
1441
  )
1426
1442
  );
1427
- var webSearch_20260209OutputSchema = lazySchema6(
1428
- () => zodSchema6(
1443
+ var webSearch_20260209OutputSchema = lazySchema7(
1444
+ () => zodSchema7(
1429
1445
  z7.array(
1430
1446
  z7.object({
1431
1447
  url: z7.string(),
@@ -1437,8 +1453,8 @@ var webSearch_20260209OutputSchema = lazySchema6(
1437
1453
  )
1438
1454
  )
1439
1455
  );
1440
- var webSearch_20260209InputSchema = lazySchema6(
1441
- () => zodSchema6(
1456
+ var webSearch_20260209InputSchema = lazySchema7(
1457
+ () => zodSchema7(
1442
1458
  z7.object({
1443
1459
  query: z7.string()
1444
1460
  })
@@ -1457,12 +1473,12 @@ var webSearch_20260209 = (args = {}) => {
1457
1473
  // src/tool/web-search_20250305.ts
1458
1474
  import {
1459
1475
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
1460
- lazySchema as lazySchema7,
1461
- zodSchema as zodSchema7
1476
+ lazySchema as lazySchema8,
1477
+ zodSchema as zodSchema8
1462
1478
  } from "@ai-sdk/provider-utils";
1463
1479
  import { z as z8 } from "zod/v4";
1464
- var webSearch_20250305ArgsSchema = lazySchema7(
1465
- () => zodSchema7(
1480
+ var webSearch_20250305ArgsSchema = lazySchema8(
1481
+ () => zodSchema8(
1466
1482
  z8.object({
1467
1483
  maxUses: z8.number().optional(),
1468
1484
  allowedDomains: z8.array(z8.string()).optional(),
@@ -1477,8 +1493,8 @@ var webSearch_20250305ArgsSchema = lazySchema7(
1477
1493
  })
1478
1494
  )
1479
1495
  );
1480
- var webSearch_20250305OutputSchema = lazySchema7(
1481
- () => zodSchema7(
1496
+ var webSearch_20250305OutputSchema = lazySchema8(
1497
+ () => zodSchema8(
1482
1498
  z8.array(
1483
1499
  z8.object({
1484
1500
  url: z8.string(),
@@ -1490,8 +1506,8 @@ var webSearch_20250305OutputSchema = lazySchema7(
1490
1506
  )
1491
1507
  )
1492
1508
  );
1493
- var webSearch_20250305InputSchema = lazySchema7(
1494
- () => zodSchema7(
1509
+ var webSearch_20250305InputSchema = lazySchema8(
1510
+ () => zodSchema8(
1495
1511
  z8.object({
1496
1512
  query: z8.string()
1497
1513
  })
@@ -1510,12 +1526,12 @@ var webSearch_20250305 = (args = {}) => {
1510
1526
  // src/tool/web-fetch-20260209.ts
1511
1527
  import {
1512
1528
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
1513
- lazySchema as lazySchema8,
1514
- zodSchema as zodSchema8
1529
+ lazySchema as lazySchema9,
1530
+ zodSchema as zodSchema9
1515
1531
  } from "@ai-sdk/provider-utils";
1516
1532
  import { z as z9 } from "zod/v4";
1517
- var webFetch_20260209ArgsSchema = lazySchema8(
1518
- () => zodSchema8(
1533
+ var webFetch_20260209ArgsSchema = lazySchema9(
1534
+ () => zodSchema9(
1519
1535
  z9.object({
1520
1536
  maxUses: z9.number().optional(),
1521
1537
  allowedDomains: z9.array(z9.string()).optional(),
@@ -1525,8 +1541,8 @@ var webFetch_20260209ArgsSchema = lazySchema8(
1525
1541
  })
1526
1542
  )
1527
1543
  );
1528
- var webFetch_20260209OutputSchema = lazySchema8(
1529
- () => zodSchema8(
1544
+ var webFetch_20260209OutputSchema = lazySchema9(
1545
+ () => zodSchema9(
1530
1546
  z9.object({
1531
1547
  type: z9.literal("web_fetch_result"),
1532
1548
  url: z9.string(),
@@ -1551,8 +1567,8 @@ var webFetch_20260209OutputSchema = lazySchema8(
1551
1567
  })
1552
1568
  )
1553
1569
  );
1554
- var webFetch_20260209InputSchema = lazySchema8(
1555
- () => zodSchema8(
1570
+ var webFetch_20260209InputSchema = lazySchema9(
1571
+ () => zodSchema9(
1556
1572
  z9.object({
1557
1573
  url: z9.string()
1558
1574
  })
@@ -1571,12 +1587,12 @@ var webFetch_20260209 = (args = {}) => {
1571
1587
  // src/tool/web-fetch-20250910.ts
1572
1588
  import {
1573
1589
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,
1574
- lazySchema as lazySchema9,
1575
- zodSchema as zodSchema9
1590
+ lazySchema as lazySchema10,
1591
+ zodSchema as zodSchema10
1576
1592
  } from "@ai-sdk/provider-utils";
1577
1593
  import { z as z10 } from "zod/v4";
1578
- var webFetch_20250910ArgsSchema = lazySchema9(
1579
- () => zodSchema9(
1594
+ var webFetch_20250910ArgsSchema = lazySchema10(
1595
+ () => zodSchema10(
1580
1596
  z10.object({
1581
1597
  maxUses: z10.number().optional(),
1582
1598
  allowedDomains: z10.array(z10.string()).optional(),
@@ -1586,8 +1602,8 @@ var webFetch_20250910ArgsSchema = lazySchema9(
1586
1602
  })
1587
1603
  )
1588
1604
  );
1589
- var webFetch_20250910OutputSchema = lazySchema9(
1590
- () => zodSchema9(
1605
+ var webFetch_20250910OutputSchema = lazySchema10(
1606
+ () => zodSchema10(
1591
1607
  z10.object({
1592
1608
  type: z10.literal("web_fetch_result"),
1593
1609
  url: z10.string(),
@@ -1612,8 +1628,8 @@ var webFetch_20250910OutputSchema = lazySchema9(
1612
1628
  })
1613
1629
  )
1614
1630
  );
1615
- var webFetch_20250910InputSchema = lazySchema9(
1616
- () => zodSchema9(
1631
+ var webFetch_20250910InputSchema = lazySchema10(
1632
+ () => zodSchema10(
1617
1633
  z10.object({
1618
1634
  url: z10.string()
1619
1635
  })
@@ -2122,12 +2138,12 @@ import {
2122
2138
  // src/tool/code-execution_20250522.ts
2123
2139
  import {
2124
2140
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
2125
- lazySchema as lazySchema10,
2126
- zodSchema as zodSchema10
2141
+ lazySchema as lazySchema11,
2142
+ zodSchema as zodSchema11
2127
2143
  } from "@ai-sdk/provider-utils";
2128
2144
  import { z as z11 } from "zod/v4";
2129
- var codeExecution_20250522OutputSchema = lazySchema10(
2130
- () => zodSchema10(
2145
+ var codeExecution_20250522OutputSchema = lazySchema11(
2146
+ () => zodSchema11(
2131
2147
  z11.object({
2132
2148
  type: z11.literal("code_execution_result"),
2133
2149
  stdout: z11.string(),
@@ -2142,8 +2158,8 @@ var codeExecution_20250522OutputSchema = lazySchema10(
2142
2158
  })
2143
2159
  )
2144
2160
  );
2145
- var codeExecution_20250522InputSchema = lazySchema10(
2146
- () => zodSchema10(
2161
+ var codeExecution_20250522InputSchema = lazySchema11(
2162
+ () => zodSchema11(
2147
2163
  z11.object({
2148
2164
  code: z11.string()
2149
2165
  })
@@ -2161,12 +2177,12 @@ var codeExecution_20250522 = (args = {}) => {
2161
2177
  // src/tool/code-execution_20250825.ts
2162
2178
  import {
2163
2179
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
2164
- lazySchema as lazySchema11,
2165
- zodSchema as zodSchema11
2180
+ lazySchema as lazySchema12,
2181
+ zodSchema as zodSchema12
2166
2182
  } from "@ai-sdk/provider-utils";
2167
2183
  import { z as z12 } from "zod/v4";
2168
- var codeExecution_20250825OutputSchema = lazySchema11(
2169
- () => zodSchema11(
2184
+ var codeExecution_20250825OutputSchema = lazySchema12(
2185
+ () => zodSchema12(
2170
2186
  z12.discriminatedUnion("type", [
2171
2187
  z12.object({
2172
2188
  type: z12.literal("code_execution_result"),
@@ -2223,8 +2239,8 @@ var codeExecution_20250825OutputSchema = lazySchema11(
2223
2239
  ])
2224
2240
  )
2225
2241
  );
2226
- var codeExecution_20250825InputSchema = lazySchema11(
2227
- () => zodSchema11(
2242
+ var codeExecution_20250825InputSchema = lazySchema12(
2243
+ () => zodSchema12(
2228
2244
  z12.discriminatedUnion("type", [
2229
2245
  // Programmatic tool calling format (mapped from { code } by AI SDK)
2230
2246
  z12.object({
@@ -2274,12 +2290,12 @@ var codeExecution_20250825 = (args = {}) => {
2274
2290
  // src/tool/code-execution_20260120.ts
2275
2291
  import {
2276
2292
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,
2277
- lazySchema as lazySchema12,
2278
- zodSchema as zodSchema12
2293
+ lazySchema as lazySchema13,
2294
+ zodSchema as zodSchema13
2279
2295
  } from "@ai-sdk/provider-utils";
2280
2296
  import { z as z13 } from "zod/v4";
2281
- var codeExecution_20260120OutputSchema = lazySchema12(
2282
- () => zodSchema12(
2297
+ var codeExecution_20260120OutputSchema = lazySchema13(
2298
+ () => zodSchema13(
2283
2299
  z13.discriminatedUnion("type", [
2284
2300
  z13.object({
2285
2301
  type: z13.literal("code_execution_result"),
@@ -2348,8 +2364,8 @@ var codeExecution_20260120OutputSchema = lazySchema12(
2348
2364
  ])
2349
2365
  )
2350
2366
  );
2351
- var codeExecution_20260120InputSchema = lazySchema12(
2352
- () => zodSchema12(
2367
+ var codeExecution_20260120InputSchema = lazySchema13(
2368
+ () => zodSchema13(
2353
2369
  z13.discriminatedUnion("type", [
2354
2370
  z13.object({
2355
2371
  type: z13.literal("programmatic-tool-call"),
@@ -2395,12 +2411,12 @@ var codeExecution_20260120 = (args = {}) => {
2395
2411
  // src/tool/tool-search-regex_20251119.ts
2396
2412
  import {
2397
2413
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
2398
- lazySchema as lazySchema13,
2399
- zodSchema as zodSchema13
2414
+ lazySchema as lazySchema14,
2415
+ zodSchema as zodSchema14
2400
2416
  } from "@ai-sdk/provider-utils";
2401
2417
  import { z as z14 } from "zod/v4";
2402
- var toolSearchRegex_20251119OutputSchema = lazySchema13(
2403
- () => zodSchema13(
2418
+ var toolSearchRegex_20251119OutputSchema = lazySchema14(
2419
+ () => zodSchema14(
2404
2420
  z14.array(
2405
2421
  z14.object({
2406
2422
  type: z14.literal("tool_reference"),
@@ -2409,8 +2425,8 @@ var toolSearchRegex_20251119OutputSchema = lazySchema13(
2409
2425
  )
2410
2426
  )
2411
2427
  );
2412
- var toolSearchRegex_20251119InputSchema = lazySchema13(
2413
- () => zodSchema13(
2428
+ var toolSearchRegex_20251119InputSchema = lazySchema14(
2429
+ () => zodSchema14(
2414
2430
  z14.object({
2415
2431
  /**
2416
2432
  * A regex pattern to search for tools.
@@ -6149,12 +6165,12 @@ function mapAnthropicStopDetails(stopDetails) {
6149
6165
  // src/tool/bash_20241022.ts
6150
6166
  import {
6151
6167
  createProviderToolFactory as createProviderToolFactory3,
6152
- lazySchema as lazySchema14,
6153
- zodSchema as zodSchema14
6168
+ lazySchema as lazySchema15,
6169
+ zodSchema as zodSchema15
6154
6170
  } from "@ai-sdk/provider-utils";
6155
6171
  import { z as z15 } from "zod/v4";
6156
- var bash_20241022InputSchema = lazySchema14(
6157
- () => zodSchema14(
6172
+ var bash_20241022InputSchema = lazySchema15(
6173
+ () => zodSchema15(
6158
6174
  z15.object({
6159
6175
  command: z15.string(),
6160
6176
  restart: z15.boolean().optional()
@@ -6169,12 +6185,12 @@ var bash_20241022 = createProviderToolFactory3({
6169
6185
  // src/tool/bash_20250124.ts
6170
6186
  import {
6171
6187
  createProviderToolFactory as createProviderToolFactory4,
6172
- lazySchema as lazySchema15,
6173
- zodSchema as zodSchema15
6188
+ lazySchema as lazySchema16,
6189
+ zodSchema as zodSchema16
6174
6190
  } from "@ai-sdk/provider-utils";
6175
6191
  import { z as z16 } from "zod/v4";
6176
- var bash_20250124InputSchema = lazySchema15(
6177
- () => zodSchema15(
6192
+ var bash_20250124InputSchema = lazySchema16(
6193
+ () => zodSchema16(
6178
6194
  z16.object({
6179
6195
  command: z16.string(),
6180
6196
  restart: z16.boolean().optional()
@@ -6189,12 +6205,12 @@ var bash_20250124 = createProviderToolFactory4({
6189
6205
  // src/tool/computer_20241022.ts
6190
6206
  import {
6191
6207
  createProviderToolFactory as createProviderToolFactory5,
6192
- lazySchema as lazySchema16,
6193
- zodSchema as zodSchema16
6208
+ lazySchema as lazySchema17,
6209
+ zodSchema as zodSchema17
6194
6210
  } from "@ai-sdk/provider-utils";
6195
6211
  import { z as z17 } from "zod/v4";
6196
- var computer_20241022InputSchema = lazySchema16(
6197
- () => zodSchema16(
6212
+ var computer_20241022InputSchema = lazySchema17(
6213
+ () => zodSchema17(
6198
6214
  z17.object({
6199
6215
  action: z17.enum([
6200
6216
  "key",
@@ -6221,12 +6237,12 @@ var computer_20241022 = createProviderToolFactory5({
6221
6237
  // src/tool/computer_20250124.ts
6222
6238
  import {
6223
6239
  createProviderToolFactory as createProviderToolFactory6,
6224
- lazySchema as lazySchema17,
6225
- zodSchema as zodSchema17
6240
+ lazySchema as lazySchema18,
6241
+ zodSchema as zodSchema18
6226
6242
  } from "@ai-sdk/provider-utils";
6227
6243
  import { z as z18 } from "zod/v4";
6228
- var computer_20250124InputSchema = lazySchema17(
6229
- () => zodSchema17(
6244
+ var computer_20250124InputSchema = lazySchema18(
6245
+ () => zodSchema18(
6230
6246
  z18.object({
6231
6247
  action: z18.enum([
6232
6248
  "key",
@@ -6263,12 +6279,12 @@ var computer_20250124 = createProviderToolFactory6({
6263
6279
  // src/tool/computer_20251124.ts
6264
6280
  import {
6265
6281
  createProviderToolFactory as createProviderToolFactory7,
6266
- lazySchema as lazySchema18,
6267
- zodSchema as zodSchema18
6282
+ lazySchema as lazySchema19,
6283
+ zodSchema as zodSchema19
6268
6284
  } from "@ai-sdk/provider-utils";
6269
6285
  import { z as z19 } from "zod/v4";
6270
- var computer_20251124InputSchema = lazySchema18(
6271
- () => zodSchema18(
6286
+ var computer_20251124InputSchema = lazySchema19(
6287
+ () => zodSchema19(
6272
6288
  z19.object({
6273
6289
  action: z19.enum([
6274
6290
  "key",
@@ -6312,12 +6328,12 @@ var computer_20251124 = createProviderToolFactory7({
6312
6328
  // src/tool/memory_20250818.ts
6313
6329
  import {
6314
6330
  createProviderToolFactory as createProviderToolFactory8,
6315
- lazySchema as lazySchema19,
6316
- zodSchema as zodSchema19
6331
+ lazySchema as lazySchema20,
6332
+ zodSchema as zodSchema20
6317
6333
  } from "@ai-sdk/provider-utils";
6318
6334
  import { z as z20 } from "zod/v4";
6319
- var memory_20250818InputSchema = lazySchema19(
6320
- () => zodSchema19(
6335
+ var memory_20250818InputSchema = lazySchema20(
6336
+ () => zodSchema20(
6321
6337
  z20.discriminatedUnion("command", [
6322
6338
  z20.object({
6323
6339
  command: z20.literal("view"),
@@ -6361,12 +6377,12 @@ var memory_20250818 = createProviderToolFactory8({
6361
6377
  // src/tool/text-editor_20241022.ts
6362
6378
  import {
6363
6379
  createProviderToolFactory as createProviderToolFactory9,
6364
- lazySchema as lazySchema20,
6365
- zodSchema as zodSchema20
6380
+ lazySchema as lazySchema21,
6381
+ zodSchema as zodSchema21
6366
6382
  } from "@ai-sdk/provider-utils";
6367
6383
  import { z as z21 } from "zod/v4";
6368
- var textEditor_20241022InputSchema = lazySchema20(
6369
- () => zodSchema20(
6384
+ var textEditor_20241022InputSchema = lazySchema21(
6385
+ () => zodSchema21(
6370
6386
  z21.object({
6371
6387
  command: z21.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
6372
6388
  path: z21.string(),
@@ -6387,12 +6403,12 @@ var textEditor_20241022 = createProviderToolFactory9({
6387
6403
  // src/tool/text-editor_20250124.ts
6388
6404
  import {
6389
6405
  createProviderToolFactory as createProviderToolFactory10,
6390
- lazySchema as lazySchema21,
6391
- zodSchema as zodSchema21
6406
+ lazySchema as lazySchema22,
6407
+ zodSchema as zodSchema22
6392
6408
  } from "@ai-sdk/provider-utils";
6393
6409
  import { z as z22 } from "zod/v4";
6394
- var textEditor_20250124InputSchema = lazySchema21(
6395
- () => zodSchema21(
6410
+ var textEditor_20250124InputSchema = lazySchema22(
6411
+ () => zodSchema22(
6396
6412
  z22.object({
6397
6413
  command: z22.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
6398
6414
  path: z22.string(),
@@ -6413,12 +6429,12 @@ var textEditor_20250124 = createProviderToolFactory10({
6413
6429
  // src/tool/text-editor_20250429.ts
6414
6430
  import {
6415
6431
  createProviderToolFactory as createProviderToolFactory11,
6416
- lazySchema as lazySchema22,
6417
- zodSchema as zodSchema22
6432
+ lazySchema as lazySchema23,
6433
+ zodSchema as zodSchema23
6418
6434
  } from "@ai-sdk/provider-utils";
6419
6435
  import { z as z23 } from "zod/v4";
6420
- var textEditor_20250429InputSchema = lazySchema22(
6421
- () => zodSchema22(
6436
+ var textEditor_20250429InputSchema = lazySchema23(
6437
+ () => zodSchema23(
6422
6438
  z23.object({
6423
6439
  command: z23.enum(["view", "create", "str_replace", "insert"]),
6424
6440
  path: z23.string(),
@@ -6439,12 +6455,12 @@ var textEditor_20250429 = createProviderToolFactory11({
6439
6455
  // src/tool/tool-search-bm25_20251119.ts
6440
6456
  import {
6441
6457
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema10,
6442
- lazySchema as lazySchema23,
6443
- zodSchema as zodSchema23
6458
+ lazySchema as lazySchema24,
6459
+ zodSchema as zodSchema24
6444
6460
  } from "@ai-sdk/provider-utils";
6445
6461
  import { z as z24 } from "zod/v4";
6446
- var toolSearchBm25_20251119OutputSchema = lazySchema23(
6447
- () => zodSchema23(
6462
+ var toolSearchBm25_20251119OutputSchema = lazySchema24(
6463
+ () => zodSchema24(
6448
6464
  z24.array(
6449
6465
  z24.object({
6450
6466
  type: z24.literal("tool_reference"),
@@ -6453,8 +6469,8 @@ var toolSearchBm25_20251119OutputSchema = lazySchema23(
6453
6469
  )
6454
6470
  )
6455
6471
  );
6456
- var toolSearchBm25_20251119InputSchema = lazySchema23(
6457
- () => zodSchema23(
6472
+ var toolSearchBm25_20251119InputSchema = lazySchema24(
6473
+ () => zodSchema24(
6458
6474
  z24.object({
6459
6475
  /**
6460
6476
  * A natural language query to search for tools.