@ai-sdk/anthropic 3.0.139 → 3.0.140
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 +8 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/anthropic-messages-language-model.ts +9 -2
package/dist/internal/index.mjs
CHANGED
|
@@ -4164,7 +4164,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4164
4164
|
providerOptions,
|
|
4165
4165
|
stream
|
|
4166
4166
|
}) {
|
|
4167
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4167
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
4168
4168
|
const warnings = [];
|
|
4169
4169
|
if (frequencyPenalty != null) {
|
|
4170
4170
|
warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
|
|
@@ -4710,6 +4710,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4710
4710
|
}
|
|
4711
4711
|
);
|
|
4712
4712
|
if ((toolChoice == null ? void 0 : toolChoice.type) === "tool" && ((anthropicToolChoice == null ? void 0 : anthropicToolChoice.type) === "auto" || jsonResponseTool != null) || (toolChoice == null ? void 0 : toolChoice.type) === "none" && jsonResponseTool != null) {
|
|
4713
|
+
for (const server of (_h = baseArgs.mcp_servers) != null ? _h : []) {
|
|
4714
|
+
server.tool_configuration = {
|
|
4715
|
+
allowed_tools: (_i = server.tool_configuration) == null ? void 0 : _i.allowed_tools,
|
|
4716
|
+
enabled: false
|
|
4717
|
+
};
|
|
4718
|
+
}
|
|
4713
4719
|
const emittedInlineDefinitions = new Set(
|
|
4714
4720
|
messagesPrompt.messages.flatMap(
|
|
4715
4721
|
(message) => message.role === "system" ? message.content.flatMap(
|
|
@@ -4748,7 +4754,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4748
4754
|
...betas,
|
|
4749
4755
|
...toolsBetas,
|
|
4750
4756
|
...userSuppliedBetas,
|
|
4751
|
-
...(
|
|
4757
|
+
...(_j = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _j : []
|
|
4752
4758
|
]),
|
|
4753
4759
|
usesJsonResponseTool: jsonResponseTool != null,
|
|
4754
4760
|
toolNameMapping,
|