← 返回更新日志

Pi v0.78.1

2026-06-04 · GitHub 原文
### 新功能 - **更全面的内置提供商覆盖** - 新增了 Ant Ling 和 NVIDIA NIM 提供商的配置说明,并为直接 MiniMax 提供商添加了 MiniMax-M3 支持。详见 [Providers](https://github.com/earendil-works/pi/blob/v0.78.1/packages/coding-agent/docs/providers.md)。 - **更丰富的扩展上下文** - 扩展程序现在可以使用 `ctx.mode` 和 `ctx.getSystemPromptOptions()` 来适配 TUI、RPC、JSON 和 print 模式下的行为,并检查基础系统提示词输入。详见 [Extensions](https://github.com/earendil-works/pi/blob/v0.78.1/packages/coding-agent/docs/extensions.md)。 ### 新增 - 新增容器化文档以及 Gondolin 扩展示例,用于将内置工具路由到本地微虚拟机。 - 新增 Ant Ling 提供商的选择与配置文档。 - 为 `minimax` 和 `minimax-cn` 直接提供商新增 MiniMax-M3 模型支持(继承自 `@earendil-works/pi-ai`)([#5313](https://github.com/earendil-works/pi/issues/5313))。 - 新增 NVIDIA NIM 提供商的选择、配置文档,以及直接 NIM 请求的归属标头。 - 在扩展上下文中新增 `ctx.mode`,使扩展能够区分 TUI、RPC、JSON 和 print 模式。 - 为扩展命令新增 `ctx.getSystemPromptOptions()`,用于检查当前基础系统提示词输入 ([#5306](https://github.com/earendil-works/pi/pull/5306),由 [@xl0](https://github.com/xl0) 贡献)。 ### 修复 - 修复临时扩展包安装问题,现使用权限为 `0700` 的私有目录 `~/.pi/agent/tmp/extensions`,替代原来的 `os.tmpdir()/pi-extensions`。 - 修复 git 包源处理逻辑,拒绝不安全的 host/path 组件,并确保受管理的克隆路径保留在安装根目录内。 - 修复 HTML 会话导出中的存储型 XSS 漏洞,在去除控制字符后,使用协议白名单对 Markdown 链接和图片 URL 进行清理。 - 修复在捆绑 Node 应用中,当 `package.json` 未与捆绑入口点并列时,SDK 嵌入会因 `ENOENT` 错误而失败的问题。包元数据读取器现在能优雅地处理缺失 `package.json` 的情况(使用默认值),使 `createAgentSession()` 在运行时不再依赖包相邻文件 ([#5226](https://github.com/earendil-works/pi/issues/5226))。 - 修复非 Codex 提供商(例如通过 OpenAI 兼容 API 的 llama.cpp)未遵循 HTTP 超时设置的问题。`httpIdleTimeoutMs` 设置(通过 `/settings` HTTP 超时配置)现在作为所有支持该设置的提供商的默认 SDK 请求超时时间,而不仅限于 OpenAI Codex Responses。禁用超时(HTTP 超时 = false)现在通过发送最大 int32 值(相当于无限)而非 0 来正确禁用所有支持提供商的 SDK 超时(因为 SDK 将 timeout=0 视为立即超时)([#5294](https://github.com/earendil-works/pi/issues/5294))。 - 修复继承的 Amazon Bedrock 请求,将空白的必填用户/工具结果文本替换为占位符,并跳过空白的重放文本块 ([#4975](https://github.com/earendil-works/pi/issues/4975))。 - 修复继承的 Anthropic Claude Opus 4.7+ 请求,以屏蔽已弃用的 temperature 参数 ([#5251](https://github.com/earendil-works/pi/pull/5251),由 [@yzhg1983](https://github.com/yzhg1983) 贡献)。 - 修复继承的 OpenAI GPT-5.5 生成的元数据,移除不支持的 minimal thinking 字段 ([#5243](https://github.com/earendil-works/pi/issues/5243))。 - 修复继承的 OpenRouter Kimi K2.6 思考过程重放及开发者角色指令处理 ([#5309](https://github.com/earendil-works/pi/issues/5309))。 - 修复继承的 OpenRouter 推理指令请求,在需要时保留 system 角色 ([#5221](https://github.com/earendil-works/pi/pull/5221),由 [@PriNova](https://github.com/PriNova) 贡献)。 - 修复继承的覆盖层焦点恢复问题,使非捕获型覆盖层在 UI 重新渲染和显式释放焦点后仍能保持交互 ([#5235](https://github.com/earendil-works/pi/pull/5235),由 [@nicobailon](https://github.com/nicobailon) 贡献)。 - 修复继承的列切片和覆盖层合成中的制表符宽度计算,确保包含制表符的输出不会超出终端宽度 ([#5218](https://github.com/earendil-works/pi/issues/5218))。 - 修复打开和列出超大 JSONL 会话文件的问题,改为逐行读取会话条目,而非将整个文件加载为单个字符串 ([#5231](https://github.com/earendil-works/pi/issues/5231))。 - 修复 WSL `/mnt/...` 仓库中页脚分支显示的问题,使其在分支变更后刷新 ([#5264](https://github.com/earendil-works/pi/pull/5264),由 [@psoukie](https://github.com/psoukie) 贡献)。 - 修复 `renderShell: "self"` 工具渲染器在无组件行输出时留下空白聊天行的问题 ([#5299](https://github.com/earendil-works/pi/issues/5299))。 - 恢复继承的 NVIDIA Qwen 3.5 122B NIM 模型支持。