← 返回更新日志

Pi v0.79.8

2026-06-19 · GitHub 原文
### 新功能 - **选择性提供程序基础入口点** - SDK 用户可以将 `@earendil-works/pi-ai/base` 和 `@earendil-works/pi-agent-core/base` 与显式提供程序注册配合使用,以防止打包的应用程序包含未使用的提供程序传输层。请参阅 [`pi-ai` 基础入口点](https://github.com/earendil-works/pi/blob/v0.79.8/packages/ai/README.md#base-entry-point) 和 [`pi-agent-core` 基础入口点](https://github.com/earendil-works/pi/blob/v0.79.8/packages/agent/README.md#base-entry-point)。 - **Mistral 提示词缓存** - Mistral 会话现在使用提供程序端的提示词缓存,支持会话亲和性以及缓存令牌的使用/成本核算。请参阅 [API 密钥](https://github.com/earendil-works/pi/blob/v0.79.8/packages/coding-agent/docs/providers.md#api-keys) 和 [环境变量](https://github.com/earendil-works/pi/blob/v0.79.8/packages/coding-agent/docs/usage.md#environment-variables)。 - **压缩后令牌估算** - 压缩结果和压缩事件现在包含压缩后的令牌数量估算值,以便客户端可以显示上下文的大致缩减量。请参阅 [RPC compact](https://github.com/earendil-works/pi/blob/v0.79.8/packages/coding-agent/docs/rpc.md#compact) 和 [压缩事件](https://github.com/earendil-works/pi/blob/v0.79.8/packages/coding-agent/docs/rpc.md#compaction_start--compaction_end)。 - **OpenRouter Fusion 别名** - `openrouter/fusion` 现已作为内置的 OpenRouter 模型别名提供。请参阅 [API 密钥](https://github.com/earendil-works/pi/blob/v0.79.8/packages/coding-agent/docs/providers.md#api-keys)。 ### 新增 - 新增继承的 `@earendil-works/pi-ai/base` 和 `@earendil-works/pi-agent-core/base` 入口点,用于在打包应用程序中进行选择性提供程序注册 ([#5348](https://github.com/earendil-works/pi/pull/5348) by [@FredKSchott](https://github.com/FredKSchott))。 - 新增继承的 Mistral 提示词缓存功能,使用 pi 会话 ID 作为 `prompt_cache_key`,并包含缓存令牌的使用和成本核算 ([#5854](https://github.com/earendil-works/pi/issues/5854))。 - 在压缩结果和压缩事件中新增压缩后令牌数量的估算值 ([#5877](https://github.com/earendil-works/pi/issues/5877))。 - 新增继承的 OpenRouter Fusion 别名为 `openrouter/fusion` ([#5866](https://github.com/earendil-works/pi/pull/5866) by [@dannote](https://github.com/dannote))。 ### 修复 - 更新了存在安全漏洞的运行依赖项,包括 `undici` 以及打包的 `protobufjs` 传递依赖项。 - 修复了压缩逻辑,使其拒绝没有有效消息的会话,而不是生成空摘要 ([#4811](https://github.com/earendil-works/pi/issues/4811))。 - 修复了成功触发溢出的自动压缩功能,避免重试已完成的助手回复 ([#5720](https://github.com/earendil-works/pi/issues/5720))。