chore: bump anthropic ai sdk pkg, delete patch (#21247)
parent
e64548fb4d
commit
3c31d04666
5
bun.lock
5
bun.lock
|
|
@ -308,7 +308,7 @@
|
||||||
"@actions/github": "6.0.1",
|
"@actions/github": "6.0.1",
|
||||||
"@agentclientprotocol/sdk": "0.16.1",
|
"@agentclientprotocol/sdk": "0.16.1",
|
||||||
"@ai-sdk/amazon-bedrock": "4.0.83",
|
"@ai-sdk/amazon-bedrock": "4.0.83",
|
||||||
"@ai-sdk/anthropic": "3.0.64",
|
"@ai-sdk/anthropic": "3.0.67",
|
||||||
"@ai-sdk/azure": "3.0.49",
|
"@ai-sdk/azure": "3.0.49",
|
||||||
"@ai-sdk/cerebras": "2.0.41",
|
"@ai-sdk/cerebras": "2.0.41",
|
||||||
"@ai-sdk/cohere": "3.0.27",
|
"@ai-sdk/cohere": "3.0.27",
|
||||||
|
|
@ -621,7 +621,6 @@
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
|
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
|
||||||
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
||||||
"@ai-sdk/anthropic@3.0.64": "patches/@ai-sdk%2Fanthropic@3.0.64.patch",
|
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@types/bun": "catalog:",
|
"@types/bun": "catalog:",
|
||||||
|
|
@ -5742,6 +5741,8 @@
|
||||||
|
|
||||||
"nypm/tinyexec": ["tinyexec@1.0.4", "", {}, "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw=="],
|
"nypm/tinyexec": ["tinyexec@1.0.4", "", {}, "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw=="],
|
||||||
|
|
||||||
|
"opencode/@ai-sdk/anthropic": ["@ai-sdk/anthropic@3.0.67", "", { "dependencies": { "@ai-sdk/provider": "3.0.8", "@ai-sdk/provider-utils": "4.0.23" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-FFX4P5Fd6lcQJc2OLngZQkbbJHa0IDDZi087Edb8qRZx6h90krtM61ArbMUL8us/7ZUwojCXnyJ/wQ2Eflx2jQ=="],
|
||||||
|
|
||||||
"opencontrol/@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.6.1", "", { "dependencies": { "content-type": "^1.0.5", "cors": "^2.8.5", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", "pkce-challenge": "^4.1.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" } }, "sha512-oxzMzYCkZHMntzuyerehK3fV6A2Kwh5BD6CGEJSVDU2QNEhfLOptf2X7esQgaHZXHZY0oHmMsOtIDLP71UJXgA=="],
|
"opencontrol/@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.6.1", "", { "dependencies": { "content-type": "^1.0.5", "cors": "^2.8.5", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", "pkce-challenge": "^4.1.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" } }, "sha512-oxzMzYCkZHMntzuyerehK3fV6A2Kwh5BD6CGEJSVDU2QNEhfLOptf2X7esQgaHZXHZY0oHmMsOtIDLP71UJXgA=="],
|
||||||
|
|
||||||
"opencontrol/@tsconfig/bun": ["@tsconfig/bun@1.0.7", "", {}, "sha512-udGrGJBNQdXGVulehc1aWT73wkR9wdaGBtB6yL70RJsqwW/yJhIg6ZbRlPOfIUiFNrnBuYLBi9CSmMKfDC7dvA=="],
|
"opencontrol/@tsconfig/bun": ["@tsconfig/bun@1.0.7", "", {}, "sha512-udGrGJBNQdXGVulehc1aWT73wkR9wdaGBtB6yL70RJsqwW/yJhIg6ZbRlPOfIUiFNrnBuYLBi9CSmMKfDC7dvA=="],
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,6 @@
|
||||||
},
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
||||||
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
|
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
|
||||||
"@ai-sdk/anthropic@3.0.64": "patches/@ai-sdk%2Fanthropic@3.0.64.patch"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
"@actions/github": "6.0.1",
|
"@actions/github": "6.0.1",
|
||||||
"@agentclientprotocol/sdk": "0.16.1",
|
"@agentclientprotocol/sdk": "0.16.1",
|
||||||
"@ai-sdk/amazon-bedrock": "4.0.83",
|
"@ai-sdk/amazon-bedrock": "4.0.83",
|
||||||
"@ai-sdk/anthropic": "3.0.64",
|
"@ai-sdk/anthropic": "3.0.67",
|
||||||
"@ai-sdk/azure": "3.0.49",
|
"@ai-sdk/azure": "3.0.49",
|
||||||
"@ai-sdk/cerebras": "2.0.41",
|
"@ai-sdk/cerebras": "2.0.41",
|
||||||
"@ai-sdk/cohere": "3.0.27",
|
"@ai-sdk/cohere": "3.0.27",
|
||||||
|
|
|
||||||
|
|
@ -872,16 +872,15 @@ describe("session.llm.stream", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test("sends messages API payload for Anthropic models", async () => {
|
test("sends messages API payload for Anthropic Compatible models", async () => {
|
||||||
const server = state.server
|
const server = state.server
|
||||||
if (!server) {
|
if (!server) {
|
||||||
throw new Error("Server not initialized")
|
throw new Error("Server not initialized")
|
||||||
}
|
}
|
||||||
|
|
||||||
const providerID = "anthropic"
|
const providerID = "minimax"
|
||||||
const modelID = "claude-3-5-sonnet-20241022"
|
const modelID = "MiniMax-M2.5"
|
||||||
const fixture = await loadFixture(providerID, modelID)
|
const fixture = await loadFixture(providerID, modelID)
|
||||||
const provider = fixture.provider
|
|
||||||
const model = fixture.model
|
const model = fixture.model
|
||||||
|
|
||||||
const chunks = [
|
const chunks = [
|
||||||
|
|
@ -962,7 +961,7 @@ describe("session.llm.stream", () => {
|
||||||
role: "user",
|
role: "user",
|
||||||
time: { created: Date.now() },
|
time: { created: Date.now() },
|
||||||
agent: agent.name,
|
agent: agent.name,
|
||||||
model: { providerID: ProviderID.make("minimax"), modelID: ModelID.make("MiniMax-M2.7") },
|
model: { providerID: ProviderID.make("minimax"), modelID: ModelID.make("MiniMax-M2.5") },
|
||||||
} satisfies MessageV2.User
|
} satisfies MessageV2.User
|
||||||
|
|
||||||
const stream = await LLM.stream({
|
const stream = await LLM.stream({
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
--- a/dist/index.js
|
|
||||||
+++ b/dist/index.js
|
|
||||||
@@ -3155,15 +3155,6 @@
|
|
||||||
});
|
|
||||||
}
|
|
||||||
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
||||||
- } else {
|
|
||||||
- if (topP != null && temperature != null) {
|
|
||||||
- warnings.push({
|
|
||||||
- type: "unsupported",
|
|
||||||
- feature: "topP",
|
|
||||||
- details: `topP is not supported when temperature is set. topP is ignored.`
|
|
||||||
- });
|
|
||||||
- baseArgs.top_p = void 0;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
|
|
||||||
if (maxOutputTokens != null) {
|
|
||||||
@@ -5180,4 +5171,4 @@
|
|
||||||
createAnthropic,
|
|
||||||
forwardAnthropicContainerIdFromLastStep
|
|
||||||
});
|
|
||||||
-//# sourceMappingURL=index.js.map
|
|
||||||
\ No newline at end of file
|
|
||||||
+//# sourceMappingURL=index.js.map
|
|
||||||
--- a/dist/index.mjs
|
|
||||||
+++ b/dist/index.mjs
|
|
||||||
@@ -3192,15 +3192,6 @@
|
|
||||||
});
|
|
||||||
}
|
|
||||||
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
||||||
- } else {
|
|
||||||
- if (topP != null && temperature != null) {
|
|
||||||
- warnings.push({
|
|
||||||
- type: "unsupported",
|
|
||||||
- feature: "topP",
|
|
||||||
- details: `topP is not supported when temperature is set. topP is ignored.`
|
|
||||||
- });
|
|
||||||
- baseArgs.top_p = void 0;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
|
|
||||||
if (maxOutputTokens != null) {
|
|
||||||
@@ -5256,4 +5247,4 @@
|
|
||||||
createAnthropic,
|
|
||||||
forwardAnthropicContainerIdFromLastStep
|
|
||||||
};
|
|
||||||
-//# sourceMappingURL=index.mjs.map
|
|
||||||
\ No newline at end of file
|
|
||||||
+//# sourceMappingURL=index.mjs.map
|
|
||||||
--- a/dist/internal/index.js
|
|
||||||
+++ b/dist/internal/index.js
|
|
||||||
@@ -3147,15 +3147,6 @@
|
|
||||||
});
|
|
||||||
}
|
|
||||||
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
||||||
- } else {
|
|
||||||
- if (topP != null && temperature != null) {
|
|
||||||
- warnings.push({
|
|
||||||
- type: "unsupported",
|
|
||||||
- feature: "topP",
|
|
||||||
- details: `topP is not supported when temperature is set. topP is ignored.`
|
|
||||||
- });
|
|
||||||
- baseArgs.top_p = void 0;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
|
|
||||||
if (maxOutputTokens != null) {
|
|
||||||
@@ -5080,4 +5071,4 @@
|
|
||||||
anthropicTools,
|
|
||||||
prepareTools
|
|
||||||
});
|
|
||||||
-//# sourceMappingURL=index.js.map
|
|
||||||
\ No newline at end of file
|
|
||||||
+//# sourceMappingURL=index.js.map
|
|
||||||
--- a/dist/internal/index.mjs
|
|
||||||
+++ b/dist/internal/index.mjs
|
|
||||||
@@ -3176,15 +3176,6 @@
|
|
||||||
});
|
|
||||||
}
|
|
||||||
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
||||||
- } else {
|
|
||||||
- if (topP != null && temperature != null) {
|
|
||||||
- warnings.push({
|
|
||||||
- type: "unsupported",
|
|
||||||
- feature: "topP",
|
|
||||||
- details: `topP is not supported when temperature is set. topP is ignored.`
|
|
||||||
- });
|
|
||||||
- baseArgs.top_p = void 0;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
|
|
||||||
if (maxOutputTokens != null) {
|
|
||||||
@@ -5148,4 +5139,4 @@
|
|
||||||
anthropicTools,
|
|
||||||
prepareTools
|
|
||||||
};
|
|
||||||
-//# sourceMappingURL=index.mjs.map
|
|
||||||
\ No newline at end of file
|
|
||||||
+//# sourceMappingURL=index.mjs.map
|
|
||||||
--- a/src/anthropic-messages-language-model.ts
|
|
||||||
+++ b/src/anthropic-messages-language-model.ts
|
|
||||||
@@ -534,16 +534,6 @@
|
|
||||||
|
|
||||||
// adjust max tokens to account for thinking:
|
|
||||||
baseArgs.max_tokens = maxTokens + (thinkingBudget ?? 0);
|
|
||||||
- } else {
|
|
||||||
- // Only check temperature/topP mutual exclusivity when thinking is not enabled
|
|
||||||
- if (topP != null && temperature != null) {
|
|
||||||
- warnings.push({
|
|
||||||
- type: 'unsupported',
|
|
||||||
- feature: 'topP',
|
|
||||||
- details: `topP is not supported when temperature is set. topP is ignored.`,
|
|
||||||
- });
|
|
||||||
- baseArgs.top_p = undefined;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
// limit to max output tokens for known models to enable model switching without breaking it:
|
|
||||||
Loading…
Reference in New Issue