@ai-sdk/anthropic 3.0.129 → 3.0.131
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 +15 -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 +2 -2
- package/src/anthropic-messages-language-model.ts +4 -2
- package/src/anthropic-prepare-tools.ts +5 -5
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "@ai-sdk/provider-utils";
|
|
13
13
|
|
|
14
14
|
// src/version.ts
|
|
15
|
-
var VERSION = true ? "3.0.
|
|
15
|
+
var VERSION = true ? "3.0.131" : "0.0.0-test";
|
|
16
16
|
|
|
17
17
|
// src/anthropic-messages-language-model.ts
|
|
18
18
|
import {
|
|
@@ -1998,7 +1998,7 @@ async function prepareTools({
|
|
|
1998
1998
|
toolWarnings.push({
|
|
1999
1999
|
type: "unsupported",
|
|
2000
2000
|
feature: "toolChoice",
|
|
2001
|
-
details: `toolChoice 'required' is not supported
|
|
2001
|
+
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.`
|
|
2002
2002
|
});
|
|
2003
2003
|
return {
|
|
2004
2004
|
tools: anthropicTools2,
|
|
@@ -2031,7 +2031,7 @@ async function prepareTools({
|
|
|
2031
2031
|
toolWarnings.push({
|
|
2032
2032
|
type: "unsupported",
|
|
2033
2033
|
feature: "toolChoice",
|
|
2034
|
-
details: `toolChoice 'tool' is not supported
|
|
2034
|
+
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.`
|
|
2035
2035
|
});
|
|
2036
2036
|
return {
|
|
2037
2037
|
tools: anthropicTools2.filter(
|
|
@@ -4314,7 +4314,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4314
4314
|
supportsStructuredOutput: false,
|
|
4315
4315
|
supportsStrictTools,
|
|
4316
4316
|
defaultEagerInputStreaming,
|
|
4317
|
-
rejectsForcedToolUse
|
|
4317
|
+
rejectsForcedToolUse: rejectsForcedToolUse || thinkingType === "enabled"
|
|
4318
4318
|
} : {
|
|
4319
4319
|
tools: tools != null ? tools : [],
|
|
4320
4320
|
toolChoice,
|
|
@@ -4323,7 +4323,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4323
4323
|
supportsStructuredOutput,
|
|
4324
4324
|
supportsStrictTools,
|
|
4325
4325
|
defaultEagerInputStreaming,
|
|
4326
|
-
rejectsForcedToolUse
|
|
4326
|
+
rejectsForcedToolUse: rejectsForcedToolUse || thinkingType === "enabled"
|
|
4327
4327
|
}
|
|
4328
4328
|
);
|
|
4329
4329
|
const cacheWarnings = cacheControlValidator.getWarnings();
|