Skip to content

Commit 7230cd2

Browse files
authored
feat: add alibaba pkg and cache support (anomalyco#22248)
1 parent a915fe7 commit 7230cd2

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

bun.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opencode/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@actions/core": "1.11.1",
7777
"@actions/github": "6.0.1",
7878
"@agentclientprotocol/sdk": "0.16.1",
79+
"@ai-sdk/alibaba": "1.0.17",
7980
"@ai-sdk/amazon-bedrock": "4.0.93",
8081
"@ai-sdk/anthropic": "3.0.67",
8182
"@ai-sdk/azure": "3.0.49",

packages/opencode/src/provider/provider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import { createTogetherAI } from "@ai-sdk/togetherai"
4646
import { createPerplexity } from "@ai-sdk/perplexity"
4747
import { createVercel } from "@ai-sdk/vercel"
4848
import { createVenice } from "venice-ai-sdk-provider"
49+
import { createAlibaba } from "@ai-sdk/alibaba"
4950
import {
5051
createGitLab,
5152
VERSION as GITLAB_PROVIDER_VERSION,
@@ -145,6 +146,7 @@ export namespace Provider {
145146
"@ai-sdk/togetherai": createTogetherAI,
146147
"@ai-sdk/perplexity": createPerplexity,
147148
"@ai-sdk/vercel": createVercel,
149+
"@ai-sdk/alibaba": createAlibaba,
148150
"gitlab-ai-provider": createGitLab,
149151
"@ai-sdk/github-copilot": createGitHubCopilotOpenAICompatible,
150152
"venice-ai-sdk-provider": createVenice,

packages/opencode/src/provider/transform.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ export namespace ProviderTransform {
209209
copilot: {
210210
copilot_cache_control: { type: "ephemeral" },
211211
},
212+
alibaba: {
213+
cacheControl: { type: "ephemeral" },
214+
},
212215
}
213216

214217
for (const msg of unique([...system, ...final])) {

0 commit comments

Comments
 (0)