@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.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +2 -1
- package/package.json +1 -1
- package/src/anthropic-language-model-options.ts +1 -0
- package/src/anthropic-language-model.ts +2 -1
package/docs/05-anthropic.mdx
CHANGED
|
@@ -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
|
|
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
|
@@ -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,
|