@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.
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from "@ai-sdk/provider-utils";
13
13
 
14
14
  // src/version.ts
15
- var VERSION = true ? "3.0.134" : "0.0.0-test";
15
+ var VERSION = true ? "3.0.135" : "0.0.0-test";
16
16
 
17
17
  // src/anthropic-messages-language-model.ts
18
18
  import {
@@ -60,13 +60,13 @@ import {
60
60
  zodSchema as zodSchema2
61
61
  } from "@ai-sdk/provider-utils";
62
62
  import { z as z2 } from "zod/v4";
63
- var anthropicStopDetailsSchema = z2.object({
63
+ var anthropicStopDetailsSchema = () => z2.object({
64
64
  type: z2.string(),
65
65
  category: z2.string().nullish(),
66
66
  explanation: z2.string().nullish(),
67
67
  recommended_model: z2.string().nullish()
68
68
  });
69
- var anthropicSafeguardResultSchema = z2.object({
69
+ var anthropicSafeguardResultSchema = () => z2.object({
70
70
  type: z2.string(),
71
71
  status: z2.object({
72
72
  type: z2.string(),
@@ -80,7 +80,7 @@ var anthropicSafeguardResultSchema = z2.object({
80
80
  ).nullish()
81
81
  })
82
82
  });
83
- var anthropicToolCallCallerSchema = z2.union([
83
+ var anthropicToolCallCallerSchema = () => z2.union([
84
84
  z2.object({
85
85
  type: z2.literal("code_execution_20250825"),
86
86
  tool_id: z2.string()
@@ -93,7 +93,7 @@ var anthropicToolCallCallerSchema = z2.union([
93
93
  type: z2.literal("direct")
94
94
  })
95
95
  ]);
96
- var anthropicInputTransformationSchema = z2.object({
96
+ var anthropicInputTransformationSchema = () => z2.object({
97
97
  type: z2.string(),
98
98
  path: z2.string(),
99
99
  reason: z2.string()
@@ -156,7 +156,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
156
156
  name: z2.string(),
157
157
  input: z2.unknown(),
158
158
  // Programmatic tool calling: caller info when triggered from code execution
159
- caller: anthropicToolCallCallerSchema.optional(),
159
+ caller: anthropicToolCallCallerSchema().optional(),
160
160
  // Toolsets (e.g. computer toolset): name of the toolset this member call belongs to
161
161
  toolset_name: z2.string().nullish()
162
162
  }),
@@ -165,7 +165,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
165
165
  id: z2.string(),
166
166
  name: z2.string(),
167
167
  input: z2.record(z2.string(), z2.unknown()).nullish(),
168
- caller: anthropicToolCallCallerSchema.optional()
168
+ caller: anthropicToolCallCallerSchema().optional()
169
169
  }),
170
170
  z2.object({
171
171
  type: z2.literal("mcp_tool_use"),
@@ -188,7 +188,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
188
188
  z2.object({
189
189
  type: z2.literal("web_fetch_tool_result"),
190
190
  tool_use_id: z2.string(),
191
- caller: anthropicToolCallCallerSchema.optional(),
191
+ caller: anthropicToolCallCallerSchema().optional(),
192
192
  content: z2.union([
193
193
  z2.object({
194
194
  type: z2.literal("web_fetch_result"),
@@ -221,7 +221,7 @@ var anthropicMessagesResponseSchema = lazySchema2(
221
221
  z2.object({
222
222
  type: z2.literal("web_search_tool_result"),
223
223
  tool_use_id: z2.string(),
224
- caller: anthropicToolCallCallerSchema.optional(),
224
+ caller: anthropicToolCallCallerSchema().optional(),
225
225
  content: z2.union([
226
226
  z2.array(
227
227
  z2.object({
@@ -378,9 +378,9 @@ var anthropicMessagesResponseSchema = lazySchema2(
378
378
  ),
379
379
  stop_reason: z2.string().nullish(),
380
380
  stop_sequence: z2.string().nullish(),
381
- stop_details: anthropicStopDetailsSchema.nullish(),
382
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
383
- safeguard_results: z2.array(anthropicSafeguardResultSchema).nullish(),
381
+ stop_details: anthropicStopDetailsSchema().nullish(),
382
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
383
+ safeguard_results: z2.array(anthropicSafeguardResultSchema()).nullish(),
384
384
  usage: z2.looseObject({
385
385
  input_tokens: z2.number(),
386
386
  output_tokens: z2.number(),
@@ -460,13 +460,13 @@ var anthropicMessagesChunkSchema = lazySchema2(
460
460
  id: z2.string(),
461
461
  name: z2.string(),
462
462
  input: z2.unknown(),
463
- caller: anthropicToolCallCallerSchema.optional(),
463
+ caller: anthropicToolCallCallerSchema().optional(),
464
464
  toolset_name: z2.string().nullish()
465
465
  })
466
466
  ])
467
467
  ).nullish(),
468
468
  stop_reason: z2.string().nullish(),
469
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
469
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
470
470
  container: z2.object({
471
471
  expires_at: z2.string(),
472
472
  id: z2.string()
@@ -492,7 +492,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
492
492
  // Programmatic tool calling: input may be present directly for deferred tool calls
493
493
  input: z2.record(z2.string(), z2.unknown()).optional(),
494
494
  // Programmatic tool calling: caller info when triggered from code execution
495
- caller: anthropicToolCallCallerSchema.optional(),
495
+ caller: anthropicToolCallCallerSchema().optional(),
496
496
  // Toolsets (e.g. computer toolset): name of the toolset this member call belongs to
497
497
  toolset_name: z2.string().nullish()
498
498
  }),
@@ -509,7 +509,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
509
509
  id: z2.string(),
510
510
  name: z2.string(),
511
511
  input: z2.record(z2.string(), z2.unknown()).nullish(),
512
- caller: anthropicToolCallCallerSchema.optional()
512
+ caller: anthropicToolCallCallerSchema().optional()
513
513
  }),
514
514
  z2.object({
515
515
  type: z2.literal("mcp_tool_use"),
@@ -532,7 +532,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
532
532
  z2.object({
533
533
  type: z2.literal("web_fetch_tool_result"),
534
534
  tool_use_id: z2.string(),
535
- caller: anthropicToolCallCallerSchema.optional(),
535
+ caller: anthropicToolCallCallerSchema().optional(),
536
536
  content: z2.union([
537
537
  z2.object({
538
538
  type: z2.literal("web_fetch_result"),
@@ -565,7 +565,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
565
565
  z2.object({
566
566
  type: z2.literal("web_search_tool_result"),
567
567
  tool_use_id: z2.string(),
568
- caller: anthropicToolCallCallerSchema.optional(),
568
+ caller: anthropicToolCallCallerSchema().optional(),
569
569
  content: z2.union([
570
570
  z2.array(
571
571
  z2.object({
@@ -789,8 +789,8 @@ var anthropicMessagesChunkSchema = lazySchema2(
789
789
  delta: z2.object({
790
790
  stop_reason: z2.string().nullish(),
791
791
  stop_sequence: z2.string().nullish(),
792
- stop_details: anthropicStopDetailsSchema.nullish(),
793
- safeguard_results: z2.array(anthropicSafeguardResultSchema).nullish(),
792
+ stop_details: anthropicStopDetailsSchema().nullish(),
793
+ safeguard_results: z2.array(anthropicSafeguardResultSchema()).nullish(),
794
794
  container: z2.object({
795
795
  expires_at: z2.string(),
796
796
  id: z2.string(),
@@ -830,7 +830,7 @@ var anthropicMessagesChunkSchema = lazySchema2(
830
830
  })
831
831
  ).nullish()
832
832
  }),
833
- input_transformations: z2.array(anthropicInputTransformationSchema).nullish(),
833
+ input_transformations: z2.array(anthropicInputTransformationSchema()).nullish(),
834
834
  context_management: z2.object({
835
835
  applied_edits: z2.array(
836
836
  z2.union([
@@ -870,349 +870,365 @@ var anthropicReasoningMetadataSchema = lazySchema2(
870
870
  );
871
871
 
872
872
  // src/anthropic-messages-options.ts
873
+ import {
874
+ lazySchema as lazySchema3,
875
+ zodSchema as zodSchema3
876
+ } from "@ai-sdk/provider-utils";
873
877
  import { z as z3 } from "zod/v4";
874
- var anthropicFilePartProviderOptions = z3.object({
875
- /**
876
- * Citation configuration for this document.
877
- * When enabled, this document will generate citations in the response.
878
- */
879
- citations: z3.object({
880
- /**
881
- * Enable citations for this document
882
- */
883
- enabled: z3.boolean()
884
- }).optional(),
885
- /**
886
- * Custom title for the document.
887
- * If not provided, the filename will be used.
888
- */
889
- title: z3.string().optional(),
890
- /**
891
- * Context about the document that will be passed to the model
892
- * but not used towards cited content.
893
- * Useful for storing document metadata as text or stringified JSON.
894
- */
895
- context: z3.string().optional()
896
- });
897
- var anthropicSystemMessageProviderOptions = z3.object({
898
- /**
899
- * Clears this mid-conversation system message after the current turn.
900
- *
901
- * Requires the `mid-conversation-system-clear-at-2026-08-21` beta,
902
- * which is added automatically.
903
- */
904
- clearAt: z3.literal("next_user_message").optional(),
905
- /**
906
- * Sets the model effort from the next user turn until a later message
907
- * changes it. An effort-only system message with empty content can appear
908
- * first. The required `mid-conversation-output-config-2026-07-01` beta is
909
- * added automatically.
910
- */
911
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
912
- /**
913
- * Mid-conversation tool changes. Adds or removes tools from the
914
- * conversation's tool set between turns without invalidating the prompt
915
- * cache.
916
- *
917
- * Only supported on system messages that appear mid-conversation (not the
918
- * initial system prompt). A system message carrying tool changes must come
919
- * right before an assistant message or at the end of the messages.
920
- *
921
- * Tools referenced by a `tool_addition` must be declared in the `tools`
922
- * option (typically with `deferLoading: true` so they are not loaded until
923
- * the addition surfaces them). The required
924
- * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
925
- */
926
- toolChanges: z3.array(
927
- z3.discriminatedUnion("type", [
928
- z3.object({
929
- type: z3.literal("tool_addition"),
930
- toolName: z3.string()
931
- }),
932
- z3.object({
933
- type: z3.literal("tool_removal"),
934
- toolName: z3.string()
935
- })
936
- ])
937
- ).optional()
938
- });
939
- var anthropicThinkingBlockBinding = z3.object({
940
- prefixMismatchBehavior: z3.enum(["error", "drop_block"])
941
- });
942
- var anthropicLanguageModelOptions = z3.object({
943
- /**
944
- * Whether to send reasoning to the model.
945
- *
946
- * This allows you to deactivate reasoning inputs for models that do not support them.
947
- */
948
- sendReasoning: z3.boolean().optional(),
949
- /**
950
- * Determines how structured outputs are generated.
951
- *
952
- * - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
953
- * - `jsonTool`: Use a special 'json' tool to specify the structured output format.
954
- * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
955
- */
956
- structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
957
- /**
958
- * Configuration for enabling Claude's extended thinking.
959
- *
960
- * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
961
- * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
962
- *
963
- * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
964
- * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
965
- * provider drops the unsupported setting, emits a warning, and sends an
966
- * adaptive thinking request. Use `effort` to control how much they think.
967
- *
968
- * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
969
- * and the provider uses it in place of `disabled` for that model.
970
- */
971
- thinking: z3.union([
972
- z3.discriminatedUnion("type", [
973
- z3.object({
974
- /** for Sonnet 4.6, Opus 4.6, and newer models */
975
- type: z3.literal("adaptive"),
976
- /**
977
- * Controls whether thinking content is included in the response.
978
- * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
979
- * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
980
- * - `"updates"`: Thinking updates are returned between tool calls.
981
- */
982
- display: z3.enum(["omitted", "summarized", "updates"]).optional(),
983
- /**
984
- * Controls how thinking blocks are bound to an assistant prefix.
985
- *
986
- * Requires the `thinking-binding-controls-2026-08-01` beta,
987
- * which is added automatically.
988
- */
989
- blockBinding: anthropicThinkingBlockBinding.optional()
990
- }),
991
- z3.object({
992
- /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
993
- type: z3.literal("enabled"),
994
- budgetTokens: z3.number().optional()
995
- }),
996
- z3.object({
997
- type: z3.literal("disabled")
998
- }),
999
- z3.object({
878
+ var anthropicFilePartProviderOptions = lazySchema3(
879
+ () => zodSchema3(
880
+ z3.object({
881
+ /**
882
+ * Citation configuration for this document.
883
+ * When enabled, this document will generate citations in the response.
884
+ */
885
+ citations: z3.object({
1000
886
  /**
1001
- * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
1002
- * between tool calls are returned as summarized thinking blocks.
1003
- * Only supported at `low`, `medium`, and `high` effort.
887
+ * Enable citations for this document
1004
888
  */
1005
- type: z3.literal("between_tools")
1006
- })
1007
- ]),
1008
- /**
1009
- * Configures prefix mismatch recovery without changing the model's
1010
- * default thinking mode.
1011
- */
1012
- z3.object({
1013
- blockBinding: anthropicThinkingBlockBinding
889
+ enabled: z3.boolean()
890
+ }).optional(),
891
+ /**
892
+ * Custom title for the document.
893
+ * If not provided, the filename will be used.
894
+ */
895
+ title: z3.string().optional(),
896
+ /**
897
+ * Context about the document that will be passed to the model
898
+ * but not used towards cited content.
899
+ * Useful for storing document metadata as text or stringified JSON.
900
+ */
901
+ context: z3.string().optional()
1014
902
  })
1015
- ]).optional(),
1016
- /**
1017
- * Whether to disable parallel function calling during tool use. Default is false.
1018
- * When set to true, Claude will use at most one tool per response.
1019
- */
1020
- disableParallelToolUse: z3.boolean().optional(),
1021
- /**
1022
- * Cache control settings for this message.
1023
- * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
1024
- */
1025
- cacheControl: z3.object({
1026
- type: z3.literal("ephemeral"),
1027
- ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
1028
- }).optional(),
1029
- /**
1030
- * Metadata to include with the request.
1031
- *
1032
- * See https://platform.claude.com/docs/en/api/messages/create for details.
1033
- */
1034
- metadata: z3.object({
1035
- /**
1036
- * An external identifier for the user associated with the request.
1037
- *
1038
- * Should be a UUID, hash value, or other opaque identifier.
1039
- * Must not contain PII (name, email, phone number, etc.).
1040
- */
1041
- userId: z3.string().optional()
1042
- }).optional(),
1043
- /**
1044
- * MCP servers to be utilized in this request.
1045
- */
1046
- mcpServers: z3.array(
903
+ )
904
+ );
905
+ var anthropicSystemMessageProviderOptions = lazySchema3(
906
+ () => zodSchema3(
1047
907
  z3.object({
1048
- type: z3.literal("url"),
1049
- name: z3.string(),
1050
- url: z3.string(),
1051
- authorizationToken: z3.string().nullish(),
1052
- toolConfiguration: z3.object({
1053
- enabled: z3.boolean().nullish(),
1054
- allowedTools: z3.array(z3.string()).nullish()
1055
- }).nullish()
908
+ /**
909
+ * Clears this mid-conversation system message after the current turn.
910
+ *
911
+ * Requires the `mid-conversation-system-clear-at-2026-08-21` beta,
912
+ * which is added automatically.
913
+ */
914
+ clearAt: z3.literal("next_user_message").optional(),
915
+ /**
916
+ * Sets the model effort from the next user turn until a later message
917
+ * changes it. An effort-only system message with empty content can appear
918
+ * first. The required `mid-conversation-output-config-2026-07-01` beta is
919
+ * added automatically.
920
+ */
921
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
922
+ /**
923
+ * Mid-conversation tool changes. Adds or removes tools from the
924
+ * conversation's tool set between turns without invalidating the prompt
925
+ * cache.
926
+ *
927
+ * Only supported on system messages that appear mid-conversation (not the
928
+ * initial system prompt). A system message carrying tool changes must come
929
+ * right before an assistant message or at the end of the messages.
930
+ *
931
+ * Tools referenced by a `tool_addition` must be declared in the `tools`
932
+ * option (typically with `deferLoading: true` so they are not loaded until
933
+ * the addition surfaces them). The required
934
+ * `mid-conversation-tool-changes-2026-07-01` beta is added automatically.
935
+ */
936
+ toolChanges: z3.array(
937
+ z3.discriminatedUnion("type", [
938
+ z3.object({
939
+ type: z3.literal("tool_addition"),
940
+ toolName: z3.string()
941
+ }),
942
+ z3.object({
943
+ type: z3.literal("tool_removal"),
944
+ toolName: z3.string()
945
+ })
946
+ ])
947
+ ).optional()
1056
948
  })
1057
- ).optional(),
1058
- /**
1059
- * Agent Skills configuration. Skills enable Claude to perform specialized tasks
1060
- * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
1061
- * Requires code execution tool to be enabled.
1062
- */
1063
- container: z3.object({
1064
- id: z3.string().optional(),
1065
- skills: z3.array(
1066
- z3.object({
1067
- type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
1068
- skillId: z3.string(),
1069
- version: z3.string().optional()
1070
- })
1071
- ).optional()
1072
- }).optional(),
1073
- /**
1074
- * Whether to enable fine-grained (eager) streaming of tool call inputs
1075
- * and structured outputs for every function tool in the request. When
1076
- * true (the default), each function tool receives a default of
1077
- * `eager_input_streaming: true` unless it explicitly sets
1078
- * `providerOptions.anthropic.eagerInputStreaming`.
1079
- *
1080
- * @default true
1081
- */
1082
- toolStreaming: z3.boolean().optional(),
1083
- /**
1084
- * Controls how much effort the model spends on thinking, text responses,
1085
- * and tool calls. On models that always use adaptive thinking
1086
- * (e.g. `claude-opus-5-5`), effort is the main lever for latency and cost.
1087
- *
1088
- * The API default is `high` for most models and `medium` for `claude-opus-5-5`.
1089
- */
1090
- effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
1091
- /**
1092
- * Task budget for agentic turns. Informs the model of the total token budget
1093
- * available for the current task, allowing it to prioritize work and wind down
1094
- * gracefully as the budget is consumed.
1095
- *
1096
- * Advisory only — does not enforce a hard token limit.
1097
- */
1098
- taskBudget: z3.object({
1099
- type: z3.literal("tokens"),
1100
- total: z3.number().int().min(2e4),
1101
- remaining: z3.number().int().min(0).optional()
1102
- }).optional(),
1103
- /**
1104
- * Enable fast mode for faster inference (2.5x faster output token speeds).
1105
- * Only supported with claude-opus-4-6.
1106
- */
1107
- speed: z3.enum(["fast", "standard"]).optional(),
1108
- /**
1109
- * Controls where model inference runs for this request.
1110
- *
1111
- * - `"global"`: Inference may run in any available geography (default).
1112
- * - `"us"`: Inference runs only in US-based infrastructure.
1113
- *
1114
- * See https://platform.claude.com/docs/en/build-with-claude/data-residency
1115
- */
1116
- inferenceGeo: z3.enum(["us", "global"]).optional(),
1117
- /**
1118
- * Server-side fallback configuration.
1119
- *
1120
- * When the primary model's safety classifiers block a turn, the API
1121
- * automatically retries it server-side on a fallback model. A
1122
- * `content-filter` finish reason means the fallback(s) refused as well.
1123
- *
1124
- * - `'default'` (recommended): the API routes the retry to Anthropic's
1125
- * recommended fallback model based on the refusal category. Requires the
1126
- * `server-side-fallback-2026-07-01` beta, which is added automatically.
1127
- * - Array form: an explicit fallback chain. Each entry is merged into the
1128
- * request as a direct request to that entry's model, so it must be
1129
- * formatted accordingly: `model` is required, and an entry may
1130
- * additionally override `max_tokens`, `thinking`, `output_config`, and
1131
- * `speed` for that attempt only (`speed` additionally requires the speed
1132
- * beta). The value is passed through to the API as-is, and the
1133
- * `server-side-fallback-2026-06-01` beta is added automatically.
1134
- */
1135
- fallbacks: z3.union([
1136
- z3.literal("default"),
1137
- z3.array(
1138
- z3.object({
1139
- model: z3.string(),
1140
- max_tokens: z3.number().int().optional(),
1141
- thinking: z3.record(z3.string(), z3.unknown()).optional(),
1142
- output_config: z3.record(z3.string(), z3.unknown()).optional(),
1143
- speed: z3.enum(["fast", "standard"]).optional()
1144
- })
1145
- )
1146
- ]).optional(),
1147
- /**
1148
- * A set of beta features to enable.
1149
- * Allow a provider to receive the full `betas` set if it needs it.
1150
- */
1151
- anthropicBeta: z3.array(z3.string()).optional(),
1152
- /**
1153
- * Server-side safeguards to run as part of the request.
1154
- *
1155
- * `dangerous_tool_use` asks the API to classify every `tool_use` block in
1156
- * the response for dangerous actions (the check Claude Code's auto mode
1157
- * relies on). The per-call verdicts are returned in
1158
- * `providerMetadata.anthropic.safeguardResults`, keyed by tool call id.
1159
- * `classifierContext` is passed through to the API as `classifier_context`.
1160
- * The `dangerous-tool-use-2026-09-03` beta is added automatically.
1161
- */
1162
- safeguards: z3.array(
949
+ )
950
+ );
951
+ var anthropicLanguageModelOptions = lazySchema3(() => {
952
+ const anthropicThinkingBlockBinding = z3.object({
953
+ prefixMismatchBehavior: z3.enum(["error", "drop_block"])
954
+ });
955
+ return zodSchema3(
1163
956
  z3.object({
1164
- type: z3.literal("dangerous_tool_use"),
1165
- classifierContext: z3.record(z3.string(), z3.unknown()).optional()
1166
- })
1167
- ).optional(),
1168
- contextManagement: z3.object({
1169
- edits: z3.array(
1170
- z3.discriminatedUnion("type", [
957
+ /**
958
+ * Whether to send reasoning to the model.
959
+ *
960
+ * This allows you to deactivate reasoning inputs for models that do not support them.
961
+ */
962
+ sendReasoning: z3.boolean().optional(),
963
+ /**
964
+ * Determines how structured outputs are generated.
965
+ *
966
+ * - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
967
+ * - `jsonTool`: Use a special 'json' tool to specify the structured output format.
968
+ * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
969
+ */
970
+ structuredOutputMode: z3.enum(["outputFormat", "jsonTool", "auto"]).optional(),
971
+ /**
972
+ * Configuration for enabling Claude's extended thinking.
973
+ *
974
+ * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.
975
+ * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
976
+ *
977
+ * Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
978
+ * `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
979
+ * provider drops the unsupported setting, emits a warning, and sends an
980
+ * adaptive thinking request. Use `effort` to control how much they think.
981
+ *
982
+ * `claude-sonnet-5-5` supports `between_tools`, its lowest thinking setting,
983
+ * and the provider uses it in place of `disabled` for that model.
984
+ */
985
+ thinking: z3.union([
986
+ z3.discriminatedUnion("type", [
987
+ z3.object({
988
+ /** for Sonnet 4.6, Opus 4.6, and newer models */
989
+ type: z3.literal("adaptive"),
990
+ /**
991
+ * Controls whether thinking content is included in the response.
992
+ * - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
993
+ * - `"summarized"`: Thinking content is returned. Required to see reasoning output.
994
+ * - `"updates"`: Thinking updates are returned between tool calls.
995
+ */
996
+ display: z3.enum(["omitted", "summarized", "updates"]).optional(),
997
+ /**
998
+ * Controls how thinking blocks are bound to an assistant prefix.
999
+ *
1000
+ * Requires the `thinking-binding-controls-2026-08-01` beta,
1001
+ * which is added automatically.
1002
+ */
1003
+ blockBinding: anthropicThinkingBlockBinding.optional()
1004
+ }),
1005
+ z3.object({
1006
+ /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
1007
+ type: z3.literal("enabled"),
1008
+ budgetTokens: z3.number().optional()
1009
+ }),
1010
+ z3.object({
1011
+ type: z3.literal("disabled")
1012
+ }),
1013
+ z3.object({
1014
+ /**
1015
+ * for `claude-sonnet-5-5`: no upfront thinking, but progress notes
1016
+ * between tool calls are returned as summarized thinking blocks.
1017
+ * Only supported at `low`, `medium`, and `high` effort.
1018
+ */
1019
+ type: z3.literal("between_tools")
1020
+ })
1021
+ ]),
1022
+ /**
1023
+ * Configures prefix mismatch recovery without changing the model's
1024
+ * default thinking mode.
1025
+ */
1026
+ z3.object({
1027
+ blockBinding: anthropicThinkingBlockBinding
1028
+ })
1029
+ ]).optional(),
1030
+ /**
1031
+ * Whether to disable parallel function calling during tool use. Default is false.
1032
+ * When set to true, Claude will use at most one tool per response.
1033
+ */
1034
+ disableParallelToolUse: z3.boolean().optional(),
1035
+ /**
1036
+ * Cache control settings for this message.
1037
+ * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
1038
+ */
1039
+ cacheControl: z3.object({
1040
+ type: z3.literal("ephemeral"),
1041
+ ttl: z3.union([z3.literal("5m"), z3.literal("1h")]).optional()
1042
+ }).optional(),
1043
+ /**
1044
+ * Metadata to include with the request.
1045
+ *
1046
+ * See https://platform.claude.com/docs/en/api/messages/create for details.
1047
+ */
1048
+ metadata: z3.object({
1049
+ /**
1050
+ * An external identifier for the user associated with the request.
1051
+ *
1052
+ * Should be a UUID, hash value, or other opaque identifier.
1053
+ * Must not contain PII (name, email, phone number, etc.).
1054
+ */
1055
+ userId: z3.string().optional()
1056
+ }).optional(),
1057
+ /**
1058
+ * MCP servers to be utilized in this request.
1059
+ */
1060
+ mcpServers: z3.array(
1061
+ z3.object({
1062
+ type: z3.literal("url"),
1063
+ name: z3.string(),
1064
+ url: z3.string(),
1065
+ authorizationToken: z3.string().nullish(),
1066
+ toolConfiguration: z3.object({
1067
+ enabled: z3.boolean().nullish(),
1068
+ allowedTools: z3.array(z3.string()).nullish()
1069
+ }).nullish()
1070
+ })
1071
+ ).optional(),
1072
+ /**
1073
+ * Agent Skills configuration. Skills enable Claude to perform specialized tasks
1074
+ * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
1075
+ * Requires code execution tool to be enabled.
1076
+ */
1077
+ container: z3.object({
1078
+ id: z3.string().optional(),
1079
+ skills: z3.array(
1080
+ z3.object({
1081
+ type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
1082
+ skillId: z3.string(),
1083
+ version: z3.string().optional()
1084
+ })
1085
+ ).optional()
1086
+ }).optional(),
1087
+ /**
1088
+ * Whether to enable fine-grained (eager) streaming of tool call inputs
1089
+ * and structured outputs for every function tool in the request. When
1090
+ * true (the default), each function tool receives a default of
1091
+ * `eager_input_streaming: true` unless it explicitly sets
1092
+ * `providerOptions.anthropic.eagerInputStreaming`.
1093
+ *
1094
+ * @default true
1095
+ */
1096
+ toolStreaming: z3.boolean().optional(),
1097
+ /**
1098
+ * Controls how much effort the model spends on thinking, text responses,
1099
+ * and tool calls. On models that always use adaptive thinking
1100
+ * (e.g. `claude-opus-5-5`), effort is the main lever for latency and cost.
1101
+ *
1102
+ * The API default is `high` for most models and `medium` for `claude-opus-5-5`.
1103
+ */
1104
+ effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
1105
+ /**
1106
+ * Task budget for agentic turns. Informs the model of the total token budget
1107
+ * available for the current task, allowing it to prioritize work and wind down
1108
+ * gracefully as the budget is consumed.
1109
+ *
1110
+ * Advisory only — does not enforce a hard token limit.
1111
+ */
1112
+ taskBudget: z3.object({
1113
+ type: z3.literal("tokens"),
1114
+ total: z3.number().int().min(2e4),
1115
+ remaining: z3.number().int().min(0).optional()
1116
+ }).optional(),
1117
+ /**
1118
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
1119
+ * Only supported with claude-opus-4-6.
1120
+ */
1121
+ speed: z3.enum(["fast", "standard"]).optional(),
1122
+ /**
1123
+ * Controls where model inference runs for this request.
1124
+ *
1125
+ * - `"global"`: Inference may run in any available geography (default).
1126
+ * - `"us"`: Inference runs only in US-based infrastructure.
1127
+ *
1128
+ * See https://platform.claude.com/docs/en/build-with-claude/data-residency
1129
+ */
1130
+ inferenceGeo: z3.enum(["us", "global"]).optional(),
1131
+ /**
1132
+ * Server-side fallback configuration.
1133
+ *
1134
+ * When the primary model's safety classifiers block a turn, the API
1135
+ * automatically retries it server-side on a fallback model. A
1136
+ * `content-filter` finish reason means the fallback(s) refused as well.
1137
+ *
1138
+ * - `'default'` (recommended): the API routes the retry to Anthropic's
1139
+ * recommended fallback model based on the refusal category. Requires the
1140
+ * `server-side-fallback-2026-07-01` beta, which is added automatically.
1141
+ * - Array form: an explicit fallback chain. Each entry is merged into the
1142
+ * request as a direct request to that entry's model, so it must be
1143
+ * formatted accordingly: `model` is required, and an entry may
1144
+ * additionally override `max_tokens`, `thinking`, `output_config`, and
1145
+ * `speed` for that attempt only (`speed` additionally requires the speed
1146
+ * beta). The value is passed through to the API as-is, and the
1147
+ * `server-side-fallback-2026-06-01` beta is added automatically.
1148
+ */
1149
+ fallbacks: z3.union([
1150
+ z3.literal("default"),
1151
+ z3.array(
1152
+ z3.object({
1153
+ model: z3.string(),
1154
+ max_tokens: z3.number().int().optional(),
1155
+ thinking: z3.record(z3.string(), z3.unknown()).optional(),
1156
+ output_config: z3.record(z3.string(), z3.unknown()).optional(),
1157
+ speed: z3.enum(["fast", "standard"]).optional()
1158
+ })
1159
+ )
1160
+ ]).optional(),
1161
+ /**
1162
+ * A set of beta features to enable.
1163
+ * Allow a provider to receive the full `betas` set if it needs it.
1164
+ */
1165
+ anthropicBeta: z3.array(z3.string()).optional(),
1166
+ /**
1167
+ * Server-side safeguards to run as part of the request.
1168
+ *
1169
+ * `dangerous_tool_use` asks the API to classify every `tool_use` block in
1170
+ * the response for dangerous actions (the check Claude Code's auto mode
1171
+ * relies on). The per-call verdicts are returned in
1172
+ * `providerMetadata.anthropic.safeguardResults`, keyed by tool call id.
1173
+ * `classifierContext` is passed through to the API as `classifier_context`.
1174
+ * The `dangerous-tool-use-2026-09-03` beta is added automatically.
1175
+ */
1176
+ safeguards: z3.array(
1171
1177
  z3.object({
1172
- type: z3.literal("clear_tool_uses_20250919"),
1173
- trigger: z3.discriminatedUnion("type", [
1178
+ type: z3.literal("dangerous_tool_use"),
1179
+ classifierContext: z3.record(z3.string(), z3.unknown()).optional()
1180
+ })
1181
+ ).optional(),
1182
+ contextManagement: z3.object({
1183
+ edits: z3.array(
1184
+ z3.discriminatedUnion("type", [
1174
1185
  z3.object({
1175
- type: z3.literal("input_tokens"),
1176
- value: z3.number()
1186
+ type: z3.literal("clear_tool_uses_20250919"),
1187
+ trigger: z3.discriminatedUnion("type", [
1188
+ z3.object({
1189
+ type: z3.literal("input_tokens"),
1190
+ value: z3.number()
1191
+ }),
1192
+ z3.object({
1193
+ type: z3.literal("tool_uses"),
1194
+ value: z3.number()
1195
+ })
1196
+ ]).optional(),
1197
+ keep: z3.object({
1198
+ type: z3.literal("tool_uses"),
1199
+ value: z3.number()
1200
+ }).optional(),
1201
+ clearAtLeast: z3.object({
1202
+ type: z3.literal("input_tokens"),
1203
+ value: z3.number()
1204
+ }).optional(),
1205
+ clearToolInputs: z3.boolean().optional(),
1206
+ excludeTools: z3.array(z3.string()).optional()
1177
1207
  }),
1178
1208
  z3.object({
1179
- type: z3.literal("tool_uses"),
1180
- value: z3.number()
1181
- })
1182
- ]).optional(),
1183
- keep: z3.object({
1184
- type: z3.literal("tool_uses"),
1185
- value: z3.number()
1186
- }).optional(),
1187
- clearAtLeast: z3.object({
1188
- type: z3.literal("input_tokens"),
1189
- value: z3.number()
1190
- }).optional(),
1191
- clearToolInputs: z3.boolean().optional(),
1192
- excludeTools: z3.array(z3.string()).optional()
1193
- }),
1194
- z3.object({
1195
- type: z3.literal("clear_thinking_20251015"),
1196
- keep: z3.union([
1197
- z3.literal("all"),
1209
+ type: z3.literal("clear_thinking_20251015"),
1210
+ keep: z3.union([
1211
+ z3.literal("all"),
1212
+ z3.object({
1213
+ type: z3.literal("thinking_turns"),
1214
+ value: z3.number()
1215
+ })
1216
+ ]).optional()
1217
+ }),
1198
1218
  z3.object({
1199
- type: z3.literal("thinking_turns"),
1200
- value: z3.number()
1219
+ type: z3.literal("compact_20260112"),
1220
+ trigger: z3.object({
1221
+ type: z3.literal("input_tokens"),
1222
+ value: z3.number()
1223
+ }).optional(),
1224
+ pauseAfterCompaction: z3.boolean().optional(),
1225
+ instructions: z3.string().optional()
1201
1226
  })
1202
- ]).optional()
1203
- }),
1204
- z3.object({
1205
- type: z3.literal("compact_20260112"),
1206
- trigger: z3.object({
1207
- type: z3.literal("input_tokens"),
1208
- value: z3.number()
1209
- }).optional(),
1210
- pauseAfterCompaction: z3.boolean().optional(),
1211
- instructions: z3.string().optional()
1212
- })
1213
- ])
1214
- )
1215
- }).optional()
1227
+ ])
1228
+ )
1229
+ }).optional()
1230
+ })
1231
+ );
1216
1232
  });
1217
1233
 
1218
1234
  // src/anthropic-prepare-tools.ts
@@ -1270,12 +1286,12 @@ var CacheControlValidator = class {
1270
1286
  // src/tool/advisor_20260301.ts
1271
1287
  import {
1272
1288
  createProviderToolFactoryWithOutputSchema,
1273
- lazySchema as lazySchema3,
1274
- zodSchema as zodSchema3
1289
+ lazySchema as lazySchema4,
1290
+ zodSchema as zodSchema4
1275
1291
  } from "@ai-sdk/provider-utils";
1276
1292
  import { z as z4 } from "zod/v4";
1277
- var advisor_20260301ArgsSchema = lazySchema3(
1278
- () => zodSchema3(
1293
+ var advisor_20260301ArgsSchema = lazySchema4(
1294
+ () => zodSchema4(
1279
1295
  z4.object({
1280
1296
  model: z4.string(),
1281
1297
  maxUses: z4.number().optional(),
@@ -1286,8 +1302,8 @@ var advisor_20260301ArgsSchema = lazySchema3(
1286
1302
  })
1287
1303
  )
1288
1304
  );
1289
- var advisor_20260301OutputSchema = lazySchema3(
1290
- () => zodSchema3(
1305
+ var advisor_20260301OutputSchema = lazySchema4(
1306
+ () => zodSchema4(
1291
1307
  z4.discriminatedUnion("type", [
1292
1308
  z4.object({
1293
1309
  type: z4.literal("advisor_result"),
@@ -1304,8 +1320,8 @@ var advisor_20260301OutputSchema = lazySchema3(
1304
1320
  ])
1305
1321
  )
1306
1322
  );
1307
- var advisor_20260301InputSchema = lazySchema3(
1308
- () => zodSchema3(z4.object({}).strict())
1323
+ var advisor_20260301InputSchema = lazySchema4(
1324
+ () => zodSchema4(z4.object({}).strict())
1309
1325
  );
1310
1326
  var factory = createProviderToolFactoryWithOutputSchema({
1311
1327
  id: "anthropic.advisor_20260301",
@@ -1320,8 +1336,8 @@ var advisor_20260301 = (args) => {
1320
1336
  // src/tool/computer-toolset_20260801.ts
1321
1337
  import {
1322
1338
  createProviderToolFactory,
1323
- lazySchema as lazySchema4,
1324
- zodSchema as zodSchema4
1339
+ lazySchema as lazySchema5,
1340
+ zodSchema as zodSchema5
1325
1341
  } from "@ai-sdk/provider-utils";
1326
1342
  import { z as z5 } from "zod/v4";
1327
1343
  var computerToolset_20260801Members = [
@@ -1343,8 +1359,8 @@ var computerToolset_20260801Members = [
1343
1359
  "hold_key",
1344
1360
  "wait"
1345
1361
  ];
1346
- var computerToolset_20260801InputSchema = lazySchema4(
1347
- () => zodSchema4(
1362
+ var computerToolset_20260801InputSchema = lazySchema5(
1363
+ () => zodSchema5(
1348
1364
  z5.object({
1349
1365
  action: z5.enum(computerToolset_20260801Members),
1350
1366
  coordinate: z5.tuple([z5.number().int(), z5.number().int()]).optional(),
@@ -1363,8 +1379,8 @@ var computerToolset_20260801InputSchema = lazySchema4(
1363
1379
  })
1364
1380
  )
1365
1381
  );
1366
- var computerToolset_20260801ArgsSchema = lazySchema4(
1367
- () => zodSchema4(
1382
+ var computerToolset_20260801ArgsSchema = lazySchema5(
1383
+ () => zodSchema5(
1368
1384
  z5.object({
1369
1385
  configs: z5.partialRecord(
1370
1386
  z5.enum(computerToolset_20260801Members),
@@ -1384,19 +1400,19 @@ var computerToolset_20260801 = createProviderToolFactory({
1384
1400
  // src/tool/text-editor_20250728.ts
1385
1401
  import {
1386
1402
  createProviderToolFactory as createProviderToolFactory2,
1387
- lazySchema as lazySchema5,
1388
- zodSchema as zodSchema5
1403
+ lazySchema as lazySchema6,
1404
+ zodSchema as zodSchema6
1389
1405
  } from "@ai-sdk/provider-utils";
1390
1406
  import { z as z6 } from "zod/v4";
1391
- var textEditor_20250728ArgsSchema = lazySchema5(
1392
- () => zodSchema5(
1407
+ var textEditor_20250728ArgsSchema = lazySchema6(
1408
+ () => zodSchema6(
1393
1409
  z6.object({
1394
1410
  maxCharacters: z6.number().optional()
1395
1411
  })
1396
1412
  )
1397
1413
  );
1398
- var textEditor_20250728InputSchema = lazySchema5(
1399
- () => zodSchema5(
1414
+ var textEditor_20250728InputSchema = lazySchema6(
1415
+ () => zodSchema6(
1400
1416
  z6.object({
1401
1417
  command: z6.enum(["view", "create", "str_replace", "insert"]),
1402
1418
  path: z6.string(),
@@ -1420,12 +1436,12 @@ var textEditor_20250728 = (args = {}) => {
1420
1436
  // src/tool/web-search_20260209.ts
1421
1437
  import {
1422
1438
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
1423
- lazySchema as lazySchema6,
1424
- zodSchema as zodSchema6
1439
+ lazySchema as lazySchema7,
1440
+ zodSchema as zodSchema7
1425
1441
  } from "@ai-sdk/provider-utils";
1426
1442
  import { z as z7 } from "zod/v4";
1427
- var webSearch_20260209ArgsSchema = lazySchema6(
1428
- () => zodSchema6(
1443
+ var webSearch_20260209ArgsSchema = lazySchema7(
1444
+ () => zodSchema7(
1429
1445
  z7.object({
1430
1446
  maxUses: z7.number().optional(),
1431
1447
  allowedDomains: z7.array(z7.string()).optional(),
@@ -1440,8 +1456,8 @@ var webSearch_20260209ArgsSchema = lazySchema6(
1440
1456
  })
1441
1457
  )
1442
1458
  );
1443
- var webSearch_20260209OutputSchema = lazySchema6(
1444
- () => zodSchema6(
1459
+ var webSearch_20260209OutputSchema = lazySchema7(
1460
+ () => zodSchema7(
1445
1461
  z7.array(
1446
1462
  z7.object({
1447
1463
  url: z7.string(),
@@ -1453,8 +1469,8 @@ var webSearch_20260209OutputSchema = lazySchema6(
1453
1469
  )
1454
1470
  )
1455
1471
  );
1456
- var webSearch_20260209InputSchema = lazySchema6(
1457
- () => zodSchema6(
1472
+ var webSearch_20260209InputSchema = lazySchema7(
1473
+ () => zodSchema7(
1458
1474
  z7.object({
1459
1475
  query: z7.string()
1460
1476
  })
@@ -1473,12 +1489,12 @@ var webSearch_20260209 = (args = {}) => {
1473
1489
  // src/tool/web-search_20250305.ts
1474
1490
  import {
1475
1491
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
1476
- lazySchema as lazySchema7,
1477
- zodSchema as zodSchema7
1492
+ lazySchema as lazySchema8,
1493
+ zodSchema as zodSchema8
1478
1494
  } from "@ai-sdk/provider-utils";
1479
1495
  import { z as z8 } from "zod/v4";
1480
- var webSearch_20250305ArgsSchema = lazySchema7(
1481
- () => zodSchema7(
1496
+ var webSearch_20250305ArgsSchema = lazySchema8(
1497
+ () => zodSchema8(
1482
1498
  z8.object({
1483
1499
  maxUses: z8.number().optional(),
1484
1500
  allowedDomains: z8.array(z8.string()).optional(),
@@ -1493,8 +1509,8 @@ var webSearch_20250305ArgsSchema = lazySchema7(
1493
1509
  })
1494
1510
  )
1495
1511
  );
1496
- var webSearch_20250305OutputSchema = lazySchema7(
1497
- () => zodSchema7(
1512
+ var webSearch_20250305OutputSchema = lazySchema8(
1513
+ () => zodSchema8(
1498
1514
  z8.array(
1499
1515
  z8.object({
1500
1516
  url: z8.string(),
@@ -1506,8 +1522,8 @@ var webSearch_20250305OutputSchema = lazySchema7(
1506
1522
  )
1507
1523
  )
1508
1524
  );
1509
- var webSearch_20250305InputSchema = lazySchema7(
1510
- () => zodSchema7(
1525
+ var webSearch_20250305InputSchema = lazySchema8(
1526
+ () => zodSchema8(
1511
1527
  z8.object({
1512
1528
  query: z8.string()
1513
1529
  })
@@ -1526,12 +1542,12 @@ var webSearch_20250305 = (args = {}) => {
1526
1542
  // src/tool/web-fetch-20260209.ts
1527
1543
  import {
1528
1544
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
1529
- lazySchema as lazySchema8,
1530
- zodSchema as zodSchema8
1545
+ lazySchema as lazySchema9,
1546
+ zodSchema as zodSchema9
1531
1547
  } from "@ai-sdk/provider-utils";
1532
1548
  import { z as z9 } from "zod/v4";
1533
- var webFetch_20260209ArgsSchema = lazySchema8(
1534
- () => zodSchema8(
1549
+ var webFetch_20260209ArgsSchema = lazySchema9(
1550
+ () => zodSchema9(
1535
1551
  z9.object({
1536
1552
  maxUses: z9.number().optional(),
1537
1553
  allowedDomains: z9.array(z9.string()).optional(),
@@ -1541,8 +1557,8 @@ var webFetch_20260209ArgsSchema = lazySchema8(
1541
1557
  })
1542
1558
  )
1543
1559
  );
1544
- var webFetch_20260209OutputSchema = lazySchema8(
1545
- () => zodSchema8(
1560
+ var webFetch_20260209OutputSchema = lazySchema9(
1561
+ () => zodSchema9(
1546
1562
  z9.object({
1547
1563
  type: z9.literal("web_fetch_result"),
1548
1564
  url: z9.string(),
@@ -1567,8 +1583,8 @@ var webFetch_20260209OutputSchema = lazySchema8(
1567
1583
  })
1568
1584
  )
1569
1585
  );
1570
- var webFetch_20260209InputSchema = lazySchema8(
1571
- () => zodSchema8(
1586
+ var webFetch_20260209InputSchema = lazySchema9(
1587
+ () => zodSchema9(
1572
1588
  z9.object({
1573
1589
  url: z9.string()
1574
1590
  })
@@ -1587,12 +1603,12 @@ var webFetch_20260209 = (args = {}) => {
1587
1603
  // src/tool/web-fetch-20250910.ts
1588
1604
  import {
1589
1605
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,
1590
- lazySchema as lazySchema9,
1591
- zodSchema as zodSchema9
1606
+ lazySchema as lazySchema10,
1607
+ zodSchema as zodSchema10
1592
1608
  } from "@ai-sdk/provider-utils";
1593
1609
  import { z as z10 } from "zod/v4";
1594
- var webFetch_20250910ArgsSchema = lazySchema9(
1595
- () => zodSchema9(
1610
+ var webFetch_20250910ArgsSchema = lazySchema10(
1611
+ () => zodSchema10(
1596
1612
  z10.object({
1597
1613
  maxUses: z10.number().optional(),
1598
1614
  allowedDomains: z10.array(z10.string()).optional(),
@@ -1602,8 +1618,8 @@ var webFetch_20250910ArgsSchema = lazySchema9(
1602
1618
  })
1603
1619
  )
1604
1620
  );
1605
- var webFetch_20250910OutputSchema = lazySchema9(
1606
- () => zodSchema9(
1621
+ var webFetch_20250910OutputSchema = lazySchema10(
1622
+ () => zodSchema10(
1607
1623
  z10.object({
1608
1624
  type: z10.literal("web_fetch_result"),
1609
1625
  url: z10.string(),
@@ -1628,8 +1644,8 @@ var webFetch_20250910OutputSchema = lazySchema9(
1628
1644
  })
1629
1645
  )
1630
1646
  );
1631
- var webFetch_20250910InputSchema = lazySchema9(
1632
- () => zodSchema9(
1647
+ var webFetch_20250910InputSchema = lazySchema10(
1648
+ () => zodSchema10(
1633
1649
  z10.object({
1634
1650
  url: z10.string()
1635
1651
  })
@@ -2138,12 +2154,12 @@ import {
2138
2154
  // src/tool/code-execution_20250522.ts
2139
2155
  import {
2140
2156
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
2141
- lazySchema as lazySchema10,
2142
- zodSchema as zodSchema10
2157
+ lazySchema as lazySchema11,
2158
+ zodSchema as zodSchema11
2143
2159
  } from "@ai-sdk/provider-utils";
2144
2160
  import { z as z11 } from "zod/v4";
2145
- var codeExecution_20250522OutputSchema = lazySchema10(
2146
- () => zodSchema10(
2161
+ var codeExecution_20250522OutputSchema = lazySchema11(
2162
+ () => zodSchema11(
2147
2163
  z11.object({
2148
2164
  type: z11.literal("code_execution_result"),
2149
2165
  stdout: z11.string(),
@@ -2158,8 +2174,8 @@ var codeExecution_20250522OutputSchema = lazySchema10(
2158
2174
  })
2159
2175
  )
2160
2176
  );
2161
- var codeExecution_20250522InputSchema = lazySchema10(
2162
- () => zodSchema10(
2177
+ var codeExecution_20250522InputSchema = lazySchema11(
2178
+ () => zodSchema11(
2163
2179
  z11.object({
2164
2180
  code: z11.string()
2165
2181
  })
@@ -2177,12 +2193,12 @@ var codeExecution_20250522 = (args = {}) => {
2177
2193
  // src/tool/code-execution_20250825.ts
2178
2194
  import {
2179
2195
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
2180
- lazySchema as lazySchema11,
2181
- zodSchema as zodSchema11
2196
+ lazySchema as lazySchema12,
2197
+ zodSchema as zodSchema12
2182
2198
  } from "@ai-sdk/provider-utils";
2183
2199
  import { z as z12 } from "zod/v4";
2184
- var codeExecution_20250825OutputSchema = lazySchema11(
2185
- () => zodSchema11(
2200
+ var codeExecution_20250825OutputSchema = lazySchema12(
2201
+ () => zodSchema12(
2186
2202
  z12.discriminatedUnion("type", [
2187
2203
  z12.object({
2188
2204
  type: z12.literal("code_execution_result"),
@@ -2239,8 +2255,8 @@ var codeExecution_20250825OutputSchema = lazySchema11(
2239
2255
  ])
2240
2256
  )
2241
2257
  );
2242
- var codeExecution_20250825InputSchema = lazySchema11(
2243
- () => zodSchema11(
2258
+ var codeExecution_20250825InputSchema = lazySchema12(
2259
+ () => zodSchema12(
2244
2260
  z12.discriminatedUnion("type", [
2245
2261
  // Programmatic tool calling format (mapped from { code } by AI SDK)
2246
2262
  z12.object({
@@ -2290,12 +2306,12 @@ var codeExecution_20250825 = (args = {}) => {
2290
2306
  // src/tool/code-execution_20260120.ts
2291
2307
  import {
2292
2308
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,
2293
- lazySchema as lazySchema12,
2294
- zodSchema as zodSchema12
2309
+ lazySchema as lazySchema13,
2310
+ zodSchema as zodSchema13
2295
2311
  } from "@ai-sdk/provider-utils";
2296
2312
  import { z as z13 } from "zod/v4";
2297
- var codeExecution_20260120OutputSchema = lazySchema12(
2298
- () => zodSchema12(
2313
+ var codeExecution_20260120OutputSchema = lazySchema13(
2314
+ () => zodSchema13(
2299
2315
  z13.discriminatedUnion("type", [
2300
2316
  z13.object({
2301
2317
  type: z13.literal("code_execution_result"),
@@ -2364,8 +2380,8 @@ var codeExecution_20260120OutputSchema = lazySchema12(
2364
2380
  ])
2365
2381
  )
2366
2382
  );
2367
- var codeExecution_20260120InputSchema = lazySchema12(
2368
- () => zodSchema12(
2383
+ var codeExecution_20260120InputSchema = lazySchema13(
2384
+ () => zodSchema13(
2369
2385
  z13.discriminatedUnion("type", [
2370
2386
  z13.object({
2371
2387
  type: z13.literal("programmatic-tool-call"),
@@ -2411,12 +2427,12 @@ var codeExecution_20260120 = (args = {}) => {
2411
2427
  // src/tool/tool-search-regex_20251119.ts
2412
2428
  import {
2413
2429
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
2414
- lazySchema as lazySchema13,
2415
- zodSchema as zodSchema13
2430
+ lazySchema as lazySchema14,
2431
+ zodSchema as zodSchema14
2416
2432
  } from "@ai-sdk/provider-utils";
2417
2433
  import { z as z14 } from "zod/v4";
2418
- var toolSearchRegex_20251119OutputSchema = lazySchema13(
2419
- () => zodSchema13(
2434
+ var toolSearchRegex_20251119OutputSchema = lazySchema14(
2435
+ () => zodSchema14(
2420
2436
  z14.array(
2421
2437
  z14.object({
2422
2438
  type: z14.literal("tool_reference"),
@@ -2425,8 +2441,8 @@ var toolSearchRegex_20251119OutputSchema = lazySchema13(
2425
2441
  )
2426
2442
  )
2427
2443
  );
2428
- var toolSearchRegex_20251119InputSchema = lazySchema13(
2429
- () => zodSchema13(
2444
+ var toolSearchRegex_20251119InputSchema = lazySchema14(
2445
+ () => zodSchema14(
2430
2446
  z14.object({
2431
2447
  /**
2432
2448
  * A regex pattern to search for tools.
@@ -6165,12 +6181,12 @@ function mapAnthropicStopDetails(stopDetails) {
6165
6181
  // src/tool/bash_20241022.ts
6166
6182
  import {
6167
6183
  createProviderToolFactory as createProviderToolFactory3,
6168
- lazySchema as lazySchema14,
6169
- zodSchema as zodSchema14
6184
+ lazySchema as lazySchema15,
6185
+ zodSchema as zodSchema15
6170
6186
  } from "@ai-sdk/provider-utils";
6171
6187
  import { z as z15 } from "zod/v4";
6172
- var bash_20241022InputSchema = lazySchema14(
6173
- () => zodSchema14(
6188
+ var bash_20241022InputSchema = lazySchema15(
6189
+ () => zodSchema15(
6174
6190
  z15.object({
6175
6191
  command: z15.string(),
6176
6192
  restart: z15.boolean().optional()
@@ -6185,12 +6201,12 @@ var bash_20241022 = createProviderToolFactory3({
6185
6201
  // src/tool/bash_20250124.ts
6186
6202
  import {
6187
6203
  createProviderToolFactory as createProviderToolFactory4,
6188
- lazySchema as lazySchema15,
6189
- zodSchema as zodSchema15
6204
+ lazySchema as lazySchema16,
6205
+ zodSchema as zodSchema16
6190
6206
  } from "@ai-sdk/provider-utils";
6191
6207
  import { z as z16 } from "zod/v4";
6192
- var bash_20250124InputSchema = lazySchema15(
6193
- () => zodSchema15(
6208
+ var bash_20250124InputSchema = lazySchema16(
6209
+ () => zodSchema16(
6194
6210
  z16.object({
6195
6211
  command: z16.string(),
6196
6212
  restart: z16.boolean().optional()
@@ -6205,12 +6221,12 @@ var bash_20250124 = createProviderToolFactory4({
6205
6221
  // src/tool/computer_20241022.ts
6206
6222
  import {
6207
6223
  createProviderToolFactory as createProviderToolFactory5,
6208
- lazySchema as lazySchema16,
6209
- zodSchema as zodSchema16
6224
+ lazySchema as lazySchema17,
6225
+ zodSchema as zodSchema17
6210
6226
  } from "@ai-sdk/provider-utils";
6211
6227
  import { z as z17 } from "zod/v4";
6212
- var computer_20241022InputSchema = lazySchema16(
6213
- () => zodSchema16(
6228
+ var computer_20241022InputSchema = lazySchema17(
6229
+ () => zodSchema17(
6214
6230
  z17.object({
6215
6231
  action: z17.enum([
6216
6232
  "key",
@@ -6237,12 +6253,12 @@ var computer_20241022 = createProviderToolFactory5({
6237
6253
  // src/tool/computer_20250124.ts
6238
6254
  import {
6239
6255
  createProviderToolFactory as createProviderToolFactory6,
6240
- lazySchema as lazySchema17,
6241
- zodSchema as zodSchema17
6256
+ lazySchema as lazySchema18,
6257
+ zodSchema as zodSchema18
6242
6258
  } from "@ai-sdk/provider-utils";
6243
6259
  import { z as z18 } from "zod/v4";
6244
- var computer_20250124InputSchema = lazySchema17(
6245
- () => zodSchema17(
6260
+ var computer_20250124InputSchema = lazySchema18(
6261
+ () => zodSchema18(
6246
6262
  z18.object({
6247
6263
  action: z18.enum([
6248
6264
  "key",
@@ -6279,12 +6295,12 @@ var computer_20250124 = createProviderToolFactory6({
6279
6295
  // src/tool/computer_20251124.ts
6280
6296
  import {
6281
6297
  createProviderToolFactory as createProviderToolFactory7,
6282
- lazySchema as lazySchema18,
6283
- zodSchema as zodSchema18
6298
+ lazySchema as lazySchema19,
6299
+ zodSchema as zodSchema19
6284
6300
  } from "@ai-sdk/provider-utils";
6285
6301
  import { z as z19 } from "zod/v4";
6286
- var computer_20251124InputSchema = lazySchema18(
6287
- () => zodSchema18(
6302
+ var computer_20251124InputSchema = lazySchema19(
6303
+ () => zodSchema19(
6288
6304
  z19.object({
6289
6305
  action: z19.enum([
6290
6306
  "key",
@@ -6328,12 +6344,12 @@ var computer_20251124 = createProviderToolFactory7({
6328
6344
  // src/tool/memory_20250818.ts
6329
6345
  import {
6330
6346
  createProviderToolFactory as createProviderToolFactory8,
6331
- lazySchema as lazySchema19,
6332
- zodSchema as zodSchema19
6347
+ lazySchema as lazySchema20,
6348
+ zodSchema as zodSchema20
6333
6349
  } from "@ai-sdk/provider-utils";
6334
6350
  import { z as z20 } from "zod/v4";
6335
- var memory_20250818InputSchema = lazySchema19(
6336
- () => zodSchema19(
6351
+ var memory_20250818InputSchema = lazySchema20(
6352
+ () => zodSchema20(
6337
6353
  z20.discriminatedUnion("command", [
6338
6354
  z20.object({
6339
6355
  command: z20.literal("view"),
@@ -6377,12 +6393,12 @@ var memory_20250818 = createProviderToolFactory8({
6377
6393
  // src/tool/text-editor_20241022.ts
6378
6394
  import {
6379
6395
  createProviderToolFactory as createProviderToolFactory9,
6380
- lazySchema as lazySchema20,
6381
- zodSchema as zodSchema20
6396
+ lazySchema as lazySchema21,
6397
+ zodSchema as zodSchema21
6382
6398
  } from "@ai-sdk/provider-utils";
6383
6399
  import { z as z21 } from "zod/v4";
6384
- var textEditor_20241022InputSchema = lazySchema20(
6385
- () => zodSchema20(
6400
+ var textEditor_20241022InputSchema = lazySchema21(
6401
+ () => zodSchema21(
6386
6402
  z21.object({
6387
6403
  command: z21.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
6388
6404
  path: z21.string(),
@@ -6403,12 +6419,12 @@ var textEditor_20241022 = createProviderToolFactory9({
6403
6419
  // src/tool/text-editor_20250124.ts
6404
6420
  import {
6405
6421
  createProviderToolFactory as createProviderToolFactory10,
6406
- lazySchema as lazySchema21,
6407
- zodSchema as zodSchema21
6422
+ lazySchema as lazySchema22,
6423
+ zodSchema as zodSchema22
6408
6424
  } from "@ai-sdk/provider-utils";
6409
6425
  import { z as z22 } from "zod/v4";
6410
- var textEditor_20250124InputSchema = lazySchema21(
6411
- () => zodSchema21(
6426
+ var textEditor_20250124InputSchema = lazySchema22(
6427
+ () => zodSchema22(
6412
6428
  z22.object({
6413
6429
  command: z22.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
6414
6430
  path: z22.string(),
@@ -6429,12 +6445,12 @@ var textEditor_20250124 = createProviderToolFactory10({
6429
6445
  // src/tool/text-editor_20250429.ts
6430
6446
  import {
6431
6447
  createProviderToolFactory as createProviderToolFactory11,
6432
- lazySchema as lazySchema22,
6433
- zodSchema as zodSchema22
6448
+ lazySchema as lazySchema23,
6449
+ zodSchema as zodSchema23
6434
6450
  } from "@ai-sdk/provider-utils";
6435
6451
  import { z as z23 } from "zod/v4";
6436
- var textEditor_20250429InputSchema = lazySchema22(
6437
- () => zodSchema22(
6452
+ var textEditor_20250429InputSchema = lazySchema23(
6453
+ () => zodSchema23(
6438
6454
  z23.object({
6439
6455
  command: z23.enum(["view", "create", "str_replace", "insert"]),
6440
6456
  path: z23.string(),
@@ -6455,12 +6471,12 @@ var textEditor_20250429 = createProviderToolFactory11({
6455
6471
  // src/tool/tool-search-bm25_20251119.ts
6456
6472
  import {
6457
6473
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema10,
6458
- lazySchema as lazySchema23,
6459
- zodSchema as zodSchema23
6474
+ lazySchema as lazySchema24,
6475
+ zodSchema as zodSchema24
6460
6476
  } from "@ai-sdk/provider-utils";
6461
6477
  import { z as z24 } from "zod/v4";
6462
- var toolSearchBm25_20251119OutputSchema = lazySchema23(
6463
- () => zodSchema23(
6478
+ var toolSearchBm25_20251119OutputSchema = lazySchema24(
6479
+ () => zodSchema24(
6464
6480
  z24.array(
6465
6481
  z24.object({
6466
6482
  type: z24.literal("tool_reference"),
@@ -6469,8 +6485,8 @@ var toolSearchBm25_20251119OutputSchema = lazySchema23(
6469
6485
  )
6470
6486
  )
6471
6487
  );
6472
- var toolSearchBm25_20251119InputSchema = lazySchema23(
6473
- () => zodSchema23(
6488
+ var toolSearchBm25_20251119InputSchema = lazySchema24(
6489
+ () => zodSchema24(
6474
6490
  z24.object({
6475
6491
  /**
6476
6492
  * A natural language query to search for tools.