@ai-sdk/anthropic 2.0.108 → 2.0.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.110
4
+
5
+ ### Patch Changes
6
+
7
+ - a7c0108: Defer validation schema construction until first use to reduce provider import time.
8
+ - 58cb8c9: Defer construction of Anthropic provider option schemas until they are first used to reduce package import time.
9
+ - Updated dependencies [d7b0ffa]
10
+ - Updated dependencies [4146790]
11
+ - @ai-sdk/provider-utils@3.0.42
12
+
13
+ ## 2.0.109
14
+
15
+ ### Patch Changes
16
+
17
+ - 4a65dd5: feat(anthropic): add Claude Haiku 5.5 support
18
+
19
+ - add the `claude-haiku-5-5` model ID to `@ai-sdk/anthropic` and `@ai-sdk/google-vertex`, `anthropic.claude-haiku-5-5` and `us.anthropic.claude-haiku-5-5` to `@ai-sdk/amazon-bedrock`, and `anthropic/claude-haiku-5.5` to `@ai-sdk/gateway`
20
+ - recognize `claude-haiku-5-5` as a known model with a 128k max output token limit and all five effort levels; thinking can be disabled up to `high` effort, and `xhigh` and `max` are lowered to `high` with a warning when thinking is disabled
21
+ - `claude-haiku-5-5` does not support thinking token budgets: `thinking: { type: 'enabled', budgetTokens }` is converted to adaptive thinking with a warning
22
+
3
23
  ## 2.0.108
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { JSONObject, ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
2
- import { z } from 'zod/v4';
3
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
5
4
 
6
5
  /**
7
6
  * Represents a single iteration in the usage breakdown.
@@ -169,145 +168,116 @@ interface AnthropicMessageMetadata {
169
168
  } | null;
170
169
  }
171
170
 
172
- type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
171
+ type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-haiku-5-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
173
172
  /**
174
173
  * Anthropic provider options for system messages.
175
174
  */
176
- declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
177
- clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
178
- effort: z.ZodOptional<z.ZodEnum<{
179
- low: "low";
180
- medium: "medium";
181
- high: "high";
182
- xhigh: "xhigh";
183
- max: "max";
184
- }>>;
185
- toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
186
- type: z.ZodLiteral<"tool_addition">;
187
- toolName: z.ZodString;
188
- }, z.core.$strip>, z.ZodObject<{
189
- type: z.ZodLiteral<"tool_removal">;
190
- toolName: z.ZodString;
191
- }, z.core.$strip>]>>>;
192
- }, z.core.$strip>;
193
- type AnthropicSystemMessageProviderOptions = z.infer<typeof anthropicSystemMessageProviderOptions>;
194
- declare const anthropicProviderOptions: z.ZodObject<{
195
- sendReasoning: z.ZodOptional<z.ZodBoolean>;
196
- structuredOutputMode: z.ZodOptional<z.ZodEnum<{
197
- outputFormat: "outputFormat";
198
- jsonTool: "jsonTool";
199
- auto: "auto";
200
- }>>;
201
- thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
202
- type: z.ZodLiteral<"adaptive">;
203
- display: z.ZodOptional<z.ZodEnum<{
204
- omitted: "omitted";
205
- summarized: "summarized";
206
- updates: "updates";
207
- }>>;
208
- blockBinding: z.ZodOptional<z.ZodObject<{
209
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
210
- }, z.core.$strip>>;
211
- }, z.core.$strip>, z.ZodObject<{
212
- type: z.ZodLiteral<"enabled">;
213
- budgetTokens: z.ZodOptional<z.ZodNumber>;
214
- blockBinding: z.ZodOptional<z.ZodObject<{
215
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
216
- }, z.core.$strip>>;
217
- }, z.core.$strip>, z.ZodObject<{
218
- type: z.ZodLiteral<"disabled">;
219
- }, z.core.$strip>, z.ZodObject<{
220
- type: z.ZodLiteral<"between_tools">;
221
- }, z.core.$strip>, z.ZodObject<{
222
- blockBinding: z.ZodObject<{
223
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
224
- }, z.core.$strip>;
225
- }, z.core.$strip>]>>;
226
- disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
227
- cacheControl: z.ZodOptional<z.ZodObject<{
228
- type: z.ZodLiteral<"ephemeral">;
229
- ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
230
- }, z.core.$strip>>;
231
- metadata: z.ZodOptional<z.ZodObject<{
232
- userId: z.ZodOptional<z.ZodString>;
233
- }, z.core.$strip>>;
234
- container: z.ZodOptional<z.ZodObject<{
235
- id: z.ZodOptional<z.ZodString>;
236
- skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
237
- type: z.ZodUnion<readonly [z.ZodLiteral<"anthropic">, z.ZodLiteral<"custom">]>;
238
- skillId: z.ZodString;
239
- version: z.ZodOptional<z.ZodString>;
240
- }, z.core.$strip>>>;
241
- }, z.core.$strip>>;
242
- effort: z.ZodOptional<z.ZodEnum<{
243
- low: "low";
244
- medium: "medium";
245
- high: "high";
246
- xhigh: "xhigh";
247
- max: "max";
248
- }>>;
249
- taskBudget: z.ZodOptional<z.ZodObject<{
250
- type: z.ZodLiteral<"tokens">;
251
- total: z.ZodNumber;
252
- remaining: z.ZodOptional<z.ZodNumber>;
253
- }, z.core.$strip>>;
254
- speed: z.ZodOptional<z.ZodEnum<{
255
- fast: "fast";
256
- standard: "standard";
257
- }>>;
258
- inferenceGeo: z.ZodOptional<z.ZodEnum<{
259
- us: "us";
260
- global: "global";
261
- }>>;
262
- fallbacks: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"default">, z.ZodArray<z.ZodObject<{
263
- model: z.ZodString;
264
- max_tokens: z.ZodOptional<z.ZodNumber>;
265
- thinking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
- output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
267
- speed: z.ZodOptional<z.ZodEnum<{
268
- fast: "fast";
269
- standard: "standard";
270
- }>>;
271
- }, z.core.$strip>>]>>;
272
- contextManagement: z.ZodOptional<z.ZodObject<{
273
- edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
274
- type: z.ZodLiteral<"clear_tool_uses_20250919">;
275
- trigger: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
276
- type: z.ZodLiteral<"input_tokens">;
277
- value: z.ZodNumber;
278
- }, z.core.$strip>, z.ZodObject<{
279
- type: z.ZodLiteral<"tool_uses">;
280
- value: z.ZodNumber;
281
- }, z.core.$strip>]>>;
282
- keep: z.ZodOptional<z.ZodObject<{
283
- type: z.ZodLiteral<"tool_uses">;
284
- value: z.ZodNumber;
285
- }, z.core.$strip>>;
286
- clearAtLeast: z.ZodOptional<z.ZodObject<{
287
- type: z.ZodLiteral<"input_tokens">;
288
- value: z.ZodNumber;
289
- }, z.core.$strip>>;
290
- clearToolInputs: z.ZodOptional<z.ZodBoolean>;
291
- excludeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
292
- }, z.core.$strip>, z.ZodObject<{
293
- type: z.ZodLiteral<"clear_thinking_20251015">;
294
- keep: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodObject<{
295
- type: z.ZodLiteral<"thinking_turns">;
296
- value: z.ZodNumber;
297
- }, z.core.$strip>]>>;
298
- }, z.core.$strip>, z.ZodObject<{
299
- type: z.ZodLiteral<"compact_20260112">;
300
- trigger: z.ZodOptional<z.ZodObject<{
301
- type: z.ZodLiteral<"input_tokens">;
302
- value: z.ZodNumber;
303
- }, z.core.$strip>>;
304
- pauseAfterCompaction: z.ZodOptional<z.ZodBoolean>;
305
- instructions: z.ZodOptional<z.ZodString>;
306
- }, z.core.$strip>]>>;
307
- }, z.core.$strip>>;
308
- anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
309
- }, z.core.$strip>;
310
- type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
175
+ declare const anthropicSystemMessageProviderOptions: _ai_sdk_provider_utils.LazySchema<{
176
+ clearAt?: "next_user_message" | undefined;
177
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
178
+ toolChanges?: ({
179
+ type: "tool_addition";
180
+ toolName: string;
181
+ } | {
182
+ type: "tool_removal";
183
+ toolName: string;
184
+ })[] | undefined;
185
+ }>;
186
+ type AnthropicSystemMessageProviderOptions = InferValidator<typeof anthropicSystemMessageProviderOptions>;
187
+ declare const anthropicProviderOptions: _ai_sdk_provider_utils.LazySchema<{
188
+ sendReasoning?: boolean | undefined;
189
+ structuredOutputMode?: "outputFormat" | "jsonTool" | "auto" | undefined;
190
+ thinking?: {
191
+ type: "adaptive";
192
+ display?: "omitted" | "summarized" | "updates" | undefined;
193
+ blockBinding?: {
194
+ prefixMismatchBehavior: "drop_block";
195
+ } | undefined;
196
+ } | {
197
+ type: "enabled";
198
+ budgetTokens?: number | undefined;
199
+ blockBinding?: {
200
+ prefixMismatchBehavior: "drop_block";
201
+ } | undefined;
202
+ } | {
203
+ type: "disabled";
204
+ } | {
205
+ type: "between_tools";
206
+ } | {
207
+ blockBinding: {
208
+ prefixMismatchBehavior: "drop_block";
209
+ };
210
+ } | undefined;
211
+ disableParallelToolUse?: boolean | undefined;
212
+ cacheControl?: {
213
+ type: "ephemeral";
214
+ ttl?: "5m" | "1h" | undefined;
215
+ } | undefined;
216
+ metadata?: {
217
+ userId?: string | undefined;
218
+ } | undefined;
219
+ container?: {
220
+ id?: string | undefined;
221
+ skills?: {
222
+ type: "anthropic" | "custom";
223
+ skillId: string;
224
+ version?: string | undefined;
225
+ }[] | undefined;
226
+ } | undefined;
227
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
228
+ taskBudget?: {
229
+ type: "tokens";
230
+ total: number;
231
+ remaining?: number | undefined;
232
+ } | undefined;
233
+ speed?: "fast" | "standard" | undefined;
234
+ inferenceGeo?: "us" | "global" | undefined;
235
+ fallbacks?: "default" | {
236
+ model: string;
237
+ max_tokens?: number | undefined;
238
+ thinking?: Record<string, unknown> | undefined;
239
+ output_config?: Record<string, unknown> | undefined;
240
+ speed?: "fast" | "standard" | undefined;
241
+ }[] | undefined;
242
+ contextManagement?: {
243
+ edits: ({
244
+ type: "clear_tool_uses_20250919";
245
+ trigger?: {
246
+ type: "input_tokens";
247
+ value: number;
248
+ } | {
249
+ type: "tool_uses";
250
+ value: number;
251
+ } | undefined;
252
+ keep?: {
253
+ type: "tool_uses";
254
+ value: number;
255
+ } | undefined;
256
+ clearAtLeast?: {
257
+ type: "input_tokens";
258
+ value: number;
259
+ } | undefined;
260
+ clearToolInputs?: boolean | undefined;
261
+ excludeTools?: string[] | undefined;
262
+ } | {
263
+ type: "clear_thinking_20251015";
264
+ keep?: "all" | {
265
+ type: "thinking_turns";
266
+ value: number;
267
+ } | undefined;
268
+ } | {
269
+ type: "compact_20260112";
270
+ trigger?: {
271
+ type: "input_tokens";
272
+ value: number;
273
+ } | undefined;
274
+ pauseAfterCompaction?: boolean | undefined;
275
+ instructions?: string | undefined;
276
+ })[];
277
+ } | undefined;
278
+ anthropicBeta?: string[] | undefined;
279
+ }>;
280
+ type AnthropicProviderOptions = InferValidator<typeof anthropicProviderOptions>;
311
281
 
