@ai-sdk/anthropic 3.0.0-beta.57 → 3.0.0-beta.58
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.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 +3 -3
package/dist/internal/index.mjs
CHANGED
|
@@ -641,7 +641,11 @@ var anthropicProviderOptions = z3.object({
|
|
|
641
641
|
*
|
|
642
642
|
* @default true
|
|
643
643
|
*/
|
|
644
|
-
toolStreaming: z3.boolean().optional()
|
|
644
|
+
toolStreaming: z3.boolean().optional(),
|
|
645
|
+
/**
|
|
646
|
+
* @default 'high'
|
|
647
|
+
*/
|
|
648
|
+
effort: z3.enum(["low", "medium", "high"]).optional()
|
|
645
649
|
});
|
|
646
650
|
|
|
647
651
|
// src/anthropic-prepare-tools.ts
|
|
@@ -2003,6 +2007,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2003
2007
|
...isThinking && {
|
|
2004
2008
|
thinking: { type: "enabled", budget_tokens: thinkingBudget }
|
|
2005
2009
|
},
|
|
2010
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
2011
|
+
output_config: { effort: anthropicOptions.effort }
|
|
2012
|
+
},
|
|
2006
2013
|
// structured output:
|
|
2007
2014
|
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
2008
2015
|
output_format: {
|
|
@@ -2096,6 +2103,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2096
2103
|
});
|
|
2097
2104
|
}
|
|
2098
2105
|
}
|
|
2106
|
+
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
2107
|
+
betas.add("effort-2025-11-24");
|
|
2108
|
+
}
|
|
2099
2109
|
if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
2100
2110
|
betas.add("fine-grained-tool-streaming-2025-05-14");
|
|
2101
2111
|
}
|
|
@@ -2985,7 +2995,7 @@ function getModelCapabilities(modelId) {
|
|
|
2985
2995
|
supportsStructuredOutput: true,
|
|
2986
2996
|
isKnownModel: true
|
|
2987
2997
|
};
|
|
2988
|
-
} else if (modelId.includes("claude-opus-4-1")) {
|
|
2998
|
+
} else if (modelId.includes("claude-opus-4-1") || modelId.includes("claude-opus-4-5")) {
|
|
2989
2999
|
return {
|
|
2990
3000
|
maxOutputTokens: 32e3,
|
|
2991
3001
|
supportsStructuredOutput: true,
|