pi v0.81.0 版本更新介绍
发布日期: 2026-07-21
版本号: v0.81.0
本次更新主要新增了本地 llama.cpp 模型管理、完整提供商扩展、Qwen Token Plan 提供商支持以及扩展的用量统计功能。在新增功能中,加入了 Qwen 套餐内置支持、获取可用思考层级命令、消息与工具生命周期事件导出,以及本地模型管理和扩展提供商注册等。修复方面则解决了依赖版本更新、远程模型目录覆盖、API 密钥凭证继承、跨提供商重放唯一性、思考层级标准化、Go 模型路由、包元数据锁文件变动、终端光标恢复、文本换行、编辑器粘贴注册、WebSocket 请求 ID、默认上下文窗口、压缩消息处理、工具错误高亮、模型目录刷新时机、会话重复读取、提示模板默认值、示例文档过期、会话成本显示及流终止重试等问题。
更新内容 (中文)
新功能
- 本地 llama.cpp 模型管理 — 连接到 llama.cpp 路由器,搜索并下载 Hugging Face 模型,支持显式加载或卸载模型并显示实时进度。详见 llama.cpp。
- 完整的提供者扩展 — 扩展程序可注册完整的 pi-ai 提供者,包括身份验证、模型刷新、过滤和自定义流式传输。详见 注册新提供者。
- 通义千问 Token 计划提供者 — 使用内置的国际及中国订阅提供者,支持区域端点和 API 密钥身份验证。详见 API 密钥。
- 扩展的使用量统计 — 工具、压缩和分支摘要的使用量将被持久化并包含在会话总计中。详见 压缩与分支摘要。
已添加
- 将通义千问 Token 计划和通义千问 Token 计划中国版添加至内置提供者设置、默认模型解析和提供者文档中 (#6858,由 @QuintinShaw 贡献)。
- 添加了
get_available_thinking_levelsRPC 命令及RpcClient.getAvailableThinkingLevels()方法 (#6865,由 @cristinaponcela 贡献)。 - 从包根目录导出了消息和工具执行生命周期事件类型 (#6772,由 @davidbrai 贡献)。
- 添加了内置的 llama.cpp 路由器支持,包括
/login连接设置和/llamaHugging Face 模型搜索与下载、显式加载、卸载及实时进度。详见 llama.cpp。 - 添加了针对完整 pi-ai 提供者的扩展注册功能,包括原生身份验证、模型刷新、过滤及流式传输行为。
- 在持久化会话、页脚总计和会话统计中添加了工具、压缩和分支摘要的使用量统计 (#6671,由 @davidbrai 贡献)。
已修复
- 更新了打包的
brace-expansion依赖项至 5.0.7 (#6896,由 @davidbrai 贡献)。 - 修复了持久化远程模型目录在升级后覆盖更新的内置目录的问题。
- 修复了继承的已存储 API 密钥凭证未能应用其提供者作用域
env值的问题,包括 Amazon Bedrock 配置文件 (#6864,由 @cristinaponcela 贡献)。 - 修复了继承的 OpenAI 兼容跨提供者重放功能,在多次调用共享提供者调用 ID 时,保持工具调用 ID 唯一性 (#6854,由 @cristinaponcela 贡献)。
- 修复了继承的 Kimi K3 思考级别,现可暴露 low、high 和 max 级别,并将
k2p7别名规范化为kimi-for-coding。 - 修复了继承的 OpenCode Go 模型通过 OpenAI Responses API 路由的问题。
- 修复了继承的
pi-ai包元数据,以避免消费者锁文件的重复更改 (#6812,由 @jmfederico 贡献)。 - 修复了继承的终端关闭功能,在恢复硬件光标前,清除编辑器的反色软件光标 (#6790,由 @dam9000 贡献)。
- 修复了继承的 ANSI 感知文本换行功能,现在能识别 CRLF 和 CR 行尾,同时保留样式 (#6764,由 @xz-dev 贡献)。
- 修复了继承的编辑器粘贴注册表在删除和撤销粘贴标记后损坏的问题,防止提交的提示中出现字面或不匹配的粘贴标记 (#6844)。
- 修复了无会话的 OpenAI Codex WebSocket 请求,使用 UUIDv7 作为请求 ID (#6834,由 @xl0 贡献)。
- 修复了继承的 GPT-5.6 Codex 模型默认使用 272K 上下文窗口,以避免自动长上下文定价 (#6853,由 @aadishv 贡献)。
- 修复了压缩期间排队的消息,以保留引导和后续交付行为 (#6730,由 @dannote 贡献)。
- 修复了读取工具的错误被语法高亮显示为文件内容的问题 (#6731,由 @dannote 贡献)。
- 修复了 llama.cpp 路由器下载进度更新,并移除了模型操作确认中的冗余措辞。
- 将自动模型目录网络刷新从启动初始化移至运行中的交互式和 RPC 模式中。
- 修复了打开持久化会话时被读取和解析两次的问题,减少了大型会话的启动延迟 (#6793)。
- 修复了所有参数的提示模板默认值(
${@:-default}和${ARGUMENTS:-default}) (#6695)。 - 修复了扩展文档中过时的自定义 UI、自定义工具和自定义编辑器示例 (#6735)。
- 修复了 Kimi Coding 会话显示与 API 等效的隐含成本及订阅指示器的问题。
- 修复了 OpenAI Responses 提前结束流时会触发自动重试而非结束智能体运行的问题 (#6727)。
更新内容 (原始)
New Features
- Local llama.cpp model management — Connect to a llama.cpp router, search and download Hugging Face models, and explicitly load or unload models with live progress. See llama.cpp.
- Full provider extensions — Extensions can register complete pi-ai providers with authentication, model refresh, filtering, and custom streaming. See Register New Provider.
- Qwen Token Plan providers — Use the built-in international and China subscription providers with regional endpoints and API-key authentication. See API Keys.
- Expanded usage accounting — Tool, compaction, and branch-summary usage is persisted and included in session totals. See Compaction & Branch Summarization.
Added
- Added Qwen Token Plan and Qwen Token Plan China to built-in provider setup, default model resolution, and provider documentation (#6858 by @QuintinShaw).
- Added the
get_available_thinking_levelsRPC command andRpcClient.getAvailableThinkingLevels()method (#6865 by @cristinaponcela). - Exported message and tool execution lifecycle event types from the package root (#6772 by @davidbrai).
- Added built-in llama.cpp router support with
/loginconnection setup and/llamaHugging Face model search and downloads, explicit loading, unloading, and live progress. See llama.cpp. - Added extension registration for complete pi-ai providers, including native authentication, model refresh, filtering, and streaming behavior.
- Added usage accounting for tools, compaction, and branch summaries in persisted sessions, footer totals, and session statistics (#6671 by @davidbrai).
Fixed
- Updated the packaged
brace-expansiondependency to 5.0.7 (#6896 by @davidbrai). - Fixed persisted remote model catalogs from overriding newer bundled catalogs after an upgrade.
- Fixed inherited stored API-key credentials to apply their provider-scoped
envvalues, including Amazon Bedrock profiles (#6864 by @cristinaponcela). - Fixed inherited OpenAI-compatible cross-provider replay to keep tool call IDs unique when multiple calls share a provider call ID (#6854 by @cristinaponcela).
- Fixed inherited Kimi K3 thinking levels to expose low, high, and max, and normalized the
k2p7alias tokimi-for-coding. - Fixed inherited OpenCode Go models routed through the OpenAI Responses API.
- Fixed inherited
pi-aipackage metadata to avoid repeated consumer lockfile changes (#6812 by @jmfederico). - Fixed inherited terminal shutdown to clear the editor’s inverted software cursor before restoring the hardware cursor (#6790 by @dam9000).
- Fixed inherited ANSI-aware text wrapping to recognize CRLF and CR line endings while preserving styles (#6764 by @xz-dev).
- Fixed inherited editor paste registry corruption after deleting and undoing paste markers, preventing literal or mismatched paste markers in submitted prompts (#6844).
- Fixed sessionless OpenAI Codex WebSocket requests to use UUIDv7 request IDs (#6834 by @xl0).
- Fixed inherited GPT-5.6 Codex models to default to the 272K context window, avoiding automatic long-context pricing (#6853 by @aadishv).
- Fixed messages queued during compaction to preserve steering and follow-up delivery behavior (#6730 by @dannote).
- Fixed read tool errors being syntax-highlighted as if they were file contents (#6731 by @dannote).
- Fixed llama.cpp router download progress updates and removed redundant wording from model action confirmations.
- Moved automatic model catalog network refresh out of startup initialization and into the running interactive and RPC modes.
- Fixed persisted sessions being read and parsed twice when opened, reducing startup latency for large sessions (#6793).
- Fixed prompt-template defaults for all arguments (
${@:-default}and${ARGUMENTS:-default}) (#6695). - Fixed obsolete custom UI, custom tool, and custom editor examples in the extension documentation (#6735).
- Fixed Kimi Coding sessions to show API-equivalent implied costs with the subscription indicator.
- Fixed OpenAI Responses early stream endings to trigger automatic retry instead of ending the agent run (#6727).