Skip to content

Commit b4a5df0

Browse files
os-zhuangclaude
andauthored
chore(ai)!: drop @ai-sdk provider SDKs from framework, align spec with ai v7 (#2464)
AI runtime moved to the cloud package (service-ai removed from open edition, ADR-0025 S2). Remove the now-dead @ai-sdk provider deps from @objectstack/cli and examples/app-todo (zero usages), and bump @objectstack/spec's `ai` peer/dev dependency ^6 -> ^7. Spec only re-exports canonical AI SDK types (all present in ai@7); `ai` stays an optional peer. Verified: spec build + 6650 spec tests green on ai@7; cli turbo build 54/54. First step of the ai v6->v7 / @ai-sdk v3->v4 migration (cloud + objectui follow). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 58e8e31 commit b4a5df0

5 files changed

Lines changed: 59 additions & 95 deletions

File tree

.changeset/ai-sdk-v7-framework.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
chore(ai): align framework with Vercel AI SDK v7 and stop bundling provider SDKs
6+
7+
AI runtime capabilities now live in the cloud package (service-ai removed from the
8+
open edition, ADR-0025 S2). The framework therefore no longer ships any `@ai-sdk/*`
9+
provider SDK:
10+
11+
- `@objectstack/cli` drops the dead `@ai-sdk/anthropic|gateway|google|openai`
12+
dependencies (zero usages in `cli/src` — they were only bundled so the old
13+
in-tree `service-ai` could `require()` them at runtime). Apps that boot the
14+
closed AI now declare the providers themselves (cloud side).
15+
- `examples/app-todo` drops the unused `ai` / `@ai-sdk/gateway` devDeps and the
16+
dead `test:ai*` / `test:agent` / `test:llm` scripts (their test files were
17+
migrated to cloud).
18+
- `@objectstack/spec` bumps its `ai` peer/dev dependency from `^6` to `^7`. The
19+
protocol still re-exports the canonical message/stream types (`ModelMessage`,
20+
`TextStreamPart`, `ToolSet`, `FinishReason`, …) — all verified present in
21+
`ai@7`; `ai` stays an OPTIONAL peer so installs are not forced.
22+
23+
First step of the AI SDK v6→v7 / providers v3→v4 upgrade. Cloud (service-ai
24+
adapter migration + apps declaring v4 providers) and objectui (chatbot useChat
25+
v7) follow in their own PRs.

examples/app-todo/package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717
"validate": "objectstack validate",
1818
"typecheck": "tsc --noEmit",
1919
"test": "objectstack test",
20-
"test:ai": "tsx test/ai.test.ts",
21-
"test:agent": "tsx test/ai-agent.test.ts",
22-
"test:action": "tsx test/ai-action.test.ts",
23-
"test:hitl": "tsx test/ai-hitl.test.ts",
24-
"test:hitl:llm": "tsx test/ai-hitl-llm.test.ts",
25-
"test:llm": "tsx test/ai-llm.test.ts",
26-
"test:knowledge:llm": "tsx test/ai-knowledge-llm.test.ts",
2720
"test:mcp": "tsx test/mcp-actions.test.ts"
2821
},
2922
"dependencies": {
@@ -38,9 +31,7 @@
3831
"@objectstack/spec": "workspace:*"
3932
},
4033
"devDependencies": {
41-
"@ai-sdk/gateway": "^3.0.139",
4234
"@objectstack/cli": "workspace:*",
43-
"ai": "^6.0.214",
4435
"tsx": "^4.22.4",
4536
"typescript": "^6.0.3",
4637
"vitest": "^4.1.9"

packages/cli/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
"topicSeparator": " "
4040
},
4141
"dependencies": {
42-
"@ai-sdk/anthropic": "^3.0.89",
43-
"@ai-sdk/gateway": "^3.0.139",
44-
"@ai-sdk/google": "^3.0.86",
45-
"@ai-sdk/openai": "^3.0.77",
4642
"@objectstack/account": "workspace:*",
4743
"@objectstack/client": "workspace:*",
4844
"@objectstack/cloud-connection": "workspace:*",

packages/spec/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
"devDependencies": {
209209
"@types/node": "^26.0.1",
210210
"@vitest/coverage-v8": "^4.1.9",
211-
"ai": "^6.0.214",
211+
"ai": "^7.0.4",
212212
"tsx": "^4.22.4",
213213
"typescript": "^6.0.3",
214214
"vitest": "^4.1.9"
@@ -217,7 +217,7 @@
217217
"zod": "^4.4.3"
218218
},
219219
"peerDependencies": {
220-
"ai": "^6.0.0"
220+
"ai": "^7.0.0"
221221
},
222222
"peerDependenciesMeta": {
223223
"ai": {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)