@tanstack/ai-anthropic 0.18.2 → 0.18.4
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/esm/model-meta.d.ts +23 -1
- package/dist/esm/model-meta.js +24 -1
- package/dist/esm/model-meta.js.map +1 -1
- package/package.json +3 -3
- package/src/model-meta.ts +45 -0
package/dist/esm/model-meta.d.ts
CHANGED
|
@@ -262,7 +262,26 @@ declare const CLAUDE_OPUS_5_FAST: {
|
|
|
262
262
|
};
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
|
-
|
|
265
|
+
declare const CLAUDE_FABLE_5_1: {
|
|
266
|
+
readonly name: "claude-fable-5-1";
|
|
267
|
+
readonly id: "claude-fable-5-1";
|
|
268
|
+
readonly context_window: 1000000;
|
|
269
|
+
readonly max_output_tokens: 128000;
|
|
270
|
+
readonly supports: {
|
|
271
|
+
readonly input: ["text", "image", "document"];
|
|
272
|
+
readonly tools: [];
|
|
273
|
+
};
|
|
274
|
+
readonly pricing: {
|
|
275
|
+
readonly input: {
|
|
276
|
+
readonly normal: 10;
|
|
277
|
+
readonly cached: 0.25;
|
|
278
|
+
};
|
|
279
|
+
readonly output: {
|
|
280
|
+
readonly normal: 50;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
export declare const ANTHROPIC_MODELS: readonly ["claude-fable-5-1", "claude-opus-5", "claude-opus-5-fast", "claude-opus-4-6", "claude-opus-4-5", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-haiku-4-5", "claude-opus-4-1", "claude-opus-4-7", "claude-opus-4-8", "claude-fable-5", "claude-sonnet-5"];
|
|
266
285
|
/**
|
|
267
286
|
* Claude chat models on Vertex AI / Gemini Enterprise Agent Platform.
|
|
268
287
|
* This list is the Google partner catalog, not the full Anthropic API catalog.
|
|
@@ -334,6 +353,7 @@ export type AnthropicChatModelProviderOptionsByName = {
|
|
|
334
353
|
[CLAUDE_SONNET_5.id]: AnthropicCacheControlOptions & AnthropicContainerOptions & AnthropicContextManagementOptions & AnthropicMCPOptions & AnthropicServiceTierOptions & AnthropicStopSequencesOptions & AnthropicAdaptiveOrDisabledThinkingOptions & AnthropicToolChoiceOptions & AnthropicMaxTokensOptions & AnthropicOutputConfigOptions;
|
|
335
354
|
[CLAUDE_OPUS_5.id]: AnthropicContainerOptions & AnthropicContextManagementOptions & AnthropicMCPOptions & AnthropicServiceTierOptions & AnthropicStopSequencesOptions & AnthropicThinkingOptions & AnthropicToolChoiceOptions & AnthropicSamplingOptions;
|
|
336
355
|
[CLAUDE_OPUS_5_FAST.id]: AnthropicContainerOptions & AnthropicContextManagementOptions & AnthropicMCPOptions & AnthropicServiceTierOptions & AnthropicStopSequencesOptions & AnthropicThinkingOptions & AnthropicToolChoiceOptions & AnthropicSamplingOptions;
|
|
356
|
+
[CLAUDE_FABLE_5_1.id]: AnthropicCacheControlOptions & AnthropicContainerOptions & AnthropicContextManagementOptions & AnthropicMCPOptions & AnthropicServiceTierOptions & AnthropicStopSequencesOptions & AnthropicAdaptiveOnlyThinkingOptions & AnthropicToolChoiceOptions & AnthropicMaxTokensOptions & AnthropicOutputConfigOptions;
|
|
337
357
|
};
|
|
338
358
|
export type AnthropicChatModelToolCapabilitiesByName = {
|
|
339
359
|
[CLAUDE_OPUS_4_6.id]: typeof CLAUDE_OPUS_4_6.supports.tools;
|
|
@@ -348,6 +368,7 @@ export type AnthropicChatModelToolCapabilitiesByName = {
|
|
|
348
368
|
[CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.tools;
|
|
349
369
|
[CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.tools;
|
|
350
370
|
[CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.tools;
|
|
371
|
+
[CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.tools;
|
|
351
372
|
};
|
|
352
373
|
/**
|
|
353
374
|
* Type-only map from chat model name to its supported input modalities.
|
|
@@ -373,5 +394,6 @@ export type AnthropicModelInputModalitiesByName = {
|
|
|
373
394
|
[CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.input;
|
|
374
395
|
[CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.input;
|
|
375
396
|
[CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.input;
|
|
397
|
+
[CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.input;
|
|
376
398
|
};
|
|
377
399
|
export {};
|
package/dist/esm/model-meta.js
CHANGED
|
@@ -354,7 +354,29 @@ var CLAUDE_OPUS_5_FAST = {
|
|
|
354
354
|
output: { normal: 50 }
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
+
var CLAUDE_FABLE_5_1 = {
|
|
358
|
+
name: "claude-fable-5-1",
|
|
359
|
+
id: "claude-fable-5-1",
|
|
360
|
+
context_window: 1e6,
|
|
361
|
+
max_output_tokens: 128e3,
|
|
362
|
+
supports: {
|
|
363
|
+
input: [
|
|
364
|
+
"text",
|
|
365
|
+
"image",
|
|
366
|
+
"document"
|
|
367
|
+
],
|
|
368
|
+
tools: []
|
|
369
|
+
},
|
|
370
|
+
pricing: {
|
|
371
|
+
input: {
|
|
372
|
+
normal: 10,
|
|
373
|
+
cached: .25
|
|
374
|
+
},
|
|
375
|
+
output: { normal: 50 }
|
|
376
|
+
}
|
|
377
|
+
};
|
|
357
378
|
var ANTHROPIC_MODELS = [
|
|
379
|
+
CLAUDE_FABLE_5_1.id,
|
|
358
380
|
CLAUDE_OPUS_5.id,
|
|
359
381
|
CLAUDE_OPUS_5_FAST.id,
|
|
360
382
|
CLAUDE_OPUS_4_6.id,
|
|
@@ -421,7 +443,8 @@ var ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS = {
|
|
|
421
443
|
[CLAUDE_FABLE_5.id]: CLAUDE_FABLE_5.max_output_tokens,
|
|
422
444
|
[CLAUDE_SONNET_5.id]: CLAUDE_SONNET_5.max_output_tokens,
|
|
423
445
|
[CLAUDE_OPUS_5.id]: CLAUDE_OPUS_5.max_output_tokens,
|
|
424
|
-
[CLAUDE_OPUS_5_FAST.id]: CLAUDE_OPUS_5_FAST.max_output_tokens
|
|
446
|
+
[CLAUDE_OPUS_5_FAST.id]: CLAUDE_OPUS_5_FAST.max_output_tokens,
|
|
447
|
+
[CLAUDE_FABLE_5_1.id]: CLAUDE_FABLE_5_1.max_output_tokens
|
|
425
448
|
};
|
|
426
449
|
/**
|
|
427
450
|
* Largest `max_tokens` the Anthropic SDK permits on a **non-streaming**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-meta.js","names":[],"sources":["../../src/model-meta.ts"],"sourcesContent":["import type {\n AnthropicAdaptiveOnlyThinkingOptions,\n AnthropicAdaptiveOrDisabledThinkingOptions,\n AnthropicAdaptiveThinkingOptions,\n AnthropicCacheControlOptions,\n AnthropicContainerOptions,\n AnthropicContextManagementOptions,\n AnthropicMCPOptions,\n AnthropicMaxTokensOptions,\n AnthropicOutputConfigOptions,\n AnthropicSamplingOptions,\n AnthropicServiceTierOptions,\n AnthropicStopSequencesOptions,\n AnthropicThinkingOptions,\n AnthropicToolChoiceOptions,\n} from './text/text-provider-options'\n\ninterface ModelMeta<\n TProviderOptions = unknown,\n TToolCapabilities = unknown,\n TMessageCapabilities = unknown,\n> {\n name: string\n id: string\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'video' | 'document'>\n extended_thinking?: boolean\n adaptive_thinking?: boolean\n priority_tier?: boolean\n tools?: Array<\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'computer_use'\n | 'bash'\n | 'text_editor'\n | 'memory'\n >\n }\n context_window?: number\n max_output_tokens?: number\n knowledge_cutoff?: string\n pricing: {\n input: {\n normal: number\n cached?: number\n }\n output: {\n normal: number\n }\n }\n /**\n * Type-level description of which provider options this model supports.\n */\n providerOptions?: TProviderOptions\n /**\n * Type-level description of which tool capabilities this model supports.\n */\n toolCapabilities?: TToolCapabilities\n /**\n * Type-level description of which message/input capabilities this model supports.\n */\n messageCapabilities?: TMessageCapabilities\n}\n\n// Claude Opus 4.6 accepts adaptive thinking alongside the deprecated\n// budget-based extended thinking, and still accepts sampling parameters.\nconst CLAUDE_OPUS_4_6 = {\n name: 'claude-opus-4-6',\n id: 'claude-opus-4-6',\n context_window: 200_000,\n max_output_tokens: 128_000,\n knowledge_cutoff: '2025-05-01',\n pricing: {\n input: {\n normal: 5,\n },\n output: {\n normal: 25,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_4_5 = {\n name: 'claude-opus-4-5',\n id: 'claude-opus-4-5',\n context_window: 200_000,\n max_output_tokens: 32_000,\n knowledge_cutoff: '2025-11-01',\n pricing: {\n input: {\n normal: 15,\n },\n output: {\n normal: 75,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\n// Claude Sonnet 4.6 accepts adaptive thinking alongside the deprecated\n// budget-based extended thinking, and still accepts sampling parameters.\nconst CLAUDE_SONNET_4_6 = {\n name: 'claude-sonnet-4-6',\n id: 'claude-sonnet-4-6',\n context_window: 1_000_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-08-01',\n pricing: {\n input: {\n normal: 3,\n },\n output: {\n normal: 15,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_SONNET_4_5 = {\n name: 'claude-sonnet-4-5',\n id: 'claude-sonnet-4-5',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-09-29',\n pricing: {\n input: {\n normal: 3,\n },\n output: {\n normal: 15,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_HAIKU_4_5 = {\n name: 'claude-haiku-4-5',\n id: 'claude-haiku-4-5',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-10-01',\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 5,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_4_1 = {\n name: 'claude-opus-4-1',\n id: 'claude-opus-4-1',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-08-05',\n pricing: {\n input: {\n normal: 15,\n },\n output: {\n normal: 75,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\n// Claude Opus 4.7 removed budget-based extended thinking and the sampling\n// parameters (`temperature`, `top_p`, `top_k`) — sending either returns a\n// 400. Use adaptive thinking with `output_config.effort` instead.\nconst CLAUDE_OPUS_4_7 = {\n name: 'claude-opus-4-7',\n id: 'claude-opus-4-7',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Opus 4.8 keeps the same request surface as Opus 4.7: adaptive\n// thinking only (budget_tokens 400s), no sampling parameters.\nconst CLAUDE_OPUS_4_8 = {\n name: 'claude-opus-4-8',\n id: 'claude-opus-4-8',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Fable 5: thinking is always on — the only accepted explicit\n// `thinking` config is `{type: 'adaptive'}` (disabled/budget_tokens 400),\n// and the sampling parameters (`temperature`, `top_p`, `top_k`) are\n// rejected. Its provider options therefore use the adaptive-only thinking\n// shape and `max_tokens` without the sampling knobs.\nconst CLAUDE_FABLE_5 = {\n name: 'claude-fable-5',\n id: 'claude-fable-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 10,\n cached: 1,\n },\n output: {\n normal: 50,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Sonnet 5: adaptive thinking is the default (omitting `thinking`\n// runs adaptive); `{type: 'disabled'}` opts out, but the manual\n// `{type: 'enabled', budget_tokens}` shape and non-default sampling\n// parameters (`temperature`, `top_p`, `top_k`) are rejected with a 400.\n// Pricing below is the sticker $3/$15 per MTok (an introductory $2/$10\n// applies through 2026-08-31).\nconst CLAUDE_SONNET_5 = {\n name: 'claude-sonnet-5',\n id: 'claude-sonnet-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 3,\n cached: 0.3,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n/**\n * Model ids accepted by the Anthropic text adapter.\n *\n * Every id here resolves against the first-party Anthropic API\n * (`GET /v1/models/{id}`). Retired models (Claude 3.x, Sonnet 3.7,\n * Opus 4 / Sonnet 4) and the `-fast` variant ids (fast mode is requested\n * via the `speed` parameter, not a model id) were removed after Anthropic\n * turned them off.\n */\nconst CLAUDE_OPUS_5 = {\n name: 'claude-opus-5',\n id: 'claude-opus-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n tools: [],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_5_FAST = {\n name: 'claude-opus-5-fast',\n id: 'claude-opus-5-fast',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n tools: [],\n },\n pricing: {\n input: {\n normal: 10,\n cached: 1,\n },\n output: {\n normal: 50,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nexport const ANTHROPIC_MODELS = [\n CLAUDE_OPUS_5.id,\n CLAUDE_OPUS_5_FAST.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_OPUS_4_5.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_HAIKU_4_5.id,\n CLAUDE_OPUS_4_1.id,\n\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_8.id,\n\n CLAUDE_FABLE_5.id,\n CLAUDE_SONNET_5.id,\n] as const\n\n/**\n * Claude chat models on Vertex AI / Gemini Enterprise Agent Platform.\n * This list is the Google partner catalog, not the full Anthropic API catalog.\n * Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models\n */\nexport const ANTHROPIC_VERTEX_CHAT_MODELS = [\n CLAUDE_OPUS_5.id,\n CLAUDE_SONNET_5.id,\n CLAUDE_FABLE_5.id,\n CLAUDE_OPUS_4_8.id,\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_OPUS_4_5.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_OPUS_4_1.id,\n CLAUDE_HAIKU_4_5.id,\n] as const\n\nexport type AnthropicVertexChatModel =\n (typeof ANTHROPIC_VERTEX_CHAT_MODELS)[number]\n\n/**\n * Fallback `max_tokens` ceiling for a model whose metadata carries no\n * `max_output_tokens` (e.g. an unrecognized model id). Anthropic's Messages\n * API *requires* `max_tokens`, so the adapter must always send a value. 64K is\n * the output ceiling of the current mainstream Claude tier (Sonnet/Haiku 4.5),\n * so it's a sane default for an unknown — almost certainly modern — model and\n * avoids silently truncating long generations (issue #849). Recognized models\n * use their exact `max_output_tokens` from {@link ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS}\n * (e.g. 128K for Opus), so this fallback only ever applies to ids not in the\n * map.\n */\nexport const ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS = 64_000\n\n/**\n * Runtime lookup of each model's maximum output-token ceiling, keyed by model\n * id. Lets the text adapter default the required `max_tokens` request field to\n * the model's real ceiling when the caller doesn't specify one, rather than a\n * low constant that truncates responses mid-stream (issue #849).\n *\n * Kept in sync with {@link ANTHROPIC_MODELS} by `scripts/sync-provider-models.ts`\n * — when that script adds a model it also inserts the model's `max_output_tokens`\n * here, so a freshly-synced model resolves to its real ceiling rather than the\n * fallback above.\n */\nconst ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {\n [CLAUDE_OPUS_4_6.id]: CLAUDE_OPUS_4_6.max_output_tokens,\n [CLAUDE_OPUS_4_5.id]: CLAUDE_OPUS_4_5.max_output_tokens,\n [CLAUDE_SONNET_4_6.id]: CLAUDE_SONNET_4_6.max_output_tokens,\n [CLAUDE_SONNET_4_5.id]: CLAUDE_SONNET_4_5.max_output_tokens,\n [CLAUDE_HAIKU_4_5.id]: CLAUDE_HAIKU_4_5.max_output_tokens,\n [CLAUDE_OPUS_4_1.id]: CLAUDE_OPUS_4_1.max_output_tokens,\n [CLAUDE_OPUS_4_7.id]: CLAUDE_OPUS_4_7.max_output_tokens,\n [CLAUDE_OPUS_4_8.id]: CLAUDE_OPUS_4_8.max_output_tokens,\n [CLAUDE_FABLE_5.id]: CLAUDE_FABLE_5.max_output_tokens,\n [CLAUDE_SONNET_5.id]: CLAUDE_SONNET_5.max_output_tokens,\n [CLAUDE_OPUS_5.id]: CLAUDE_OPUS_5.max_output_tokens,\n [CLAUDE_OPUS_5_FAST.id]: CLAUDE_OPUS_5_FAST.max_output_tokens,\n}\n\n/**\n * Largest `max_tokens` the Anthropic SDK permits on a **non-streaming**\n * request. The SDK refuses to make a non-streaming call it estimates could\n * exceed its 10-minute timeout, computed as\n * `(60min * max_tokens) / 128_000 > 10min` — i.e. it throws\n * `\"Streaming is required for operations that may take longer than 10 minutes\"`\n * once `max_tokens > 128_000 * 10 / 60 ≈ 21_333`\n * (`@anthropic-ai/sdk`'s `calculateNonstreamingTimeout`). The text adapter's\n * only non-streaming call is the forced-tool `structuredOutput()` request, so\n * its defaulted ceiling must stay at or below this; the streaming chat path\n * keeps the model's full {@link getAnthropicDefaultMaxTokens} ceiling. We sit\n * just under the boundary (`21_333` would round-trip to exactly 10min). This\n * caps only the *default* — an explicit oversized `max_tokens` from the caller\n * still surfaces the SDK's \"use streaming\" error, which is the correct signal.\n */\nexport const ANTHROPIC_MAX_NONSTREAMING_TOKENS = 21_000\n\n/**\n * Resolve the default `max_tokens` for a model: its known `max_output_tokens`\n * ceiling, or {@link ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS} for unknown models.\n * Callers that pass an explicit `max_tokens` bypass this entirely.\n *\n * Pass `stream: false` for non-streaming requests (the `structuredOutput()`\n * path): the result is then clamped to {@link ANTHROPIC_MAX_NONSTREAMING_TOKENS}\n * so the defaulted ceiling doesn't trip the SDK's non-streaming 10-minute guard\n * (issue #849). Streaming requests (the default) are unaffected and get the\n * model's full ceiling.\n */\nexport function getAnthropicDefaultMaxTokens(\n model: string,\n { stream = true }: { stream?: boolean } = {},\n): number {\n const ceiling =\n ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS[model] ??\n ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS\n return stream ? ceiling : Math.min(ceiling, ANTHROPIC_MAX_NONSTREAMING_TOKENS)\n}\n\n/**\n * Anthropic models that support combining `tools` + JSON-Schema-constrained\n * output in a single streaming Messages request (per issue #605). GA'd\n * 2026-01-29 for Claude 4.5+ via `output_format` on the beta messages\n * endpoint. Older Claude models still need the forced-tool-use workaround\n * in `structuredOutput`.\n */\nexport const ANTHROPIC_COMBINED_TOOLS_AND_SCHEMA_MODELS = new Set<string>([\n CLAUDE_OPUS_4_5.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_8.id,\n CLAUDE_FABLE_5.id,\n CLAUDE_SONNET_5.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_HAIKU_4_5.id,\n])\n\n// const ANTHROPIC_IMAGE_MODELS = [] as const\n// const ANTHROPIC_EMBEDDING_MODELS = [] as const\n// const ANTHROPIC_AUDIO_MODELS = [] as const\n// const ANTHROPIC_VIDEO_MODELS = [] as const\n\nexport type AnthropicChatModel = (typeof ANTHROPIC_MODELS)[number]\n// Manual type map for per-model provider options\n// Models are differentiated by which thinking shapes and sampling\n// parameters the API accepts.\nexport type AnthropicChatModelProviderOptionsByName = {\n // 4.6 generation: adaptive thinking plus the deprecated budget-based\n // shape; sampling parameters still accepted.\n [CLAUDE_OPUS_4_6.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_SONNET_4_6.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n\n // Pre-4.6 models: budget-based extended thinking and sampling parameters.\n [CLAUDE_OPUS_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_SONNET_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_HAIKU_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_OPUS_4_1.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n\n // Opus 4.7/4.8: adaptive thinking (or explicit disable), no\n // budget_tokens, no sampling parameters — see the constants above.\n [CLAUDE_OPUS_4_7.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n [CLAUDE_OPUS_4_8.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n\n // Claude Fable 5: thinking always on (adaptive-only config); sampling\n // parameters removed — see the CLAUDE_FABLE_5 constant above.\n [CLAUDE_FABLE_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n // Claude Sonnet 5: adaptive thinking by default, explicit disable\n // allowed; no budget_tokens, no sampling parameters — see the\n // CLAUDE_SONNET_5 constant above.\n [CLAUDE_SONNET_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n [CLAUDE_OPUS_5.id]: AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_OPUS_5_FAST.id]: AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n}\n\nexport type AnthropicChatModelToolCapabilitiesByName = {\n [CLAUDE_OPUS_4_6.id]: typeof CLAUDE_OPUS_4_6.supports.tools\n [CLAUDE_OPUS_4_5.id]: typeof CLAUDE_OPUS_4_5.supports.tools\n [CLAUDE_SONNET_4_6.id]: typeof CLAUDE_SONNET_4_6.supports.tools\n [CLAUDE_SONNET_4_5.id]: typeof CLAUDE_SONNET_4_5.supports.tools\n [CLAUDE_HAIKU_4_5.id]: typeof CLAUDE_HAIKU_4_5.supports.tools\n [CLAUDE_OPUS_4_1.id]: typeof CLAUDE_OPUS_4_1.supports.tools\n [CLAUDE_OPUS_4_7.id]: typeof CLAUDE_OPUS_4_7.supports.tools\n [CLAUDE_OPUS_4_8.id]: typeof CLAUDE_OPUS_4_8.supports.tools\n [CLAUDE_FABLE_5.id]: typeof CLAUDE_FABLE_5.supports.tools\n [CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.tools\n [CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.tools\n [CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.tools\n}\n\n/**\n * Type-only map from chat model name to its supported input modalities.\n * All Anthropic Claude models support text, image, and document (PDF) input.\n * Used by the core AI types to constrain ContentPart types based on the selected model.\n * Note: These must be inlined as readonly arrays (not typeof) because the model\n * constants are not exported and typeof references don't work in .d.ts files\n * when consumed by external packages.\n *\n * @see https://docs.anthropic.com/claude/docs/vision\n * @see https://docs.anthropic.com/claude/docs/pdf-support\n */\nexport type AnthropicModelInputModalitiesByName = {\n [CLAUDE_OPUS_4_6.id]: typeof CLAUDE_OPUS_4_6.supports.input\n [CLAUDE_OPUS_4_5.id]: typeof CLAUDE_OPUS_4_5.supports.input\n [CLAUDE_SONNET_4_6.id]: typeof CLAUDE_SONNET_4_6.supports.input\n [CLAUDE_SONNET_4_5.id]: typeof CLAUDE_SONNET_4_5.supports.input\n [CLAUDE_HAIKU_4_5.id]: typeof CLAUDE_HAIKU_4_5.supports.input\n [CLAUDE_OPUS_4_1.id]: typeof CLAUDE_OPUS_4_1.supports.input\n [CLAUDE_OPUS_4_7.id]: typeof CLAUDE_OPUS_4_7.supports.input\n [CLAUDE_OPUS_4_8.id]: typeof CLAUDE_OPUS_4_8.supports.input\n [CLAUDE_FABLE_5.id]: typeof CLAUDE_FABLE_5.supports.input\n [CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.input\n [CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.input\n [CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.input\n}\n"],"mappings":";AAmEA,IAAM,kBAAkB;CACtB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,EACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAYA,IAAM,kBAAkB;CACtB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,GACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mBAAmB;EACnB,eAAe;EACf,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAcA,IAAM,oBAAoB;CACxB,MAAM;CACN,IA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AAgB,6BACd,OACA,EAAE,SAAS,SAA+B,CAAC,GACnC;CACR,MAAM,UACJ,kCAAkC,UAAA;CAEpC,OAAO,SAAS,UAAU,KAAK,IAAI,SAAS,iCAAiC;AAC/E;;;;;;;;AASA,IAAa,6DAA6C,IAAI,IAAY;CACxE,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;AACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"model-meta.js","names":[],"sources":["../../src/model-meta.ts"],"sourcesContent":["import type {\n AnthropicAdaptiveOnlyThinkingOptions,\n AnthropicAdaptiveOrDisabledThinkingOptions,\n AnthropicAdaptiveThinkingOptions,\n AnthropicCacheControlOptions,\n AnthropicContainerOptions,\n AnthropicContextManagementOptions,\n AnthropicMCPOptions,\n AnthropicMaxTokensOptions,\n AnthropicOutputConfigOptions,\n AnthropicSamplingOptions,\n AnthropicServiceTierOptions,\n AnthropicStopSequencesOptions,\n AnthropicThinkingOptions,\n AnthropicToolChoiceOptions,\n} from './text/text-provider-options'\n\ninterface ModelMeta<\n TProviderOptions = unknown,\n TToolCapabilities = unknown,\n TMessageCapabilities = unknown,\n> {\n name: string\n id: string\n supports: {\n input: Array<'text' | 'image' | 'audio' | 'video' | 'document'>\n extended_thinking?: boolean\n adaptive_thinking?: boolean\n priority_tier?: boolean\n tools?: Array<\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'computer_use'\n | 'bash'\n | 'text_editor'\n | 'memory'\n >\n }\n context_window?: number\n max_output_tokens?: number\n knowledge_cutoff?: string\n pricing: {\n input: {\n normal: number\n cached?: number\n }\n output: {\n normal: number\n }\n }\n /**\n * Type-level description of which provider options this model supports.\n */\n providerOptions?: TProviderOptions\n /**\n * Type-level description of which tool capabilities this model supports.\n */\n toolCapabilities?: TToolCapabilities\n /**\n * Type-level description of which message/input capabilities this model supports.\n */\n messageCapabilities?: TMessageCapabilities\n}\n\n// Claude Opus 4.6 accepts adaptive thinking alongside the deprecated\n// budget-based extended thinking, and still accepts sampling parameters.\nconst CLAUDE_OPUS_4_6 = {\n name: 'claude-opus-4-6',\n id: 'claude-opus-4-6',\n context_window: 200_000,\n max_output_tokens: 128_000,\n knowledge_cutoff: '2025-05-01',\n pricing: {\n input: {\n normal: 5,\n },\n output: {\n normal: 25,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_4_5 = {\n name: 'claude-opus-4-5',\n id: 'claude-opus-4-5',\n context_window: 200_000,\n max_output_tokens: 32_000,\n knowledge_cutoff: '2025-11-01',\n pricing: {\n input: {\n normal: 15,\n },\n output: {\n normal: 75,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\n// Claude Sonnet 4.6 accepts adaptive thinking alongside the deprecated\n// budget-based extended thinking, and still accepts sampling parameters.\nconst CLAUDE_SONNET_4_6 = {\n name: 'claude-sonnet-4-6',\n id: 'claude-sonnet-4-6',\n context_window: 1_000_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-08-01',\n pricing: {\n input: {\n normal: 3,\n },\n output: {\n normal: 15,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_SONNET_4_5 = {\n name: 'claude-sonnet-4-5',\n id: 'claude-sonnet-4-5',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-09-29',\n pricing: {\n input: {\n normal: 3,\n },\n output: {\n normal: 15,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_HAIKU_4_5 = {\n name: 'claude-haiku-4-5',\n id: 'claude-haiku-4-5',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-10-01',\n pricing: {\n input: {\n normal: 1,\n },\n output: {\n normal: 5,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_4_1 = {\n name: 'claude-opus-4-1',\n id: 'claude-opus-4-1',\n context_window: 200_000,\n max_output_tokens: 64_000,\n knowledge_cutoff: '2025-08-05',\n pricing: {\n input: {\n normal: 15,\n },\n output: {\n normal: 75,\n },\n },\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\n// Claude Opus 4.7 removed budget-based extended thinking and the sampling\n// parameters (`temperature`, `top_p`, `top_k`) — sending either returns a\n// 400. Use adaptive thinking with `output_config.effort` instead.\nconst CLAUDE_OPUS_4_7 = {\n name: 'claude-opus-4-7',\n id: 'claude-opus-4-7',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Opus 4.8 keeps the same request surface as Opus 4.7: adaptive\n// thinking only (budget_tokens 400s), no sampling parameters.\nconst CLAUDE_OPUS_4_8 = {\n name: 'claude-opus-4-8',\n id: 'claude-opus-4-8',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Fable 5: thinking is always on — the only accepted explicit\n// `thinking` config is `{type: 'adaptive'}` (disabled/budget_tokens 400),\n// and the sampling parameters (`temperature`, `top_p`, `top_k`) are\n// rejected. Its provider options therefore use the adaptive-only thinking\n// shape and `max_tokens` without the sampling knobs.\nconst CLAUDE_FABLE_5 = {\n name: 'claude-fable-5',\n id: 'claude-fable-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 10,\n cached: 1,\n },\n output: {\n normal: 50,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n// Claude Sonnet 5: adaptive thinking is the default (omitting `thinking`\n// runs adaptive); `{type: 'disabled'}` opts out, but the manual\n// `{type: 'enabled', budget_tokens}` shape and non-default sampling\n// parameters (`temperature`, `top_p`, `top_k`) are rejected with a 400.\n// Pricing below is the sticker $3/$15 per MTok (an introductory $2/$10\n// applies through 2026-08-31).\nconst CLAUDE_SONNET_5 = {\n name: 'claude-sonnet-5',\n id: 'claude-sonnet-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n extended_thinking: false,\n adaptive_thinking: true,\n priority_tier: true,\n tools: [\n 'web_search',\n 'web_fetch',\n 'code_execution',\n 'computer_use',\n 'bash',\n 'text_editor',\n 'memory',\n ],\n },\n pricing: {\n input: {\n normal: 3,\n cached: 0.3,\n },\n output: {\n normal: 15,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\n/**\n * Model ids accepted by the Anthropic text adapter.\n *\n * Every id here resolves against the first-party Anthropic API\n * (`GET /v1/models/{id}`). Retired models (Claude 3.x, Sonnet 3.7,\n * Opus 4 / Sonnet 4) and the `-fast` variant ids (fast mode is requested\n * via the `speed` parameter, not a model id) were removed after Anthropic\n * turned them off.\n */\nconst CLAUDE_OPUS_5 = {\n name: 'claude-opus-5',\n id: 'claude-opus-5',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n tools: [],\n },\n pricing: {\n input: {\n normal: 5,\n cached: 0.5,\n },\n output: {\n normal: 25,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_OPUS_5_FAST = {\n name: 'claude-opus-5-fast',\n id: 'claude-opus-5-fast',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n tools: [],\n },\n pricing: {\n input: {\n normal: 10,\n cached: 1,\n },\n output: {\n normal: 50,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n>\n\nconst CLAUDE_FABLE_5_1 = {\n name: 'claude-fable-5-1',\n id: 'claude-fable-5-1',\n context_window: 1_000_000,\n max_output_tokens: 128_000,\n supports: {\n input: ['text', 'image', 'document'],\n tools: [],\n },\n pricing: {\n input: {\n normal: 10,\n cached: 0.25,\n },\n output: {\n normal: 50,\n },\n },\n} as const satisfies ModelMeta<\n AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n>\n\nexport const ANTHROPIC_MODELS = [\n CLAUDE_FABLE_5_1.id,\n CLAUDE_OPUS_5.id,\n CLAUDE_OPUS_5_FAST.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_OPUS_4_5.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_HAIKU_4_5.id,\n CLAUDE_OPUS_4_1.id,\n\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_8.id,\n\n CLAUDE_FABLE_5.id,\n CLAUDE_SONNET_5.id,\n] as const\n\n/**\n * Claude chat models on Vertex AI / Gemini Enterprise Agent Platform.\n * This list is the Google partner catalog, not the full Anthropic API catalog.\n * Source: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models\n */\nexport const ANTHROPIC_VERTEX_CHAT_MODELS = [\n CLAUDE_OPUS_5.id,\n CLAUDE_SONNET_5.id,\n CLAUDE_FABLE_5.id,\n CLAUDE_OPUS_4_8.id,\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_OPUS_4_5.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_OPUS_4_1.id,\n CLAUDE_HAIKU_4_5.id,\n] as const\n\nexport type AnthropicVertexChatModel =\n (typeof ANTHROPIC_VERTEX_CHAT_MODELS)[number]\n\n/**\n * Fallback `max_tokens` ceiling for a model whose metadata carries no\n * `max_output_tokens` (e.g. an unrecognized model id). Anthropic's Messages\n * API *requires* `max_tokens`, so the adapter must always send a value. 64K is\n * the output ceiling of the current mainstream Claude tier (Sonnet/Haiku 4.5),\n * so it's a sane default for an unknown — almost certainly modern — model and\n * avoids silently truncating long generations (issue #849). Recognized models\n * use their exact `max_output_tokens` from {@link ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS}\n * (e.g. 128K for Opus), so this fallback only ever applies to ids not in the\n * map.\n */\nexport const ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS = 64_000\n\n/**\n * Runtime lookup of each model's maximum output-token ceiling, keyed by model\n * id. Lets the text adapter default the required `max_tokens` request field to\n * the model's real ceiling when the caller doesn't specify one, rather than a\n * low constant that truncates responses mid-stream (issue #849).\n *\n * Kept in sync with {@link ANTHROPIC_MODELS} by `scripts/sync-provider-models.ts`\n * — when that script adds a model it also inserts the model's `max_output_tokens`\n * here, so a freshly-synced model resolves to its real ceiling rather than the\n * fallback above.\n */\nconst ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {\n [CLAUDE_OPUS_4_6.id]: CLAUDE_OPUS_4_6.max_output_tokens,\n [CLAUDE_OPUS_4_5.id]: CLAUDE_OPUS_4_5.max_output_tokens,\n [CLAUDE_SONNET_4_6.id]: CLAUDE_SONNET_4_6.max_output_tokens,\n [CLAUDE_SONNET_4_5.id]: CLAUDE_SONNET_4_5.max_output_tokens,\n [CLAUDE_HAIKU_4_5.id]: CLAUDE_HAIKU_4_5.max_output_tokens,\n [CLAUDE_OPUS_4_1.id]: CLAUDE_OPUS_4_1.max_output_tokens,\n [CLAUDE_OPUS_4_7.id]: CLAUDE_OPUS_4_7.max_output_tokens,\n [CLAUDE_OPUS_4_8.id]: CLAUDE_OPUS_4_8.max_output_tokens,\n [CLAUDE_FABLE_5.id]: CLAUDE_FABLE_5.max_output_tokens,\n [CLAUDE_SONNET_5.id]: CLAUDE_SONNET_5.max_output_tokens,\n [CLAUDE_OPUS_5.id]: CLAUDE_OPUS_5.max_output_tokens,\n [CLAUDE_OPUS_5_FAST.id]: CLAUDE_OPUS_5_FAST.max_output_tokens,\n [CLAUDE_FABLE_5_1.id]: CLAUDE_FABLE_5_1.max_output_tokens,\n}\n\n/**\n * Largest `max_tokens` the Anthropic SDK permits on a **non-streaming**\n * request. The SDK refuses to make a non-streaming call it estimates could\n * exceed its 10-minute timeout, computed as\n * `(60min * max_tokens) / 128_000 > 10min` — i.e. it throws\n * `\"Streaming is required for operations that may take longer than 10 minutes\"`\n * once `max_tokens > 128_000 * 10 / 60 ≈ 21_333`\n * (`@anthropic-ai/sdk`'s `calculateNonstreamingTimeout`). The text adapter's\n * only non-streaming call is the forced-tool `structuredOutput()` request, so\n * its defaulted ceiling must stay at or below this; the streaming chat path\n * keeps the model's full {@link getAnthropicDefaultMaxTokens} ceiling. We sit\n * just under the boundary (`21_333` would round-trip to exactly 10min). This\n * caps only the *default* — an explicit oversized `max_tokens` from the caller\n * still surfaces the SDK's \"use streaming\" error, which is the correct signal.\n */\nexport const ANTHROPIC_MAX_NONSTREAMING_TOKENS = 21_000\n\n/**\n * Resolve the default `max_tokens` for a model: its known `max_output_tokens`\n * ceiling, or {@link ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS} for unknown models.\n * Callers that pass an explicit `max_tokens` bypass this entirely.\n *\n * Pass `stream: false` for non-streaming requests (the `structuredOutput()`\n * path): the result is then clamped to {@link ANTHROPIC_MAX_NONSTREAMING_TOKENS}\n * so the defaulted ceiling doesn't trip the SDK's non-streaming 10-minute guard\n * (issue #849). Streaming requests (the default) are unaffected and get the\n * model's full ceiling.\n */\nexport function getAnthropicDefaultMaxTokens(\n model: string,\n { stream = true }: { stream?: boolean } = {},\n): number {\n const ceiling =\n ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS[model] ??\n ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS\n return stream ? ceiling : Math.min(ceiling, ANTHROPIC_MAX_NONSTREAMING_TOKENS)\n}\n\n/**\n * Anthropic models that support combining `tools` + JSON-Schema-constrained\n * output in a single streaming Messages request (per issue #605). GA'd\n * 2026-01-29 for Claude 4.5+ via `output_format` on the beta messages\n * endpoint. Older Claude models still need the forced-tool-use workaround\n * in `structuredOutput`.\n */\nexport const ANTHROPIC_COMBINED_TOOLS_AND_SCHEMA_MODELS = new Set<string>([\n CLAUDE_OPUS_4_5.id,\n CLAUDE_OPUS_4_6.id,\n CLAUDE_OPUS_4_7.id,\n CLAUDE_OPUS_4_8.id,\n CLAUDE_FABLE_5.id,\n CLAUDE_SONNET_5.id,\n CLAUDE_SONNET_4_5.id,\n CLAUDE_SONNET_4_6.id,\n CLAUDE_HAIKU_4_5.id,\n])\n\n// const ANTHROPIC_IMAGE_MODELS = [] as const\n// const ANTHROPIC_EMBEDDING_MODELS = [] as const\n// const ANTHROPIC_AUDIO_MODELS = [] as const\n// const ANTHROPIC_VIDEO_MODELS = [] as const\n\nexport type AnthropicChatModel = (typeof ANTHROPIC_MODELS)[number]\n// Manual type map for per-model provider options\n// Models are differentiated by which thinking shapes and sampling\n// parameters the API accepts.\nexport type AnthropicChatModelProviderOptionsByName = {\n // 4.6 generation: adaptive thinking plus the deprecated budget-based\n // shape; sampling parameters still accepted.\n [CLAUDE_OPUS_4_6.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_SONNET_4_6.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n\n // Pre-4.6 models: budget-based extended thinking and sampling parameters.\n [CLAUDE_OPUS_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_SONNET_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_HAIKU_4_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_OPUS_4_1.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n\n // Opus 4.7/4.8: adaptive thinking (or explicit disable), no\n // budget_tokens, no sampling parameters — see the constants above.\n [CLAUDE_OPUS_4_7.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n [CLAUDE_OPUS_4_8.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n\n // Claude Fable 5: thinking always on (adaptive-only config); sampling\n // parameters removed — see the CLAUDE_FABLE_5 constant above.\n [CLAUDE_FABLE_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n // Claude Sonnet 5: adaptive thinking by default, explicit disable\n // allowed; no budget_tokens, no sampling parameters — see the\n // CLAUDE_SONNET_5 constant above.\n [CLAUDE_SONNET_5.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOrDisabledThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n [CLAUDE_OPUS_5.id]: AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_OPUS_5_FAST.id]: AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicSamplingOptions\n [CLAUDE_FABLE_5_1.id]: AnthropicCacheControlOptions &\n AnthropicContainerOptions &\n AnthropicContextManagementOptions &\n AnthropicMCPOptions &\n AnthropicServiceTierOptions &\n AnthropicStopSequencesOptions &\n AnthropicAdaptiveOnlyThinkingOptions &\n AnthropicToolChoiceOptions &\n AnthropicMaxTokensOptions &\n AnthropicOutputConfigOptions\n}\n\nexport type AnthropicChatModelToolCapabilitiesByName = {\n [CLAUDE_OPUS_4_6.id]: typeof CLAUDE_OPUS_4_6.supports.tools\n [CLAUDE_OPUS_4_5.id]: typeof CLAUDE_OPUS_4_5.supports.tools\n [CLAUDE_SONNET_4_6.id]: typeof CLAUDE_SONNET_4_6.supports.tools\n [CLAUDE_SONNET_4_5.id]: typeof CLAUDE_SONNET_4_5.supports.tools\n [CLAUDE_HAIKU_4_5.id]: typeof CLAUDE_HAIKU_4_5.supports.tools\n [CLAUDE_OPUS_4_1.id]: typeof CLAUDE_OPUS_4_1.supports.tools\n [CLAUDE_OPUS_4_7.id]: typeof CLAUDE_OPUS_4_7.supports.tools\n [CLAUDE_OPUS_4_8.id]: typeof CLAUDE_OPUS_4_8.supports.tools\n [CLAUDE_FABLE_5.id]: typeof CLAUDE_FABLE_5.supports.tools\n [CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.tools\n [CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.tools\n [CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.tools\n [CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.tools\n}\n\n/**\n * Type-only map from chat model name to its supported input modalities.\n * All Anthropic Claude models support text, image, and document (PDF) input.\n * Used by the core AI types to constrain ContentPart types based on the selected model.\n * Note: These must be inlined as readonly arrays (not typeof) because the model\n * constants are not exported and typeof references don't work in .d.ts files\n * when consumed by external packages.\n *\n * @see https://docs.anthropic.com/claude/docs/vision\n * @see https://docs.anthropic.com/claude/docs/pdf-support\n */\nexport type AnthropicModelInputModalitiesByName = {\n [CLAUDE_OPUS_4_6.id]: typeof CLAUDE_OPUS_4_6.supports.input\n [CLAUDE_OPUS_4_5.id]: typeof CLAUDE_OPUS_4_5.supports.input\n [CLAUDE_SONNET_4_6.id]: typeof CLAUDE_SONNET_4_6.supports.input\n [CLAUDE_SONNET_4_5.id]: typeof CLAUDE_SONNET_4_5.supports.input\n [CLAUDE_HAIKU_4_5.id]: typeof CLAUDE_HAIKU_4_5.supports.input\n [CLAUDE_OPUS_4_1.id]: typeof CLAUDE_OPUS_4_1.supports.input\n [CLAUDE_OPUS_4_7.id]: typeof CLAUDE_OPUS_4_7.supports.input\n [CLAUDE_OPUS_4_8.id]: typeof CLAUDE_OPUS_4_8.supports.input\n [CLAUDE_FABLE_5.id]: typeof CLAUDE_FABLE_5.supports.input\n [CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.input\n [CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.input\n [CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.input\n [CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.input\n}\n"],"mappings":";AAmEA,IAAM,kBAAkB;CACtB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,EACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAYA,IAAM,kBAAkB;CACtB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,GACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mBAAmB;EACnB,eAAe;EACf,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAcA,IAAM,oBAAoB;CACxB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,EACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAYA,IAAM,oBAAoB;CACxB,MAAM;CACN,IAAI;CACJ,gBAAgB;CAChB,mBAAmB;CACnB,kBAAkB;CAClB,SAAS;EACP,OAAO,EACL,QAAQ,EACV;EACA,QAAQ,EACN,QAAQ,GACV;CACF;CACA,UAAU;EACR,OAAO;GAAC;GAAQ;GAAS;EAAU;EACnC,mB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;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/ai-anthropic",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"description": "Anthropic Claude adapter for TanStack AI chat, tool calling, thinking, and structured outputs.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@anthropic-ai/vertex-sdk": "^0.19.0",
|
|
64
|
-
"@tanstack/ai": "^0.
|
|
64
|
+
"@tanstack/ai": "^0.52.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@anthropic-ai/vertex-sdk": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@anthropic-ai/vertex-sdk": "^0.19.0",
|
|
74
74
|
"@vitest/coverage-v8": "4.1.10",
|
|
75
75
|
"zod": "^4.2.0",
|
|
76
|
-
"@tanstack/ai": "0.
|
|
76
|
+
"@tanstack/ai": "0.52.1"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "vite build",
|
package/src/model-meta.ts
CHANGED
|
@@ -560,7 +560,39 @@ const CLAUDE_OPUS_5_FAST = {
|
|
|
560
560
|
AnthropicSamplingOptions
|
|
561
561
|
>
|
|
562
562
|
|
|
563
|
+
const CLAUDE_FABLE_5_1 = {
|
|
564
|
+
name: 'claude-fable-5-1',
|
|
565
|
+
id: 'claude-fable-5-1',
|
|
566
|
+
context_window: 1_000_000,
|
|
567
|
+
max_output_tokens: 128_000,
|
|
568
|
+
supports: {
|
|
569
|
+
input: ['text', 'image', 'document'],
|
|
570
|
+
tools: [],
|
|
571
|
+
},
|
|
572
|
+
pricing: {
|
|
573
|
+
input: {
|
|
574
|
+
normal: 10,
|
|
575
|
+
cached: 0.25,
|
|
576
|
+
},
|
|
577
|
+
output: {
|
|
578
|
+
normal: 50,
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
} as const satisfies ModelMeta<
|
|
582
|
+
AnthropicCacheControlOptions &
|
|
583
|
+
AnthropicContainerOptions &
|
|
584
|
+
AnthropicContextManagementOptions &
|
|
585
|
+
AnthropicMCPOptions &
|
|
586
|
+
AnthropicServiceTierOptions &
|
|
587
|
+
AnthropicStopSequencesOptions &
|
|
588
|
+
AnthropicAdaptiveOnlyThinkingOptions &
|
|
589
|
+
AnthropicToolChoiceOptions &
|
|
590
|
+
AnthropicMaxTokensOptions &
|
|
591
|
+
AnthropicOutputConfigOptions
|
|
592
|
+
>
|
|
593
|
+
|
|
563
594
|
export const ANTHROPIC_MODELS = [
|
|
595
|
+
CLAUDE_FABLE_5_1.id,
|
|
564
596
|
CLAUDE_OPUS_5.id,
|
|
565
597
|
CLAUDE_OPUS_5_FAST.id,
|
|
566
598
|
CLAUDE_OPUS_4_6.id,
|
|
@@ -636,6 +668,7 @@ const ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {
|
|
|
636
668
|
[CLAUDE_SONNET_5.id]: CLAUDE_SONNET_5.max_output_tokens,
|
|
637
669
|
[CLAUDE_OPUS_5.id]: CLAUDE_OPUS_5.max_output_tokens,
|
|
638
670
|
[CLAUDE_OPUS_5_FAST.id]: CLAUDE_OPUS_5_FAST.max_output_tokens,
|
|
671
|
+
[CLAUDE_FABLE_5_1.id]: CLAUDE_FABLE_5_1.max_output_tokens,
|
|
639
672
|
}
|
|
640
673
|
|
|
641
674
|
/**
|
|
@@ -828,6 +861,16 @@ export type AnthropicChatModelProviderOptionsByName = {
|
|
|
828
861
|
AnthropicThinkingOptions &
|
|
829
862
|
AnthropicToolChoiceOptions &
|
|
830
863
|
AnthropicSamplingOptions
|
|
864
|
+
[CLAUDE_FABLE_5_1.id]: AnthropicCacheControlOptions &
|
|
865
|
+
AnthropicContainerOptions &
|
|
866
|
+
AnthropicContextManagementOptions &
|
|
867
|
+
AnthropicMCPOptions &
|
|
868
|
+
AnthropicServiceTierOptions &
|
|
869
|
+
AnthropicStopSequencesOptions &
|
|
870
|
+
AnthropicAdaptiveOnlyThinkingOptions &
|
|
871
|
+
AnthropicToolChoiceOptions &
|
|
872
|
+
AnthropicMaxTokensOptions &
|
|
873
|
+
AnthropicOutputConfigOptions
|
|
831
874
|
}
|
|
832
875
|
|
|
833
876
|
export type AnthropicChatModelToolCapabilitiesByName = {
|
|
@@ -843,6 +886,7 @@ export type AnthropicChatModelToolCapabilitiesByName = {
|
|
|
843
886
|
[CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.tools
|
|
844
887
|
[CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.tools
|
|
845
888
|
[CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.tools
|
|
889
|
+
[CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.tools
|
|
846
890
|
}
|
|
847
891
|
|
|
848
892
|
/**
|
|
@@ -869,4 +913,5 @@ export type AnthropicModelInputModalitiesByName = {
|
|
|
869
913
|
[CLAUDE_SONNET_5.id]: typeof CLAUDE_SONNET_5.supports.input
|
|
870
914
|
[CLAUDE_OPUS_5.id]: typeof CLAUDE_OPUS_5.supports.input
|
|
871
915
|
[CLAUDE_OPUS_5_FAST.id]: typeof CLAUDE_OPUS_5_FAST.supports.input
|
|
916
|
+
[CLAUDE_FABLE_5_1.id]: typeof CLAUDE_FABLE_5_1.supports.input
|
|
872
917
|
}
|