@ai-sdk/anthropic 3.0.134 → 3.0.136

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,22 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.136
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [28252da]
8
+ - @ai-sdk/provider-utils@4.0.63
9
+
10
+ ## 3.0.135
11
+
12
+ ### Patch Changes
13
+
14
+ - 2223bf2: Defer validation schema construction until first use to reduce provider import time.
15
+ - e172400: Defer construction of Anthropic provider option schemas until they are first used to reduce package import time.
16
+ - Updated dependencies [1183cc4]
17
+ - Updated dependencies [d726591]
18
+ - @ai-sdk/provider-utils@4.0.62
19
+
3
20
  ## 3.0.134
4
21
 
5
22
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { JSONObject, ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
2
2
  import { z } from 'zod/v4';
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { FetchFunction } from '@ai-sdk/provider-utils';
4
+ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- declare const anthropicSafeguardResultSchema: z.ZodObject<{
6
+ declare const anthropicSafeguardResultSchema: () => z.ZodObject<{
7
7
  type: z.ZodString;
8
8
  status: z.ZodObject<{
9
9
  type: z.ZodString;
@@ -14,7 +14,7 @@ declare const anthropicSafeguardResultSchema: z.ZodObject<{
14
14
  }, z.core.$strip>>>>;
15
15
  }, z.core.$strip>;
16
16
  }, z.core.$strip>;
17
- type AnthropicSafeguardResult = z.infer<typeof anthropicSafeguardResultSchema>;
17
+ type AnthropicSafeguardResult = z.infer<ReturnType<typeof anthropicSafeguardResultSchema>>;
18
18
 
19
19
  /**
20
20
  * Represents a single iteration in the usage breakdown.
@@ -224,159 +224,124 @@ type AnthropicMessagesModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20
224
224
  /**
225
225
  * Anthropic provider options for system messages.
226
226
  */
227
- declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
228
- clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
229
- effort: z.ZodOptional<z.ZodEnum<{
230
- low: "low";
231
- medium: "medium";
232
- high: "high";
233
- xhigh: "xhigh";
234
- max: "max";
235
- }>>;
236
- toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
237
- type: z.ZodLiteral<"tool_addition">;
238
- toolName: z.ZodString;
239
- }, z.core.$strip>, z.ZodObject<{
240
- type: z.ZodLiteral<"tool_removal">;
241
- toolName: z.ZodString;
242
- }, z.core.$strip>]>>>;
243
- }, z.core.$strip>;
244
- type AnthropicSystemMessageProviderOptions = z.infer<typeof anthropicSystemMessageProviderOptions>;
245
- declare const anthropicLanguageModelOptions: z.ZodObject<{
246
- sendReasoning: z.ZodOptional<z.ZodBoolean>;
247
- structuredOutputMode: z.ZodOptional<z.ZodEnum<{
248
- auto: "auto";
249
- outputFormat: "outputFormat";
250
- jsonTool: "jsonTool";
251
- }>>;
252
- thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
253
- type: z.ZodLiteral<"adaptive">;
254
- display: z.ZodOptional<z.ZodEnum<{
255
- omitted: "omitted";
256
- summarized: "summarized";
257
- updates: "updates";
258
- }>>;
259
- blockBinding: z.ZodOptional<z.ZodObject<{
260
- prefixMismatchBehavior: z.ZodEnum<{
261
- error: "error";
262
- drop_block: "drop_block";
263
- }>;
264
- }, z.core.$strip>>;
265
- }, z.core.$strip>, z.ZodObject<{
266
- type: z.ZodLiteral<"enabled">;
267
- budgetTokens: z.ZodOptional<z.ZodNumber>;
268
- }, z.core.$strip>, z.ZodObject<{
269
- type: z.ZodLiteral<"disabled">;
270
- }, z.core.$strip>, z.ZodObject<{
271
- type: z.ZodLiteral<"between_tools">;
272
- }, z.core.$strip>]>, z.ZodObject<{
273
- blockBinding: z.ZodObject<{
274
- prefixMismatchBehavior: z.ZodEnum<{
275
- error: "error";
276
- drop_block: "drop_block";
277
- }>;
278
- }, z.core.$strip>;
279
- }, z.core.$strip>]>>;
280
- disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
281
- cacheControl: z.ZodOptional<z.ZodObject<{
282
- type: z.ZodLiteral<"ephemeral">;
283
- ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
284
- }, z.core.$strip>>;
285
- metadata: z.ZodOptional<z.ZodObject<{
286
- userId: z.ZodOptional<z.ZodString>;
287
- }, z.core.$strip>>;
288
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
289
- type: z.ZodLiteral<"url">;
290
- name: z.ZodString;
291
- url: z.ZodString;
292
- authorizationToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
- toolConfiguration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
294
- enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
295
- allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
296
- }, z.core.$strip>>>;
297
- }, z.core.$strip>>>;
298
- container: z.ZodOptional<z.ZodObject<{
299
- id: z.ZodOptional<z.ZodString>;
300
- skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
- type: z.ZodUnion<readonly [z.ZodLiteral<"anthropic">, z.ZodLiteral<"custom">]>;
302
- skillId: z.ZodString;
303
- version: z.ZodOptional<z.ZodString>;
304
- }, z.core.$strip>>>;
305
- }, z.core.$strip>>;
306
- toolStreaming: z.ZodOptional<z.ZodBoolean>;
307
- effort: z.ZodOptional<z.ZodEnum<{
308
- low: "low";
309
- medium: "medium";
310
- high: "high";
311
- xhigh: "xhigh";
312
- max: "max";
313
- }>>;
314
- taskBudget: z.ZodOptional<z.ZodObject<{
315
- type: z.ZodLiteral<"tokens">;
316
- total: z.ZodNumber;
317
- remaining: z.ZodOptional<z.ZodNumber>;
318
- }, z.core.$strip>>;
319
- speed: z.ZodOptional<z.ZodEnum<{
320
- fast: "fast";
321
- standard: "standard";
322
- }>>;
323
- inferenceGeo: z.ZodOptional<z.ZodEnum<{
324
- us: "us";
325
- global: "global";
326
- }>>;
327
- fallbacks: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"default">, z.ZodArray<z.ZodObject<{
328
- model: z.ZodString;
329
- max_tokens: z.ZodOptional<z.ZodNumber>;
330
- thinking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
331
- output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
332
- speed: z.ZodOptional<z.ZodEnum<{
333
- fast: "fast";
334
- standard: "standard";
335
- }>>;
336
- }, z.core.$strip>>]>>;
337
- anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
338
- safeguards: z.ZodOptional<z.ZodArray<z.ZodObject<{
339
- type: z.ZodLiteral<"dangerous_tool_use">;
340
- classifierContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
341
- }, z.core.$strip>>>;
342
- contextManagement: z.ZodOptional<z.ZodObject<{
343
- edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
344
- type: z.ZodLiteral<"clear_tool_uses_20250919">;
345
- trigger: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
346
- type: z.ZodLiteral<"input_tokens">;
347
- value: z.ZodNumber;
348
- }, z.core.$strip>, z.ZodObject<{
349
- type: z.ZodLiteral<"tool_uses">;
350
- value: z.ZodNumber;
351
- }, z.core.$strip>]>>;
352
- keep: z.ZodOptional<z.ZodObject<{
353
- type: z.ZodLiteral<"tool_uses">;
354
- value: z.ZodNumber;
355
- }, z.core.$strip>>;
356
- clearAtLeast: z.ZodOptional<z.ZodObject<{
357
- type: z.ZodLiteral<"input_tokens">;
358
- value: z.ZodNumber;
359
- }, z.core.$strip>>;
360
- clearToolInputs: z.ZodOptional<z.ZodBoolean>;
361
- excludeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
362
- }, z.core.$strip>, z.ZodObject<{
363
- type: z.ZodLiteral<"clear_thinking_20251015">;
364
- keep: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodObject<{
365
- type: z.ZodLiteral<"thinking_turns">;
366
- value: z.ZodNumber;
367
- }, z.core.$strip>]>>;
368
- }, z.core.$strip>, z.ZodObject<{
369
- type: z.ZodLiteral<"compact_20260112">;
370
- trigger: z.ZodOptional<z.ZodObject<{
371
- type: z.ZodLiteral<"input_tokens">;
372
- value: z.ZodNumber;
373
- }, z.core.$strip>>;
374
- pauseAfterCompaction: z.ZodOptional<z.ZodBoolean>;
375
- instructions: z.ZodOptional<z.ZodString>;
376
- }, z.core.$strip>]>>;
377
- }, z.core.$strip>>;
378
- }, z.core.$strip>;
379
- type AnthropicLanguageModelOptions = z.infer<typeof anthropicLanguageModelOptions>;
227
+ declare const anthropicSystemMessageProviderOptions: _ai_sdk_provider_utils.LazySchema<{
228
+ clearAt?: "next_user_message" | undefined;
229
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
230
+ toolChanges?: ({
231
+ type: "tool_addition";
232
+ toolName: string;
233
+ } | {
234
+ type: "tool_removal";
235
+ toolName: string;
236
+ })[] | undefined;
237
+ }>;
238
+ type AnthropicSystemMessageProviderOptions = InferSchema<typeof anthropicSystemMessageProviderOptions>;
239
+ declare const anthropicLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
240
+ sendReasoning?: boolean | undefined;
241
+ structuredOutputMode?: "auto" | "outputFormat" | "jsonTool" | undefined;
242
+ thinking?: {
243
+ type: "adaptive";
244
+ display?: "omitted" | "summarized" | "updates" | undefined;
245
+ blockBinding?: {
246
+ prefixMismatchBehavior: "error" | "drop_block";
247
+ } | undefined;
248
+ } | {
249
+ type: "enabled";
250
+ budgetTokens?: number | undefined;
251
+ } | {
252
+ type: "disabled";
253
+ } | {
254
+ type: "between_tools";
255
+ } | {
256
+ blockBinding: {
257
+ prefixMismatchBehavior: "error" | "drop_block";
258
+ };
259
+ } | undefined;
260
+ disableParallelToolUse?: boolean | undefined;
261
+ cacheControl?: {
262
+ type: "ephemeral";
263
+ ttl?: "5m" | "1h" | undefined;
264
+ } | undefined;
265
+ metadata?: {
266
+ userId?: string | undefined;
267
+ } | undefined;
268
+ mcpServers?: {
269
+ type: "url";
270
+ name: string;
271
+ url: string;
272
+ authorizationToken?: string | null | undefined;
273
+ toolConfiguration?: {
274
+ enabled?: boolean | null | undefined;
275
+ allowedTools?: string[] | null | undefined;
276
+ } | null | undefined;
277
+ }[] | undefined;
278
+ container?: {
279
+ id?: string | undefined;
280
+ skills?: {
281
+ type: "custom" | "anthropic";
282
+ skillId: string;
283
+ version?: string | undefined;
284
+ }[] | undefined;
285
+ } | undefined;
286
+ toolStreaming?: boolean | undefined;
287
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
288
+ taskBudget?: {
289
+ type: "tokens";
290
+ total: number;
291
+ remaining?: number | undefined;
292
+ } | undefined;
293
+ speed?: "fast" | "standard" | undefined;
294
+ inferenceGeo?: "us" | "global" | undefined;
295
+ fallbacks?: "default" | {
296
+ model: string;
297
+ max_tokens?: number | undefined;
298
+ thinking?: Record<string, unknown> | undefined;
299
+ output_config?: Record<string, unknown> | undefined;
300
+ speed?: "fast" | "standard" | undefined;
301
+ }[] | undefined;
302
+ anthropicBeta?: string[] | undefined;
303
+ safeguards?: {
304
+ type: "dangerous_tool_use";
305
+ classifierContext?: Record<string, unknown> | undefined;
306
+ }[] | undefined;
307
+ contextManagement?: {
308
+ edits: ({
309
+ type: "clear_tool_uses_20250919";
310
+ trigger?: {
311
+ type: "input_tokens";
312
+ value: number;
313
+ } | {
314
+ type: "tool_uses";
315
+ value: number;
316
+ } | undefined;
317
+ keep?: {
318
+ type: "tool_uses";
319
+ value: number;
320
+ } | undefined;
321
+ clearAtLeast?: {
322
+ type: "input_tokens";
323
+ value: number;
324
+ } | undefined;
325
+ clearToolInputs?: boolean | undefined;
326
+ excludeTools?: string[] | undefined;
327
+ } | {
328
+ type: "clear_thinking_20251015";
329
+ keep?: "all" | {
330
+ type: "thinking_turns";
331
+ value: number;
332
+ } | undefined;
333
+ } | {
334
+ type: "compact_20260112";
335
+ trigger?: {
336
+ type: "input_tokens";
337
+ value: number;
338
+ } | undefined;
339
+ pauseAfterCompaction?: boolean | undefined;
340
+ instructions?: string | undefined;
341
+ })[];
342
+ } | undefined;
343
+ }>;
344
+ type AnthropicLanguageModelOptions = InferSchema<typeof anthropicLanguageModelOptions>;
380
345
 
