@ai-sdk/anthropic 3.0.6 → 3.0.8

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,23 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - bee4f82: fix(anthropic): enable structured output support for claude-haiku-4-5
8
+
9
+ This fixes an issue where the `strict: true` property was not included in the request body when using tools with Claude Haiku 4.5, because `supportsStructuredOutput` was incorrectly set to `false` for this model.
10
+
11
+ Claude Haiku 4.5 supports structured outputs, so the `strict` property should be forwarded to the Anthropic API when specified on tools.
12
+
13
+ ## 3.0.7
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [d937c8f]
18
+ - @ai-sdk/provider@3.0.2
19
+ - @ai-sdk/provider-utils@4.0.4
20
+
3
21
  ## 3.0.6
4
22
 
5
23
  ### Patch Changes
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
32
32
  var import_provider_utils22 = require("@ai-sdk/provider-utils");
33
33
 
34
34
  // src/version.ts
35
- var VERSION = true ? "3.0.6" : "0.0.0-test";
35
+ var VERSION = true ? "3.0.8" : "0.0.0-test";
36
36
 
37
37
  // src/anthropic-messages-language-model.ts
38
38
  var import_provider3 = require("@ai-sdk/provider");
@@ -3756,7 +3756,7 @@ var AnthropicMessagesLanguageModel = class {
3756
3756
  }
3757
3757
  };
3758
3758
  function getModelCapabilities(modelId) {
3759
- if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5")) {
3759
+ if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5") || modelId.includes("claude-haiku-4-5")) {
3760
3760
  return {
3761
3761
  maxOutputTokens: 64e3,
3762
3762
  supportsStructuredOutput: true,
@@ -3768,7 +3768,7 @@ function getModelCapabilities(modelId) {
3768
3768
  supportsStructuredOutput: true,
3769
3769
  isKnownModel: true
3770
3770
  };
3771
- } else if (modelId.includes("claude-sonnet-4-") || modelId.includes("claude-3-7-sonnet") || modelId.includes("claude-haiku-4-5")) {
3771
+ } else if (modelId.includes("claude-sonnet-4-") || modelId.includes("claude-3-7-sonnet")) {
3772
3772
  return {
3773
3773
  maxOutputTokens: 64e3,
3774
3774
  supportsStructuredOutput: false,