@ai-sdk/anthropic 3.0.44 → 3.0.45

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.
@@ -1148,8 +1148,9 @@ In this flow:
1148
1148
  3. Claude processes the results in code and generates the final response
1149
1149
 
1150
1150
  <Note>
1151
- Programmatic tool calling requires `claude-sonnet-4-5` or `claude-opus-4-5`
1152
- models and uses the `code_execution_20250825` tool.
1151
+ Programmatic tool calling requires `claude-sonnet-4-6`, `claude-sonnet-4-5`,
1152
+ `claude-opus-4-6`, or `claude-opus-4-5` models and uses the
1153
+ `code_execution_20250825` tool.
1153
1154
  </Note>
1154
1155
 
1155
1156
  #### Container Persistence
@@ -1297,6 +1298,7 @@ and the `mediaType` should be set to `'application/pdf'`.
1297
1298
  | Model | Image Input | Object Generation | Tool Usage | Computer Use | Web Search | Tool Search | Compaction |
1298
1299
  | -------------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
1299
1300
  | `claude-opus-4-6` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
1301
+ | `claude-sonnet-4-6` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | |
1300
1302
  | `claude-opus-4-5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | |
1301
1303
  | `claude-haiku-4-5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | | |
1302
1304
  | `claude-sonnet-4-5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/anthropic",
3
- "version": "3.0.44",
3
+ "version": "3.0.45",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -2182,7 +2182,10 @@ function getModelCapabilities(modelId: string): {
2182
2182
  supportsStructuredOutput: boolean;
2183
2183
  isKnownModel: boolean;
2184
2184
  } {
2185
- if (modelId.includes('claude-opus-4-6')) {
2185
+ if (
2186
+ modelId.includes('claude-sonnet-4-6') ||
2187
+ modelId.includes('claude-opus-4-6')
2188
+ ) {
2186
2189
  return {
2187
2190
  maxOutputTokens: 128000,
2188
2191
  supportsStructuredOutput: true,
@@ -19,6 +19,7 @@ export type AnthropicMessagesModelId =
19
19
  | 'claude-sonnet-4-20250514'
20
20
  | 'claude-sonnet-4-5-20250929'
21
21
  | 'claude-sonnet-4-5'
22
+ | 'claude-sonnet-4-6'
22
23
  | 'claude-opus-4-6'
23
24
  | (string & {});
24
25
 
@@ -84,11 +85,11 @@ export const anthropicLanguageModelOptions = z.object({
84
85
  thinking: z
85
86
  .discriminatedUnion('type', [
86
87
  z.object({
87
- /** for Opus 4.6 and newer models */
88
+ /** for Sonnet 4.6, Opus 4.6, and newer models */
88
89
  type: z.literal('adaptive'),
89
90
  }),
90
91
  z.object({
91
- /** for models before Opus 4.6 */
92
+ /** for models before Opus 4.6, except Sonnet 4.6 still supports it */
92
93
  type: z.literal('enabled'),
93
94
  budgetTokens: z.number().optional(),
94
95
  }),