@ai-sdk/anthropic 3.0.0-beta.70 → 3.0.0-beta.71

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/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "3.0.0-beta.70" : "0.0.0-test";
14
+ var VERSION = true ? "3.0.0-beta.71" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -862,7 +862,8 @@ async function prepareTools({
862
862
  tools,
863
863
  toolChoice,
864
864
  disableParallelToolUse,
865
- cacheControlValidator
865
+ cacheControlValidator,
866
+ supportsStructuredOutput
866
867
  }) {
867
868
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
868
869
  const toolWarnings = [];
@@ -883,7 +884,8 @@ async function prepareTools({
883
884
  name: tool.name,
884
885
  description: tool.description,
885
886
  input_schema: tool.inputSchema,
886
- cache_control: cacheControl
887
+ cache_control: cacheControl,
888
+ ...supportsStructuredOutput === true && tool.strict != null ? { strict: tool.strict } : {}
887
889
  });
888
890
  break;
889
891
  }
@@ -2160,12 +2162,14 @@ var AnthropicMessagesLanguageModel = class {
2160
2162
  tools: [...tools != null ? tools : [], jsonResponseTool],
2161
2163
  toolChoice: { type: "required" },
2162
2164
  disableParallelToolUse: true,
2163
- cacheControlValidator
2165
+ cacheControlValidator,
2166
+ supportsStructuredOutput
2164
2167
  } : {
2165
2168
  tools: tools != null ? tools : [],
2166
2169
  toolChoice,
2167
2170
  disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,
2168
- cacheControlValidator
2171
+ cacheControlValidator,
2172
+ supportsStructuredOutput
2169
2173
  }
2170
2174
  );
2171
2175
  const cacheWarnings = cacheControlValidator.getWarnings();