summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-04-06 18:28:32 -0700
committerGitHub <[email protected]>2026-04-06 20:28:32 -0500
commit3c31d046669ca8df09798f690ef5c9cf17021ddd (patch)
tree1307d0d8834888eb04f18dbb4bf802b0772eee0f
parente64548fb4df1a9e23b13e3ef7ff7a63c84dababb (diff)
downloadopencode-3c31d046669ca8df09798f690ef5c9cf17021ddd.tar.gz
opencode-3c31d046669ca8df09798f690ef5c9cf17021ddd.zip
chore: bump anthropic ai sdk pkg, delete patch (#21247)
-rw-r--r--bun.lock5
-rw-r--r--package.json3
-rw-r--r--packages/opencode/package.json2
-rw-r--r--packages/opencode/test/session/llm.test.ts9
-rw-r--r--patches/@ai-sdk%[email protected]119
5 files changed, 9 insertions, 129 deletions
diff --git a/bun.lock b/bun.lock
index 096cd6ac3..1c6bcd471 100644
--- a/bun.lock
+++ b/bun.lock
@@ -308,7 +308,7 @@
"@actions/github": "6.0.1",
"@agentclientprotocol/sdk": "0.16.1",
"@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/cerebras": "2.0.41",
"@ai-sdk/cohere": "3.0.27",
@@ -621,7 +621,6 @@
"patchedDependencies": {
"@standard-community/[email protected]": "patches/@standard-community%[email protected]",
- "@ai-sdk/[email protected]": "patches/@ai-sdk%[email protected]",
},
"overrides": {
"@types/bun": "catalog:",
@@ -5742,6 +5741,8 @@
"nypm/tinyexec": ["[email protected]", "", {}, "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw=="],
+ "opencode/@ai-sdk/anthropic": ["@ai-sdk/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", {}, "sha512-udGrGJBNQdXGVulehc1aWT73wkR9wdaGBtB6yL70RJsqwW/yJhIg6ZbRlPOfIUiFNrnBuYLBi9CSmMKfDC7dvA=="],
diff --git a/package.json b/package.json
index 0c75547d1..4ce36d17e 100644
--- a/package.json
+++ b/package.json
@@ -118,7 +118,6 @@
},
"patchedDependencies": {
"@standard-community/[email protected]": "patches/@standard-community%[email protected]",
- "@ai-sdk/[email protected]": "patches/@ai-sdk%[email protected]"
}
}
diff --git a/packages/opencode/package.json b/packages/opencode/package.json
index 29b53c7b7..b88ba974f 100644
--- a/packages/opencode/package.json
+++ b/packages/opencode/package.json
@@ -79,7 +79,7 @@
"@actions/github": "6.0.1",
"@agentclientprotocol/sdk": "0.16.1",
"@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/cerebras": "2.0.41",
"@ai-sdk/cohere": "3.0.27",
diff --git a/packages/opencode/test/session/llm.test.ts b/packages/opencode/test/session/llm.test.ts
index 82ee8c081..946797da5 100644
--- a/packages/opencode/test/session/llm.test.ts
+++ b/packages/opencode/test/session/llm.test.ts
@@ -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
if (!server) {
throw new Error("Server not initialized")
}
- const providerID = "anthropic"
- const modelID = "claude-3-5-sonnet-20241022"
+ const providerID = "minimax"
+ const modelID = "MiniMax-M2.5"
const fixture = await loadFixture(providerID, modelID)
- const provider = fixture.provider
const model = fixture.model
const chunks = [
@@ -962,7 +961,7 @@ describe("session.llm.stream", () => {
role: "user",
time: { created: Date.now() },
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
const stream = await LLM.stream({
diff --git a/patches/@ai-sdk%[email protected] b/patches/@ai-sdk%[email protected]
deleted file mode 100644
index b8c2f387d..000000000
--- a/patches/@ai-sdk%[email protected]
+++ /dev/null
@@ -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: