@ai-sdk/anthropic 3.0.130 → 3.0.132
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 +16 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +3 -3
- package/dist/internal/index.d.ts +3 -3
- package/dist/internal/index.js +4 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +4 -4
- package/dist/internal/index.mjs.map +1 -1
- package/docs/05-anthropic.mdx +7 -0
- package/package.json +3 -3
- package/src/anthropic-messages-language-model.ts +4 -2
- package/src/anthropic-prepare-tools.ts +5 -5
package/dist/internal/index.mjs
CHANGED
|
@@ -1982,7 +1982,7 @@ async function prepareTools({
|
|
|
1982
1982
|
toolWarnings.push({
|
|
1983
1983
|
type: "unsupported",
|
|
1984
1984
|
feature: "toolChoice",
|
|
1985
|
-
details: `toolChoice 'required' is not supported
|
|
1985
|
+
details: `toolChoice 'required' is not supported with this model or thinking configuration. Using 'auto' instead. Instruct the model to use a tool in the prompt and verify that a tool call was made.`
|
|
1986
1986
|
});
|
|
1987
1987
|
return {
|
|
1988
1988
|
tools: anthropicTools2,
|
|
@@ -2015,7 +2015,7 @@ async function prepareTools({
|
|
|
2015
2015
|
toolWarnings.push({
|
|
2016
2016
|
type: "unsupported",
|
|
2017
2017
|
feature: "toolChoice",
|
|
2018
|
-
details: `toolChoice 'tool' is not supported
|
|
2018
|
+
details: `toolChoice 'tool' is not supported with this model or thinking configuration. Only the '${toolChoice.toolName}' tool is sent with 'auto' tool choice. Instruct the model to use the tool in the prompt and verify that a tool call was made.`
|
|
2019
2019
|
});
|
|
2020
2020
|
return {
|
|
2021
2021
|
tools: anthropicTools2.filter(
|
|
@@ -4298,7 +4298,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4298
4298
|
supportsStructuredOutput: false,
|
|
4299
4299
|
supportsStrictTools,
|
|
4300
4300
|
defaultEagerInputStreaming,
|
|
4301
|
-
rejectsForcedToolUse
|
|
4301
|
+
rejectsForcedToolUse: rejectsForcedToolUse || thinkingType === "enabled"
|
|
4302
4302
|
} : {
|
|
4303
4303
|
tools: tools != null ? tools : [],
|
|
4304
4304
|
toolChoice,
|
|
@@ -4307,7 +4307,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4307
4307
|
supportsStructuredOutput,
|
|
4308
4308
|
supportsStrictTools,
|
|
4309
4309
|
defaultEagerInputStreaming,
|
|
4310
|
-
rejectsForcedToolUse
|
|
4310
|
+
rejectsForcedToolUse: rejectsForcedToolUse || thinkingType === "enabled"
|
|
4311
4311
|
}
|
|
4312
4312
|
);
|
|
4313
4313
|
const cacheWarnings = cacheControlValidator.getWarnings();
|