@ai-sdk/anthropic 3.0.98 → 3.0.100

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
+ ## 3.0.100
4
+
5
+ ### Patch Changes
6
+
7
+ - b7afc80: Warn when an unknown model uses the default 4096 max output token limit.
8
+
9
+ ## 3.0.99
10
+
11
+ ### Patch Changes
12
+
13
+ - db8cff6: fix(amazon-bedrock): sanitize unsupported JSON Schema constraints in native Anthropic structured output
14
+ - 94d0f86: fix(provider/anthropic): warn when parallel tool use is requested with JSON tool structured output
15
+
3
16
  ## 3.0.98
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
32
32
  var import_provider_utils26 = require("@ai-sdk/provider-utils");
33
33
 
34
34
  // src/version.ts
35
- var VERSION = true ? "3.0.98" : "0.0.0-test";
35
+ var VERSION = true ? "3.0.100" : "0.0.0-test";
36
36
 
37
37
  // src/anthropic-messages-language-model.ts
38
38
  var import_provider3 = require("@ai-sdk/provider");
@@ -3396,6 +3396,13 @@ var AnthropicMessagesLanguageModel = class {
3396
3396
  rejectsSamplingParameters,
3397
3397
  isKnownModel
3398
3398
  } = getModelCapabilities(this.modelId);
3399
+ if (!isKnownModel && maxOutputTokens == null) {
3400
+ warnings.push({
3401
+ type: "compatibility",
3402
+ feature: "maxOutputTokens",
3403
+ details: `The model "${this.modelId}" is unknown. The max output tokens have been limited to ${maxOutputTokensForModel}. Set maxOutputTokens explicitly to override this limit.`
3404
+ });
3405
+ }
3399
3406
  if (rejectsSamplingParameters) {
3400
3407
  if (temperature != null) {
3401
3408
  warnings.push({
@@ -3433,6 +3440,13 @@ var AnthropicMessagesLanguageModel = class {
3433
3440
  description: "Respond with a JSON object.",
3434
3441
  inputSchema: responseFormat.schema
3435
3442
  } : void 0;
3443
+ if (jsonResponseTool != null && (anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse) === false) {
3444
+ warnings.push({
3445
+ type: "unsupported",
3446
+ feature: "providerOptions.anthropic.disableParallelToolUse",
3447
+ details: "`disableParallelToolUse: false` is ignored when using the JSON response tool. Parallel tool use is disabled to ensure a single coherent JSON tool call."
3448
+ });
3449
+ }
3436
3450
  const contextManagement = anthropicOptions == null ? void 0 : anthropicOptions.contextManagement;
3437
3451
  const cacheControlValidator = new CacheControlValidator();
3438
3452
  const toolNameMapping = (0, import_provider_utils15.createToolNameMapping)({