@ai-sdk/anthropic 3.0.0-beta.57 → 3.0.0-beta.59
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 +12 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +12 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@ai-sdk/provider-utils";
|
|
12
12
|
|
|
13
13
|
// src/version.ts
|
|
14
|
-
var VERSION = true ? "3.0.0-beta.
|
|
14
|
+
var VERSION = true ? "3.0.0-beta.59" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -656,7 +656,11 @@ var anthropicProviderOptions = z3.object({
|
|
|
656
656
|
*
|
|
657
657
|
* @default true
|
|
658
658
|
*/
|
|
659
|
-
toolStreaming: z3.boolean().optional()
|
|
659
|
+
toolStreaming: z3.boolean().optional(),
|
|
660
|
+
/**
|
|
661
|
+
* @default 'high'
|
|
662
|
+
*/
|
|
663
|
+
effort: z3.enum(["low", "medium", "high"]).optional()
|
|
660
664
|
});
|
|
661
665
|
|
|
662
666
|
// src/anthropic-prepare-tools.ts
|
|
@@ -2018,6 +2022,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2018
2022
|
...isThinking && {
|
|
2019
2023
|
thinking: { type: "enabled", budget_tokens: thinkingBudget }
|
|
2020
2024
|
},
|
|
2025
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
2026
|
+
output_config: { effort: anthropicOptions.effort }
|
|
2027
|
+
},
|
|
2021
2028
|
// structured output:
|
|
2022
2029
|
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
2023
2030
|
output_format: {
|
|
@@ -2111,6 +2118,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2111
2118
|
});
|
|
2112
2119
|
}
|
|
2113
2120
|
}
|
|
2121
|
+
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
2122
|
+
betas.add("effort-2025-11-24");
|
|
2123
|
+
}
|
|
2114
2124
|
if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
2115
2125
|
betas.add("fine-grained-tool-streaming-2025-05-14");
|
|
2116
2126
|
}
|
|
@@ -2994,7 +3004,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2994
3004
|
}
|
|
2995
3005
|
};
|
|
2996
3006
|
function getModelCapabilities(modelId) {
|
|
2997
|
-
if (modelId.includes("claude-sonnet-4-5")) {
|
|
3007
|
+
if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5")) {
|
|
2998
3008
|
return {
|
|
2999
3009
|
maxOutputTokens: 64e3,
|
|
3000
3010
|
supportsStructuredOutput: true,
|