Skip to content

Commit f7765bf

Browse files
Merge pull request #42 from MyPrototypeWhat/changeset-release/main
chore: version packages
2 parents deafa2f + 2285059 commit f7765bf

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

.changeset/model-message-durable-compaction.md

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

packages/ai-sdk-middleware/CHANGELOG.md

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

3+
## 1.6.0
4+
5+
### Minor Changes
6+
7+
- [#40](https://github.com/MyPrototypeWhat/context-chef/pull/40) [`55d5c27`](https://github.com/MyPrototypeWhat/context-chef/commit/55d5c2727bbf9117bbb846be8ab7d7d9a4ef47e1) Thanks [@MyPrototypeWhat](https://github.com/MyPrototypeWhat)! - Add ModelMessage-altitude durable compaction.
8+
9+
`compactModelMessages`, `planCompactionModelMessages`, and `summarizeModelMessages` operate on `ModelMessage[]` — the message type `generateText`/`prepareStep` actually use — so you can run durable compaction directly against your own message store, or inside a `ToolLoopAgent` `prepareStep`. They reuse the provider-agnostic core engine, and `compactModelMessages` preserves the no-op reference-identity contract (returns the input array unchanged when there is nothing old enough to compact, so callers can skip persistence).
10+
11+
`createCompressionAdapter` now accepts `ai`'s `LanguageModel` (a model id string, or a V3/V2 model) — matching what `prepareStep`/`generateText` hand you — instead of only `LanguageModelV3`.
12+
13+
Deprecates the `LanguageModelV3Prompt`-typed `compactHistory` / `planCompaction` (still exported and fully working) in favor of the ModelMessage variants; they are slated for removal in the next major. `summarizeMessages` is unchanged.
14+
15+
Also fixes three round-trip issues in both AI-SDK adapters (V3 and ModelMessage): provider-executed (inline) tool-results no longer trigger a spurious `[No tool result available]` placeholder; tool-message-level `providerOptions` (e.g. Anthropic cache control) is now preserved; and a tool-call with `undefined` input serializes to `"{}"` instead of a non-string value.
16+
317
## 1.5.2
418

519
### Patch 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.5.2",
3+
"version": "1.6.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",

0 commit comments

Comments
 (0)