File tree Expand file tree Collapse file tree
packages/ai-sdk-middleware Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments