发布日期: 2026-06-19
版本号: v0.79.8

本次更新引入了多项新功能、添加项和修复。新功能包括选择性提供者基础入口点,允许SDK用户通过显式注册提供者来避免包含未使用的传输;Mistral提示缓存,支持会话亲和性和缓存令牌的使用与成本会计;压缩后令牌估计,为压缩结果和事件提供近似上下文减少的计数;以及OpenRouter Fusion别名,作为内置模型别名可用。添加项涵盖继承的入口点、Mistral提示缓存、压缩令牌估计和OpenRouter Fusion别名的实现。修复项涉及更新有漏洞的运行时依赖项,改进压缩以拒绝无合格消息的会话,以及避免自动压缩中重试已完成的响应。

更新内容 (中文)

新功能

  • 选择性提供程序基础入口点 - SDK用户现在可以将@earendil-works/pi-ai/base@earendil-works/pi-agent-core/base配合使用,并通过显式注册提供程序,以避免打包应用程序中包含未使用的提供程序传输层。详见 pi-ai 基础入口点pi-agent-core 基础入口点
  • Mistral 提示缓存 - Mistral 会话现在使用支持会话关联和缓存令牌使用/成本核算的提供程序端提示缓存。详见 API 密钥环境变量
  • 压缩后令牌估算 - 压缩结果和压缩事件现在包含估算的压缩后令牌数,以便客户端可以显示近似上下文缩减量。详见 RPC 压缩压缩事件
  • OpenRouter Fusion 别名 - openrouter/fusion 现已作为内置 OpenRouter 模型别名提供。详见 API 密钥

新增内容

  • 为打包应用程序中的选择性提供程序注册添加了继承的 @earendil-works/pi-ai/base@earendil-works/pi-agent-core/base 入口点 (#5348,由 @FredKSchott 提交)。
  • 添加了继承的 Mistral 提示缓存,使用 pi 会话 ID 作为 prompt_cache_key,包括缓存令牌使用量和成本核算 (#5854)。
  • 在压缩结果和压缩事件中添加了估算的压缩后令牌数 (#5877)。
  • 添加了作为 openrouter/fusion 的继承 OpenRouter Fusion 别名 (#5866,由 @dannote 提交)。

修复内容

  • 更新了易受攻击的运行时依赖项,包括 undici 和打包的 protobufjs 传递依赖项。
  • 修复了压缩功能,现在会拒绝没有符合条件的消息的会话,而不是生成空摘要 (#4811)。
  • 修复了成功的溢出触发自动压缩,以避免重试已完成的助手响应 (#5720)。

更新内容 (原始)

New Features

  • Selective provider base entry points - SDK users can pair @earendil-works/pi-ai/base and @earendil-works/pi-agent-core/base with explicit provider registration to keep bundled applications from including unused provider transports. See pi-ai Base Entry Point and pi-agent-core Base Entry Point.
  • Mistral prompt caching - Mistral sessions now use provider-side prompt caching with session affinity and cached-token usage/cost accounting. See API Keys and Environment Variables.
  • Post-compaction token estimates - Compact results and compaction events now include estimated post-compaction token counts so clients can show the approximate context reduction. See RPC compact and compaction events.
  • OpenRouter Fusion alias - openrouter/fusion is available as a built-in OpenRouter model alias. See API Keys.

Added

  • Added inherited @earendil-works/pi-ai/base and @earendil-works/pi-agent-core/base entry points for selective provider registration in bundled applications (#5348 by @FredKSchott).
  • Added inherited Mistral prompt caching using the pi session ID as prompt_cache_key, including cached-token usage and cost accounting (#5854).
  • Added estimated post-compaction token counts to compact results and compaction events (#5877).
  • Added the inherited OpenRouter Fusion alias as openrouter/fusion (#5866 by @dannote).

Fixed

  • Updated vulnerable runtime dependencies, including undici and the packaged protobufjs transitive dependency.
  • Fixed compaction to refuse sessions with no eligible messages instead of producing empty summaries (#4811).
  • Fixed successful overflow-triggered auto-compaction to avoid retrying completed assistant responses (#5720).

下载链接