@ai-sdk/anthropic 2.0.87 → 2.0.89

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,18 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.89
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b0e540: Use native structured output on supported Bedrock Anthropic models when thinking is enabled instead of forcing a JSON tool call.
8
+ - 5bb3ae4: Warn when an unknown model uses the default 4096 max output token limit.
9
+
10
+ ## 2.0.88
11
+
12
+ ### Patch Changes
13
+
14
+ - 30c69e6: fix(provider/anthropic): warn when parallel tool use is requested with JSON tool structured output
15
+
3
16
  ## 2.0.87
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "2.0.87" : "0.0.0-test";
34
+ var VERSION = true ? "2.0.89" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -2269,6 +2269,12 @@ var AnthropicMessagesLanguageModel = class {
2269
2269
  rejectsSamplingParameters,
2270
2270
  isKnownModel
2271
2271
  } = getModelCapabilities(this.modelId);
2272
+ if (!isKnownModel && maxOutputTokens == null) {
2273
+ warnings.push({
2274
+ type: "other",
2275
+ message: `The model "${this.modelId}" is unknown. The max output tokens have been limited to ${maxOutputTokensForModel}. Set maxOutputTokens explicitly to override this limit.`
2276
+ });
2277
+ }
2272
2278
  if (rejectsSamplingParameters) {
2273
2279
  if (temperature != null) {
2274
2280
  warnings.push({
@@ -2304,6 +2310,13 @@ var AnthropicMessagesLanguageModel = class {
2304
2310
  description: "Respond with a JSON object.",
2305
2311
  inputSchema: responseFormat.schema
2306
2312
  } : void 0;
2313
+ if (jsonResponseTool != null && (anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse) === false) {
2314
+ warnings.push({
2315
+ type: "unsupported-setting",
2316
+ setting: "providerOptions",
2317
+ details: "`disableParallelToolUse: false` is ignored when using the JSON response tool. Parallel tool use is disabled to ensure a single coherent JSON tool call."
2318
+ });
2319
+ }
2307
2320
  const cacheControlValidator = new CacheControlValidator();
2308
2321
  const { prompt: messagesPrompt, betas } = await convertToAnthropicMessagesPrompt({
2309
2322
  prompt,