@ai-sdk/anthropic 4.0.3 → 4.0.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.
@@ -189,7 +189,7 @@ const result = streamText({
189
189
 
190
190
  ### Effort
191
191
 
192
- Anthropic introduced an `effort` option with `claude-opus-4-5` that affects thinking, text responses, and function calls. Effort defaults to `high` and you can set it to `medium` or `low` to save tokens and to lower time-to-last-token latency (TTLT). `claude-opus-4-7` additionally supports `xhigh` for maximum reasoning effort.
192
+ Anthropic introduced an `effort` option with `claude-opus-4-5` that affects thinking, text responses, and function calls. Effort defaults to `high` and you can set it to `medium` or `low` to save tokens and to lower time-to-last-token latency (TTLT). `claude-opus-4-7`, `claude-opus-4-8`, `claude-fable-5`, and `claude-sonnet-5` additionally support `xhigh` for maximum reasoning effort.
193
193
 
194
194
  ```ts highlight="8-10"
195
195
  import { anthropic, AnthropicLanguageModelOptions } from '@ai-sdk/anthropic';
@@ -1625,6 +1625,7 @@ and the `mediaType` should be set to `'application/pdf'`.
1625
1625
 
1626
1626
  | Model | Image Input | Object Generation | Tool Usage | Computer Use | Web Search | Tool Search | Compaction |
1627
1627
  | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
1628
+ | `claude-sonnet-5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
1628
1629
  | `claude-fable-5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
1629
1630
  | `claude-opus-4-8` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
1630
1631
  | `claude-opus-4-7` | <Check size={18} /> | <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": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -20,6 +20,7 @@ export type AnthropicModelId =
20
20
  | 'claude-opus-4-7'
21
21
  | 'claude-opus-4-8'
22
22
  | 'claude-fable-5'
23
+ | 'claude-sonnet-5'
23
24
  | (string & {});
24
25
 
25
26
  /**
@@ -2585,7 +2585,8 @@ export function getModelCapabilities(modelId: string): {
2585
2585
  if (
2586
2586
  modelId.includes('claude-opus-4-8') ||
2587
2587
  modelId.includes('claude-opus-4-7') ||
2588
- modelId.includes('claude-fable-5')
2588
+ modelId.includes('claude-fable-5') ||
2589
+ modelId.includes('claude-sonnet-5')
2589
2590
  ) {
2590
2591
  return {
2591
2592
  maxOutputTokens: 128000,