### 新功能
- **本地 llama.cpp 模型管理** — 连接到 llama.cpp 路由器,搜索并下载 Hugging Face 模型,并支持带实时进度的显式加载或卸载模型。详见 [llama.cpp](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/llama-cpp.md)。
- **完整的提供商扩展** — 扩展程序可以注册完整的 pi-ai 提供商,支持身份验证、模型刷新、过滤和自定义流式传输。详见 [注册新提供商](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/custom-provider.md#register-new-provider)。
- **Qwen Token Plan 提供商** — 使用内置的国际和中国订阅提供商,支持区域端点和 API 密钥身份验证。详见 [API 密钥](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/providers.md#api-keys)。
- **扩展的使用量统计** — 工具、压缩和分支摘要的使用量已持久化并计入会话总计。详见 [压缩与分支摘要](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/compaction.md)。
### 新增
- 将 Qwen Token Plan 和 Qwen Token Plan China 添加到内置提供商设置、默认模型解析和提供商文档中 ([#6858](https://github.com/earendil-works/pi/pull/6858) by [@QuintinShaw](https://github.com/QuintinShaw))。
- 添加了 `get_available_thinking_levels` RPC 命令和 `RpcClient.getAvailableThinkingLevels()` 方法 ([#6865](https://github.com/earendil-works/pi/pull/6865) by [@cristinaponcela](https://github.com/cristinaponcela))。
- 从包根目录导出了消息和工具执行生命周期事件类型 ([#6772](https://github.com/earendil-works/pi/pull/6772) by [@davidbrai](https://github.com/davidbrai))。
- 添加了内置 llama.cpp 路由器支持,包含 `/login` 连接设置和 `/llama` Hugging Face 模型搜索与下载、显式加载/卸载及实时进度。详见 [llama.cpp](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/llama-cpp.md)。
- 添加了完整 pi-ai 提供商的扩展注册功能,包括原生身份验证、模型刷新、过滤和流式传输行为。
- 在持久化会话、页脚总计和会话统计中添加了工具、压缩和分支摘要的使用量统计 ([#6671](https://github.com/earendil-works/pi/pull/6671) by [@davidbrai](https://github.com/davidbrai))。
### 修复
- 将打包的 `brace-expansion` 依赖项更新为 5.0.7 ([#6896](https://github.com/earendil-works/pi/pull/6896) by [@davidbrai](https://github.com/davidbrai))。
- 修复了升级后持久化的远程模型目录覆盖较新的内置目录的问题。
- 修复了继承的存储 API 密钥凭据以应用其提供商范围的 `env` 值,包括 Amazon Bedrock 配置文件 ([#6864](https://github.com/earendil-works/pi/pull/6864) by [@cristinaponcela](https://github.com/cristinaponcela))。
- 修复了继承的 OpenAI 兼容跨提供商重放,当多个调用共享提供商调用 ID 时,确保工具调用 ID 唯一 ([#6854](https://github.com/earendil-works/pi/pull/6854) by [@cristinaponcela](https://github.com/cristinaponcela))。
- 修复了继承的 Kimi K3 思考级别,以暴露 low、high 和 max,并将 `k2p7` 别名规范化为 `kimi-for-coding`。
- 修复了通过 OpenAI Responses API 路由的继承 OpenCode Go 模型。
- 修复了继承的 `pi-ai` 包元数据,以避免重复更改消费者 lockfile ([#6812](https://github.com/earendil-works/pi/pull/6812) by [@jmfederico](https://github.com/jmfederico))。
- 修复了继承的终端关闭逻辑,在恢复硬件光标之前清除编辑器的反色软件光标 ([#6790](https://github.com/earendil-works/pi/pull/6790) by [@dam9000](https://github.com/dam9000))。
- 修复了继承的 ANSI 感知文本换行,在保留样式的同时识别 CRLF 和 CR 换行符 ([#6764](https://github.com/earendil-works/pi/pull/6764) by [@xz-dev](https://github.com/xz-dev))。
- 修复了继承的编辑器粘贴注册表在删除和撤销粘贴标记后损坏的问题,防止提交的提示词中出现字面或错配的粘贴标记 ([#6844](https://github.com/earendil-works/pi/issues/6844))。
- 修复了无会话的 OpenAI Codex WebSocket 请求以使用 UUIDv7 请求 ID ([#6834](https://github.com/earendil-works/pi/pull/6834) by [@xl0](https://github.com/xl0))。
- 修复了继承的 GPT-5.6 Codex 模型默认使用 272K 上下文窗口,避免自动触发长上下文定价 ([#6853](https://github.com/earendil-works/pi/pull/6853) by [@aadishv](https://github.com/aadishv))。
- 修复了压缩期间排队消息的指令引导与后续投递行为 ([#6730](https://github.com/earendil-works/pi/pull/6730) by [@dannote](https://github.com/dannote))。
- 修复了读取工具错误被语法高亮显示为文件内容的问题 ([#6731](https://github.com/earendil-works/pi/pull/6731) by [@dannote](https://github.com/dannote))。
- 修复了 llama.cpp 路由器下载进度更新,并删除了模型操作确认中的冗余措辞。
- 将自动模型目录网络刷新从启动初始化移至运行中的交互和 RPC 模式。
- 修复了打开持久化会话时被读取并解析两次的问题,减少了大型会话的启动延迟 ([#6793](https://github.com/earendil-works/pi/issues/6793))。
- 修复了所有参数的提示模板默认值(`${@:-default}` 和 `${ARGUMENTS:-default}`)([#6695](https://github.com/earendil-works/pi/issues/6695))。
- 修复了扩展文档中过时的自定义 UI、自定义工具和自定义编辑器示例 ([#6735](https://github.com/earendil-works/pi/issues/6735))。
- 修复了 Kimi Coding 会话以订阅指示器显示 API 等效的隐含成本。
- 修复了 OpenAI Responses 流式响应过早中断的问题,改为触发自动重试而非直接结束代理运行([#6727](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/llama-cpp.md).
- **Full provider extensions** — Extensions can register complete pi-ai providers with authentication, model refresh, filtering, and custom streaming. See [Register New Provider](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/custom-provider.md#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](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/providers.md#api-keys).
- **Expanded usage accounting** — Tool, compaction, and branch-summary usage is persisted and included in session totals. See [Compaction & Branch Summarization](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/compaction.md).
### Added
- Added Qwen Token Plan and Qwen Token Plan China to built-in provider setup, default model resolution, and provider documentation ([#6858](https://github.com/earendil-works/pi/pull/6858) by [@QuintinShaw](https://github.com/QuintinShaw)).
- Added the `get_available_thinking_levels` RPC command and `RpcClient.getAvailableThinkingLevels()` method ([#6865](https://github.com/earendil-works/pi/pull/6865) by [@cristinaponcela](https://github.com/cristinaponcela)).
- Exported message and tool execution lifecycle event types from the package root ([#6772](https://github.com/earendil-works/pi/pull/6772) by [@davidbrai](https://github.com/davidbrai)).
- Added built-in llama.cpp router support with `/login` connection setup and `/llama` Hugging Face model search and downloads, explicit loading, unloading, and live progress. See [llama.cpp](https://github.com/earendil-works/pi/blob/v0.81.0/packages/coding-agent/docs/llama-cpp.md).
- 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](https://github.com/earendil-works/pi/pull/6671) by [@davidbrai](https://github.com/davidbrai)).
### Fixed
- Updated the packaged `brace-expansion` dependency to 5.0.7 ([#6896](https://github.com/earendil-works/pi/pull/6896) by [@davidbrai](https://github.com/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 `env` values, including Amazon Bedrock profiles ([#6864](https://github.com/earendil-works/pi/pull/6864) by [@cristinaponcela](https://github.com/cristinaponcela)).
- Fixed inherited OpenAI-compatible cross-provider replay to keep tool call IDs unique when multiple calls share a provider call ID ([#6854](https://github.com/earendil-works/pi/pull/6854) by [@cristinaponcela](https://github.com/cristinaponcela)).
- Fixed inherited Kimi K3 thinking levels to expose low, high, and max, and normalized the `k2p7` alias to `kimi-for-coding`.
- Fixed inherited OpenCode Go models routed through the OpenAI Responses API.
- Fixed inherited `pi-ai` package metadata to avoid repeated consumer lockfile changes ([#6812](https://github.com/earendil-works/pi/pull/6812) by [@jmfederico](https://github.com/jmfederico)).
- Fixed inherited terminal shutdown to clear the editor's inverted software cursor before restoring the hardware cursor ([#6790](https://github.com/earendil-works/pi/pull/6790) by [@dam9000](https://github.com/dam9000)).
- Fixed inherited ANSI-aware text wrapping to recognize CRLF and CR line endings while preserving styles ([#6764](https://github.com/earendil-works/pi/pull/6764) by [@xz-dev](https://github.com/xz-dev)).
- Fixed inherited editor paste registry corruption after deleting and undoing paste markers, preventing literal or mismatched paste markers in submitted prompts ([#6844](https://github.com/earendil-works/pi/issues/6844)).
- Fixed sessionless OpenAI Codex WebSocket requests to use UUIDv7 request IDs ([#6834](https://github.com/earendil-works/pi/pull/6834) by [@xl0](https://github.com/xl0)).
- Fixed inherited GPT-5.6 Codex models to default to the 272K context window, avoiding automatic long-context pricing ([#6853](https://github.com/earendil-works/pi/pull/6853) by [@aadishv](https://github.com/aadishv)).
- Fixed messages queued during compaction to preserve steering and follow-up delivery behavior ([#6730](https://github.com/earendil-works/pi/pull/6730) by [@dannote](https://github.com/dannote)).
- Fixed read tool errors being syntax-highlighted as if they were file contents ([#6731](https://github.com/earendil-works/pi/pull/6731) by [@dannote](https://github.com/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](https://github.com/earendil-works/pi/issues/6793)).
- Fixed prompt-template defaults for all arguments (`${@:-default}` and `${ARGUMENTS:-default}`) ([#6695](https://github.com/earendil-works/pi/issues/6695)).
- Fixed obsolete custom UI, custom tool, and custom editor examples in the extension documentation ([#6735](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/issues/6727)).