312
282
  /**
313
283
  * Member tools of the computer toolset. Each member is returned by the API as
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { JSONObject, ProviderV2, LanguageModelV2 } from '@ai-sdk/provider';
2
- import { z } from 'zod/v4';
3
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
5
4
 
6
5
  /**
7
6
  * Represents a single iteration in the usage breakdown.
@@ -169,145 +168,116 @@ interface AnthropicMessageMetadata {
169
168
  } | null;
170
169
  }
171
170
 
172
- type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
171
+ type AnthropicMessagesModelId = 'claude-3-5-haiku-20241022' | 'claude-3-5-haiku-latest' | 'claude-3-7-sonnet-20250219' | 'claude-3-7-sonnet-latest' | 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-haiku-5-5' | 'claude-opus-4-0' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-20250514' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-sonnet-5' | 'claude-sonnet-5-5' | (string & {});
173
172
  /**
174
173
  * Anthropic provider options for system messages.
175
174
  */
176
- declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
177
- clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
178
- effort: z.ZodOptional<z.ZodEnum<{
179
- low: "low";
180
- medium: "medium";
181
- high: "high";
182
- xhigh: "xhigh";
183
- max: "max";
184
- }>>;
185
- toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
186
- type: z.ZodLiteral<"tool_addition">;
187
- toolName: z.ZodString;
188
- }, z.core.$strip>, z.ZodObject<{
189
- type: z.ZodLiteral<"tool_removal">;
190
- toolName: z.ZodString;
191
- }, z.core.$strip>]>>>;
192
- }, z.core.$strip>;
193
- type AnthropicSystemMessageProviderOptions = z.infer<typeof anthropicSystemMessageProviderOptions>;
194
- declare const anthropicProviderOptions: z.ZodObject<{
195
- sendReasoning: z.ZodOptional<z.ZodBoolean>;
196
- structuredOutputMode: z.ZodOptional<z.ZodEnum<{
197
- outputFormat: "outputFormat";
198
- jsonTool: "jsonTool";
199
- auto: "auto";
200
- }>>;
201
- thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
202
- type: z.ZodLiteral<"adaptive">;
203
- display: z.ZodOptional<z.ZodEnum<{
204
- omitted: "omitted";
205
- summarized: "summarized";
206
- updates: "updates";
207
- }>>;
208
- blockBinding: z.ZodOptional<z.ZodObject<{
209
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
210
- }, z.core.$strip>>;
211
- }, z.core.$strip>, z.ZodObject<{
212
- type: z.ZodLiteral<"enabled">;
213
- budgetTokens: z.ZodOptional<z.ZodNumber>;
214
- blockBinding: z.ZodOptional<z.ZodObject<{
215
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
216
- }, z.core.$strip>>;
217
- }, z.core.$strip>, z.ZodObject<{
218
- type: z.ZodLiteral<"disabled">;
219
- }, z.core.$strip>, z.ZodObject<{
220
- type: z.ZodLiteral<"between_tools">;
221
- }, z.core.$strip>, z.ZodObject<{
222
- blockBinding: z.ZodObject<{
223
- prefixMismatchBehavior: z.ZodLiteral<"drop_block">;
224
- }, z.core.$strip>;
225
- }, z.core.$strip>]>>;
226
- disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
227
- cacheControl: z.ZodOptional<z.ZodObject<{
228
- type: z.ZodLiteral<"ephemeral">;
229
- ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
230
- }, z.core.$strip>>;
231
- metadata: z.ZodOptional<z.ZodObject<{
232
- userId: z.ZodOptional<z.ZodString>;
233
- }, z.core.$strip>>;
234
- container: z.ZodOptional<z.ZodObject<{
235
- id: z.ZodOptional<z.ZodString>;
236
- skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
237
- type: z.ZodUnion<readonly [z.ZodLiteral<"anthropic">, z.ZodLiteral<"custom">]>;
238
- skillId: z.ZodString;
239
- version: z.ZodOptional<z.ZodString>;
240
- }, z.core.$strip>>>;
241
- }, z.core.$strip>>;
242
- effort: z.ZodOptional<z.ZodEnum<{
243
- low: "low";
244
- medium: "medium";
245
- high: "high";
246
- xhigh: "xhigh";
247
- max: "max";
248
- }>>;
249
- taskBudget: z.ZodOptional<z.ZodObject<{
250
- type: z.ZodLiteral<"tokens">;
251
- total: z.ZodNumber;
252
- remaining: z.ZodOptional<z.ZodNumber>;
253
- }, z.core.$strip>>;
254
- speed: z.ZodOptional<z.ZodEnum<{
255
- fast: "fast";
256
- standard: "standard";
257
- }>>;
258
- inferenceGeo: z.ZodOptional<z.ZodEnum<{
259
- us: "us";
260
- global: "global";
261
- }>>;
262
- fallbacks: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"default">, z.ZodArray<z.ZodObject<{
263
- model: z.ZodString;
264
- max_tokens: z.ZodOptional<z.ZodNumber>;
265
- thinking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
- output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
267
- speed: z.ZodOptional<z.ZodEnum<{
268
- fast: "fast";
269
- standard: "standard";
270
- }>>;
271
- }, z.core.$strip>>]>>;
272
- contextManagement: z.ZodOptional<z.ZodObject<{
273
- edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
274
- type: z.ZodLiteral<"clear_tool_uses_20250919">;
275
- trigger: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
276
- type: z.ZodLiteral<"input_tokens">;
277
- value: z.ZodNumber;
278
- }, z.core.$strip>, z.ZodObject<{
279
- type: z.ZodLiteral<"tool_uses">;
280
- value: z.ZodNumber;
281
- }, z.core.$strip>]>>;
282
- keep: z.ZodOptional<z.ZodObject<{
283
- type: z.ZodLiteral<"tool_uses">;
284
- value: z.ZodNumber;
285
- }, z.core.$strip>>;
286
- clearAtLeast: z.ZodOptional<z.ZodObject<{
287
- type: z.ZodLiteral<"input_tokens">;
288
- value: z.ZodNumber;
289
- }, z.core.$strip>>;
290
- clearToolInputs: z.ZodOptional<z.ZodBoolean>;
291
- excludeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
292
- }, z.core.$strip>, z.ZodObject<{
293
- type: z.ZodLiteral<"clear_thinking_20251015">;
294
- keep: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodObject<{
295
- type: z.ZodLiteral<"thinking_turns">;
296
- value: z.ZodNumber;
297
- }, z.core.$strip>]>>;
298
- }, z.core.$strip>, z.ZodObject<{
299
- type: z.ZodLiteral<"compact_20260112">;
300
- trigger: z.ZodOptional<z.ZodObject<{
301
- type: z.ZodLiteral<"input_tokens">;
302
- value: z.ZodNumber;
303
- }, z.core.$strip>>;
304
- pauseAfterCompaction: z.ZodOptional<z.ZodBoolean>;
305
- instructions: z.ZodOptional<z.ZodString>;
306
- }, z.core.$strip>]>>;
307
- }, z.core.$strip>>;
308
- anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
309
- }, z.core.$strip>;
310
- type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
175
+ declare const anthropicSystemMessageProviderOptions: _ai_sdk_provider_utils.LazySchema<{
176
+ clearAt?: "next_user_message" | undefined;
177
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
178
+ toolChanges?: ({
179
+ type: "tool_addition";
180
+ toolName: string;
181
+ } | {
182
+ type: "tool_removal";
183
+ toolName: string;
184
+ })[] | undefined;
185
+ }>;
186
+ type AnthropicSystemMessageProviderOptions = InferValidator<typeof anthropicSystemMessageProviderOptions>;
187
+ declare const anthropicProviderOptions: _ai_sdk_provider_utils.LazySchema<{
188
+ sendReasoning?: boolean | undefined;
189
+ structuredOutputMode?: "outputFormat" | "jsonTool" | "auto" | undefined;
190
+ thinking?: {
191
+ type: "adaptive";
192
+ display?: "omitted" | "summarized" | "updates" | undefined;
193
+ blockBinding?: {
194
+ prefixMismatchBehavior: "drop_block";
195
+ } | undefined;
196
+ } | {
197
+ type: "enabled";
198
+ budgetTokens?: number | undefined;
199
+ blockBinding?: {
200
+ prefixMismatchBehavior: "drop_block";
201
+ } | undefined;
202
+ } | {
203
+ type: "disabled";
204
+ } | {
205
+ type: "between_tools";
206
+ } | {
207
+ blockBinding: {
208
+ prefixMismatchBehavior: "drop_block";
209
+ };
210
+ } | undefined;
211
+ disableParallelToolUse?: boolean | undefined;
212
+ cacheControl?: {
213
+ type: "ephemeral";
214
+ ttl?: "5m" | "1h" | undefined;
215
+ } | undefined;
216
+ metadata?: {
217
+ userId?: string | undefined;
218
+ } | undefined;
219
+ container?: {
220
+ id?: string | undefined;
221
+ skills?: {
222
+ type: "anthropic" | "custom";
223
+ skillId: string;
224
+ version?: string | undefined;
225
+ }[] | undefined;
226
+ } | undefined;
227
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
228
+ taskBudget?: {
229
+ type: "tokens";
230
+ total: number;
231
+ remaining?: number | undefined;
232
+ } | undefined;
233
+ speed?: "fast" | "standard" | undefined;
234
+ inferenceGeo?: "us" | "global" | undefined;
235
+ fallbacks?: "default" | {
236
+ model: string;
237
+ max_tokens?: number | undefined;
238
+ thinking?: Record<string, unknown> | undefined;
239
+ output_config?: Record<string, unknown> | undefined;
240
+ speed?: "fast" | "standard" | undefined;
241
+ }[] | undefined;
242
+ contextManagement?: {
243
+ edits: ({
244
+ type: "clear_tool_uses_20250919";
245
+ trigger?: {
246
+ type: "input_tokens";
247
+ value: number;
248
+ } | {
249
+ type: "tool_uses";
250
+ value: number;
251
+ } | undefined;
252
+ keep?: {
253
+ type: "tool_uses";
254
+ value: number;
255
+ } | undefined;
256
+ clearAtLeast?: {
257
+ type: "input_tokens";
258
+ value: number;
259
+ } | undefined;
260
+ clearToolInputs?: boolean | undefined;
261
+ excludeTools?: string[] | undefined;
262
+ } | {
263
+ type: "clear_thinking_20251015";
264
+ keep?: "all" | {
265
+ type: "thinking_turns";
266
+ value: number;
267
+ } | undefined;
268
+ } | {
269
+ type: "compact_20260112";
270
+ trigger?: {
271
+ type: "input_tokens";
272
+ value: number;
273
+ } | undefined;
274
+ pauseAfterCompaction?: boolean | undefined;
275
+ instructions?: string | undefined;
276
+ })[];
277
+ } | undefined;
278
+ anthropicBeta?: string[] | undefined;
279
+ }>;
280
+ type AnthropicProviderOptions = InferValidator<typeof anthropicProviderOptions>;
311
281
 
312
282
  /**
313
283
  * Member tools of the computer toolset. Each member is returned by the API as