From b6b7f40b5026dd80ab49018cd59eaf077743ab38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=91=A8=E6=B6=9B?= Date: Tue, 9 Jun 2026 09:59:41 +0800 Subject: [PATCH 1/2] fix(cli): add @ai-sdk/openai, anthropic, google as direct dependencies Global CLI installs don't auto-install peerDependencies, so providers like DeepSeek (which normalises to provider=openai internally) silently fail with "Cannot find package '@ai-sdk/openai'". The CLI is the final consumer and must list all provider SDKs it dynamically imports as direct dependencies, the same way apps/studio previously did for Vercel deployments. Fixes: "Could not build adapter for provider=deepseek" --- packages/cli/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cli/package.json b/packages/cli/package.json index f223f090d..2b022fa81 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -39,7 +39,10 @@ "topicSeparator": " " }, "dependencies": { + "@ai-sdk/anthropic": "^3.0.0", "@ai-sdk/gateway": "^3.0.121", + "@ai-sdk/google": "^3.0.0", + "@ai-sdk/openai": "^3.0.0", "@objectstack/account": "workspace:*", "@objectstack/client": "workspace:*", "@objectstack/console": "workspace:*", From a66e1853e87dfe4db81dd4b495acdcbc42a89644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=91=A8=E6=B6=9B?= Date: Tue, 9 Jun 2026 10:51:44 +0800 Subject: [PATCH 2/2] fix(cli): update lockfile and add changeset for ai-sdk provider deps --- .changeset/cli-ai-sdk-deps.md | 12 ++++++++++++ pnpm-lock.yaml | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 .changeset/cli-ai-sdk-deps.md diff --git a/.changeset/cli-ai-sdk-deps.md b/.changeset/cli-ai-sdk-deps.md new file mode 100644 index 000000000..4e3bc3708 --- /dev/null +++ b/.changeset/cli-ai-sdk-deps.md @@ -0,0 +1,12 @@ +--- +"@objectstack/cli": patch +--- + +Bundle the `@ai-sdk/openai`, `@ai-sdk/anthropic`, and `@ai-sdk/google` provider +SDKs as direct CLI dependencies. These were previously only declared as optional +peer dependencies on `@objectstack/service-ai`, so a globally-installed CLI could +not resolve them at runtime. Configuring an OpenAI-compatible provider (DeepSeek, +DashScope, SiliconFlow, OpenRouter, Cloudflare) — all of which normalise to +`provider=openai` and dynamically import `@ai-sdk/openai` — failed with +"Could not build adapter for provider=…". The CLI now ships these providers so +they work out of the box. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25ada52b0..67664590a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -449,9 +449,18 @@ importers: packages/cli: dependencies: + '@ai-sdk/anthropic': + specifier: ^3.0.0 + version: 3.0.79(zod@4.4.3) '@ai-sdk/gateway': specifier: ^3.0.121 version: 3.0.121(zod@4.4.3) + '@ai-sdk/google': + specifier: ^3.0.0 + version: 3.0.79(zod@4.4.3) + '@ai-sdk/openai': + specifier: ^3.0.0 + version: 3.0.65(zod@4.4.3) '@objectstack/account': specifier: workspace:* version: link:../../apps/account