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/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:*", 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