381
346
  interface AnthropicToolOptions {
382
347
  deferLoading?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { JSONObject, ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
2
2
  import { z } from 'zod/v4';
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { FetchFunction } from '@ai-sdk/provider-utils';
4
+ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- declare const anthropicSafeguardResultSchema: z.ZodObject<{
6
+ declare const anthropicSafeguardResultSchema: () => z.ZodObject<{
7
7
  type: z.ZodString;
8
8
  status: z.ZodObject<{
9
9
  type: z.ZodString;
@@ -14,7 +14,7 @@ declare const anthropicSafeguardResultSchema: z.ZodObject<{
14
14
  }, z.core.$strip>>>>;
15
15
  }, z.core.$strip>;
16
16
  }, z.core.$strip>;
17
- type AnthropicSafeguardResult = z.infer<typeof anthropicSafeguardResultSchema>;
17
+ type AnthropicSafeguardResult = z.infer<ReturnType<typeof anthropicSafeguardResultSchema>>;
18
18
 
19
19
  /**
20
20
  * Represents a single iteration in the usage breakdown.
@@ -224,159 +224,124 @@ type AnthropicMessagesModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20
224
224
  /**
225
225
  * Anthropic provider options for system messages.
226
226
  */
227
- declare const anthropicSystemMessageProviderOptions: z.ZodObject<{
228
- clearAt: z.ZodOptional<z.ZodLiteral<"next_user_message">>;
229
- effort: z.ZodOptional<z.ZodEnum<{
230
- low: "low";
231
- medium: "medium";
232
- high: "high";
233
- xhigh: "xhigh";
234
- max: "max";
235
- }>>;
236
- toolChanges: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
237
- type: z.ZodLiteral<"tool_addition">;
238
- toolName: z.ZodString;
239
- }, z.core.$strip>, z.ZodObject<{
240
- type: z.ZodLiteral<"tool_removal">;
241
- toolName: z.ZodString;
242
- }, z.core.$strip>]>>>;
243
- }, z.core.$strip>;
244
- type AnthropicSystemMessageProviderOptions = z.infer<typeof anthropicSystemMessageProviderOptions>;
245
- declare const anthropicLanguageModelOptions: z.ZodObject<{
246
- sendReasoning: z.ZodOptional<z.ZodBoolean>;
247
- structuredOutputMode: z.ZodOptional<z.ZodEnum<{
248
- auto: "auto";
249
- outputFormat: "outputFormat";
250
- jsonTool: "jsonTool";
251
- }>>;
252
- thinking: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
253
- type: z.ZodLiteral<"adaptive">;
254
- display: z.ZodOptional<z.ZodEnum<{
255
- omitted: "omitted";
256
- summarized: "summarized";
257
- updates: "updates";
258
- }>>;
259
- blockBinding: z.ZodOptional<z.ZodObject<{
260
- prefixMismatchBehavior: z.ZodEnum<{
261
- error: "error";
262
- drop_block: "drop_block";
263
- }>;
264
- }, z.core.$strip>>;
265
- }, z.core.$strip>, z.ZodObject<{
266
- type: z.ZodLiteral<"enabled">;
267
- budgetTokens: z.ZodOptional<z.ZodNumber>;
268
- }, z.core.$strip>, z.ZodObject<{
269
- type: z.ZodLiteral<"disabled">;
270
- }, z.core.$strip>, z.ZodObject<{
271
- type: z.ZodLiteral<"between_tools">;
272
- }, z.core.$strip>]>, z.ZodObject<{
273
- blockBinding: z.ZodObject<{
274
- prefixMismatchBehavior: z.ZodEnum<{
275
- error: "error";
276
- drop_block: "drop_block";
277
- }>;
278
- }, z.core.$strip>;
279
- }, z.core.$strip>]>>;
280
- disableParallelToolUse: z.ZodOptional<z.ZodBoolean>;
281
- cacheControl: z.ZodOptional<z.ZodObject<{
282
- type: z.ZodLiteral<"ephemeral">;
283
- ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"5m">, z.ZodLiteral<"1h">]>>;
284
- }, z.core.$strip>>;
285
- metadata: z.ZodOptional<z.ZodObject<{
286
- userId: z.ZodOptional<z.ZodString>;
287
- }, z.core.$strip>>;
288
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
289
- type: z.ZodLiteral<"url">;
290
- name: z.ZodString;
291
- url: z.ZodString;
292
- authorizationToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
- toolConfiguration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
294
- enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
295
- allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
296
- }, z.core.$strip>>>;
297
- }, z.core.$strip>>>;
298
- container: z.ZodOptional<z.ZodObject<{
299
- id: z.ZodOptional<z.ZodString>;
300
- skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
- type: z.ZodUnion<readonly [z.ZodLiteral<"anthropic">, z.ZodLiteral<"custom">]>;
302
- skillId: z.ZodString;
303
- version: z.ZodOptional<z.ZodString>;
304
- }, z.core.$strip>>>;
305
- }, z.core.$strip>>;
306
- toolStreaming: z.ZodOptional<z.ZodBoolean>;
307
- effort: z.ZodOptional<z.ZodEnum<{
308
- low: "low";
309
- medium: "medium";
310
- high: "high";
311
- xhigh: "xhigh";
312
- max: "max";
313
- }>>;
314
- taskBudget: z.ZodOptional<z.ZodObject<{
315
- type: z.ZodLiteral<"tokens">;
316
- total: z.ZodNumber;
317
- remaining: z.ZodOptional<z.ZodNumber>;
318
- }, z.core.$strip>>;
319
- speed: z.ZodOptional<z.ZodEnum<{
320
- fast: "fast";
321
- standard: "standard";
322
- }>>;
323
- inferenceGeo: z.ZodOptional<z.ZodEnum<{
324
- us: "us";
325
- global: "global";
326
- }>>;
327
- fallbacks: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"default">, z.ZodArray<z.ZodObject<{
328
- model: z.ZodString;
329
- max_tokens: z.ZodOptional<z.ZodNumber>;
330
- thinking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
331
- output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
332
- speed: z.ZodOptional<z.ZodEnum<{
333
- fast: "fast";
334
- standard: "standard";
335
- }>>;
336
- }, z.core.$strip>>]>>;
337
- anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
338
- safeguards: z.ZodOptional<z.ZodArray<z.ZodObject<{
339
- type: z.ZodLiteral<"dangerous_tool_use">;
340
- classifierContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
341
- }, z.core.$strip>>>;
342
- contextManagement: z.ZodOptional<z.ZodObject<{
343
- edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
344
- type: z.ZodLiteral<"clear_tool_uses_20250919">;
345
- trigger: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
346
- type: z.ZodLiteral<"input_tokens">;
347
- value: z.ZodNumber;
348
- }, z.core.$strip>, z.ZodObject<{
349
- type: z.ZodLiteral<"tool_uses">;
350
- value: z.ZodNumber;
351
- }, z.core.$strip>]>>;
352
- keep: z.ZodOptional<z.ZodObject<{
353
- type: z.ZodLiteral<"tool_uses">;
354
- value: z.ZodNumber;
355
- }, z.core.$strip>>;
356
- clearAtLeast: z.ZodOptional<z.ZodObject<{
357
- type: z.ZodLiteral<"input_tokens">;
358
- value: z.ZodNumber;
359
- }, z.core.$strip>>;
360
- clearToolInputs: z.ZodOptional<z.ZodBoolean>;
361
- excludeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
362
- }, z.core.$strip>, z.ZodObject<{
363
- type: z.ZodLiteral<"clear_thinking_20251015">;
364
- keep: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodObject<{
365
- type: z.ZodLiteral<"thinking_turns">;
366
- value: z.ZodNumber;
367
- }, z.core.$strip>]>>;
368
- }, z.core.$strip>, z.ZodObject<{
369
- type: z.ZodLiteral<"compact_20260112">;
370
- trigger: z.ZodOptional<z.ZodObject<{
371
- type: z.ZodLiteral<"input_tokens">;
372
- value: z.ZodNumber;
373
- }, z.core.$strip>>;
374
- pauseAfterCompaction: z.ZodOptional<z.ZodBoolean>;
375
- instructions: z.ZodOptional<z.ZodString>;
376
- }, z.core.$strip>]>>;
377
- }, z.core.$strip>>;
378
- }, z.core.$strip>;
379
- type AnthropicLanguageModelOptions = z.infer<typeof anthropicLanguageModelOptions>;
227
+ declare const anthropicSystemMessageProviderOptions: _ai_sdk_provider_utils.LazySchema<{
228
+ clearAt?: "next_user_message" | undefined;
229
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
230
+ toolChanges?: ({
231
+ type: "tool_addition";
232
+ toolName: string;
233
+ } | {
234
+ type: "tool_removal";
235
+ toolName: string;
236
+ })[] | undefined;
237
+ }>;
238
+ type AnthropicSystemMessageProviderOptions = InferSchema<typeof anthropicSystemMessageProviderOptions>;
239
+ declare const anthropicLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
240
+ sendReasoning?: boolean | undefined;
241
+ structuredOutputMode?: "auto" | "outputFormat" | "jsonTool" | undefined;
242
+ thinking?: {
243
+ type: "adaptive";
244
+ display?: "omitted" | "summarized" | "updates" | undefined;
245
+ blockBinding?: {
246
+ prefixMismatchBehavior: "error" | "drop_block";
247
+ } | undefined;
248
+ } | {
249
+ type: "enabled";
250
+ budgetTokens?: number | undefined;
251
+ } | {
252
+ type: "disabled";
253
+ } | {
254
+ type: "between_tools";
255
+ } | {
256
+ blockBinding: {
257
+ prefixMismatchBehavior: "error" | "drop_block";
258
+ };
259
+ } | undefined;
260
+ disableParallelToolUse?: boolean | undefined;
261
+ cacheControl?: {
262
+ type: "ephemeral";
263
+ ttl?: "5m" | "1h" | undefined;
264
+ } | undefined;
265
+ metadata?: {
266
+ userId?: string | undefined;
267
+ } | undefined;
268
+ mcpServers?: {
269
+ type: "url";
270
+ name: string;
271
+ url: string;
272
+ authorizationToken?: string | null | undefined;
273
+ toolConfiguration?: {
274
+ enabled?: boolean | null | undefined;
275
+ allowedTools?: string[] | null | undefined;
276
+ } | null | undefined;
277
+ }[] | undefined;
278
+ container?: {
279
+ id?: string | undefined;
280
+ skills?: {
281
+ type: "custom" | "anthropic";
282
+ skillId: string;
283
+ version?: string | undefined;
284
+ }[] | undefined;
285
+ } | undefined;
286
+ toolStreaming?: boolean | undefined;
287
+ effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
288
+ taskBudget?: {
289
+ type: "tokens";
290
+ total: number;
291
+ remaining?: number | undefined;
292
+ } | undefined;
293
+ speed?: "fast" | "standard" | undefined;
294
+ inferenceGeo?: "us" | "global" | undefined;
295
+ fallbacks?: "default" | {
296
+ model: string;
297
+ max_tokens?: number | undefined;
298
+ thinking?: Record<string, unknown> | undefined;
299
+ output_config?: Record<string, unknown> | undefined;
300
+ speed?: "fast" | "standard" | undefined;
301
+ }[] | undefined;
302
+ anthropicBeta?: string[] | undefined;
303
+ safeguards?: {
304
+ type: "dangerous_tool_use";
305
+ classifierContext?: Record<string, unknown> | undefined;
306
+ }[] | undefined;
307
+ contextManagement?: {
308
+ edits: ({
309
+ type: "clear_tool_uses_20250919";
310
+ trigger?: {
311
+ type: "input_tokens";
312
+ value: number;
313
+ } | {
314
+ type: "tool_uses";
315
+ value: number;
316
+ } | undefined;
317
+ keep?: {
318
+ type: "tool_uses";
319
+ value: number;
320
+ } | undefined;
321
+ clearAtLeast?: {
322
+ type: "input_tokens";
323
+ value: number;
324
+ } | undefined;
325
+ clearToolInputs?: boolean | undefined;
326
+ excludeTools?: string[] | undefined;
327
+ } | {
328
+ type: "clear_thinking_20251015";
329
+ keep?: "all" | {
330
+ type: "thinking_turns";
331
+ value: number;
332
+ } | undefined;
333
+ } | {
334
+ type: "compact_20260112";
335
+ trigger?: {
336
+ type: "input_tokens";
337
+ value: number;
338
+ } | undefined;
339
+ pauseAfterCompaction?: boolean | undefined;
340
+ instructions?: string | undefined;
341
+ })[];
342
+ } | undefined;
343
+ }>;
344
+ type AnthropicLanguageModelOptions = InferSchema<typeof anthropicLanguageModelOptions>;
380
345
 
381
346
  interface AnthropicToolOptions {
382
347
  deferLoading?: boolean;