Skip to content

Commit 3d8b524

Browse files
Merge pull request #44 from MyPrototypeWhat/changeset-release/main
chore: version packages
2 parents af670be + 319519a commit 3d8b524

3 files changed

Lines changed: 33 additions & 32 deletions

File tree

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/ai-sdk-middleware/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# @context-chef/ai-sdk-middleware
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- [#43](https://github.com/MyPrototypeWhat/context-chef/pull/43) [`e8ae66a`](https://github.com/MyPrototypeWhat/context-chef/commit/e8ae66a5eca7ed16b56270a0156c63b70abaf142) Thanks [@MyPrototypeWhat](https://github.com/MyPrototypeWhat)! - Support AI SDK v7 (provider spec V4).
8+
9+
The middleware now targets `ai@>=7` / `@ai-sdk/provider@>=4`: it implements the V4
10+
language-model middleware spec (`specificationVersion: 'v4'`) and all public types
11+
move from `LanguageModelV3*` to `LanguageModelV4*`. AI SDK v7's `wrapLanguageModel`
12+
rejects a v3-spec middleware, so this is a breaking change that requires AI SDK v7.
13+
14+
**Migration**
15+
16+
- On AI SDK v7 (`ai@7`): upgrade to `@context-chef/ai-sdk-middleware@2`.
17+
- Still on AI SDK v6 (`ai@6`): stay on `@context-chef/ai-sdk-middleware@1` — the 1.x
18+
line continues to support the v3 spec. No code change is forced on you.
19+
20+
**Removed** (deprecated APIs that were slated for removal in the next major):
21+
22+
- `planCompaction`, `compactHistory`, and the `CompactionPlan` type (the provider-prompt
23+
altitude variants) — use `planCompactionModelMessages` / `compactModelMessages` /
24+
`CompactionPlanModelMessages` at the `ModelMessage` altitude instead.
25+
- `onBudgetExceeded` on `ContextChefOptions` — use `onBeforeCompress` instead.
26+
27+
Runtime behavior is unchanged. The only V4 nuance: provider-level `FilePart.data`
28+
became a tagged union (`SharedV4FileData`); the prompt adapter handles it
29+
transparently and the binary/URL payload still round-trips losslessly.
30+
31+
On v7, durable in-loop compaction via `compactModelMessages` inside a
32+
`ToolLoopAgent` `prepareStep` now persists across steps (AI SDK v7 carries
33+
`prepareStep`-returned messages forward into later steps — v6 did not).
34+
335
## 1.6.0
436

537
### Minor Changes

packages/ai-sdk-middleware/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@context-chef/ai-sdk-middleware",
3-
"version": "1.6.0",
3+
"version": "2.0.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",

0 commit comments

Comments
 (0)