@ai-sdk/anthropic 2.0.76 → 2.0.77

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.77
4
+
5
+ ### Patch Changes
6
+
7
+ - 5543cd1: Add AI Gateway hint to provider READMEs
8
+ - e1ed246: fix(anthropic): use default thinking budget when unspecified
9
+
3
10
  ## 2.0.76
4
11
 
5
12
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The **[Anthropic provider](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_post).
4
4
 
5
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Anthropic (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
6
+
5
7
  ## Setup
6
8
 
7
9
  The Anthropic provider is available in the `@ai-sdk/anthropic` module. You can install it with
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils21 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "2.0.76" : "0.0.0-test";
34
+ var VERSION = true ? "2.0.77" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -2233,9 +2233,15 @@ var AnthropicMessagesLanguageModel = class {
2233
2233
  };
2234
2234
  if (isThinking) {
2235
2235
  if (thinkingType === "enabled" && thinkingBudget == null) {
2236
- throw new import_provider3.UnsupportedFunctionalityError({
2237
- functionality: "thinking requires a budget"
2236
+ warnings.push({
2237
+ type: "other",
2238
+ message: "thinking budget is required when thinking is enabled. using default budget of 1024 tokens."
2238
2239
  });
2240
+ baseArgs.thinking = {
2241
+ type: "enabled",
2242
+ budget_tokens: 1024
2243
+ };
2244
+ thinkingBudget = 1024;
2239
2245
  }
2240
2246
  if (baseArgs.temperature != null) {
2241
2247
  baseArgs.temperature = void 0;