← 返回更新日志

Pi v1.0.1

2026-10-03 · GitHub 原文
### 新功能 - **Nix flake** — `nix run github:earendil-works/pi/stable` 可运行最新版本,`nix profile add github:earendil-works/pi/stable` 可安装该版本。请参阅[安装 pi](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/quickstart.md#1-install-pi)。 - **MCP 服务器的项目级覆盖配置** — `.pi/mcp.json` 和 `/mcp` 可以针对单个项目启用、禁用用户级服务器,或更改其暴露设置。请参阅[配置服务器](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/mcp.md#configure-servers)。 - **MCP 客户端 ID 元数据文档** — `oauth.clientRegistration: "cimd"` 允许授权服务器通过 pi 的文档 URL 放行 pi,无需动态注册。请参阅[使用 OAuth 进行身份验证](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/mcp.md#authenticate-with-oauth)。 - **适用于任意工具的工具渲染器** — `pi.registerToolRenderer()` 可渲染尚未注册的工具调用,例如恢复会话中的 MCP 工具。请参阅[工具渲染](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/extensions.md#tool-rendering)。 - **Cloudflare Clef 分类器** — `@cf/cloudflare/clef` 和 `@cf/cloudflare/clef-flash` 可用于 codemode 脚本和扩展。请参阅[使用分类器模型](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/models.md#use-classifier-models)。 ### 新增 - 在 `/login`、`/mcp` 和 `/mcp login` 的 OAuth 登录界面中新增了复制快捷键(`app.message.copy`,默认为 `ctrl+x`)。当无法打开浏览器或无法选中换行显示的链接时,可使用该快捷键复制登录 URL。 - 为 MCP 服务器新增了 `oauth.clientRegistration: "cimd"`。该配置使用托管在 pi.dev 上的客户端 ID 元数据文档来标识 pi,而不再使用动态客户端注册,使授权服务器可以通过 URL 放行 pi([#10302](https://github.com/earendil-works/pi/issues/10302)) - 新增了用户级 MCP 服务器的项目级覆盖配置:`.pi/mcp.json` 中不含 `command` 或 `url` 的条目仅设置用户级服务器的 `enabled`、`exposure` 和 `toolExposure`;`/mcp` 也可以为当前项目启用或禁用服务器([#10277](https://github.com/earendil-works/pi/issues/10277)) - 在 `cloudflare-workers-ai` 中新增了 Cloudflare 的 Clef 和 Clef Flash 分类器模型,可用于 codemode 脚本和扩展(由 [@ndisidore](https://github.com/ndisidore) 提交的 [#10316](https://github.com/earendil-works/pi/pull/10316),由 [@RealAlexandreAI](https://github.com/RealAlexandreAI) 提交的 [#10322](https://github.com/earendil-works/pi/pull/10322)) - 新增了 `pi.registerToolRenderer()`,用于决定如何渲染工具调用,包括尚未注册的工具([#10285](https://github.com/earendil-works/pi/issues/10285)) - 为 macOS 和 Linux 新增了 Nix flake:`nix run github:earendil-works/pi/stable` 可运行最新版本,`nix profile add github:earendil-works/pi/stable` 可安装该版本。请参阅[安装 pi](https://github.com/earendil-works/pi/blob/v1.0.1/packages/coding-agent/docs/quickstart.md#1-install-pi)([#9137](https://github.com/earendil-works/pi/pull/9137)) ### 变更 - 现在,在通过 npm 全局安装的 pi 中执行 `pi update` 时,会建议迁移到由 pi.dev 安装程序管理的安装方式,该方式会锁定所有依赖项。 - 现在,对话过程中新增或重新定义的 Anthropic 工具会以内联方式定义在对话中,因此使用相同名称重新定义工具时可以保留提示词缓存,而无需重新发送完整的工具列表。 ### 修复 - 修复了安装过程解析到存在漏洞的 `brace-expansion` 5.0.9 的问题,现将 `brace-expansion` 5.0.12 固定为直接依赖项(GHSA-q2hr-2g5m-vwhr、GHSA-qhr7-859c-m2p7、GHSA-6j4f-fj2g-mc7p)([#10288](https://github.com/earendil-works/pi/issues/10288)) - 修复了 `--models` 末尾的逗号会向模型循环列表中额外添加一个模型的问题([#10334](https://github.com/earendil-works/pi/issues/10334)) - 修复了循环打印内容的 `codemode` 脚本因耗尽内存而导致 pi 崩溃的问题:当脚本输出超过 1600 万个字符或 100000 个项目时,脚本将失败([#10283](https://github.com/earendil-works/pi/issues/10283)) - 修复了扩展通过 `Image` 渲染的 JPEG、GIF 和 WebP 图像无法在 Kitty、Ghostty、WezTerm 和 Warp 中显示的问题([#10292](https://github.com/earendil-works/pi/issues/10292)) - 修复了恢复会话和 HTML 导出中的 MCP 工具调用在其服务器连接前始终以完全展开状态渲染,以及服务器始终无法连接时永久保持完全展开的问题([#10285](https://github.com/earendil-works/pi/issues/10285)) - 修复了 WezTerm 中全屏 Kitty 图像在滚动后折叠成单行条带的问题([#10319](https://github.com/earendil-works/pi/issues/10319)) - 修复了提供商返回“Selected model is at capacity”错误时直接结束当前轮次而不重试的问题([#10278](https://github.com/earendil-works/pi/issues/10278)) - 修复了 Cloudflare AI Gateway Claude 模型因返回 404 而失败的问题,现改用带连字符的模型 ID(使用 `claude-opus-5-5`,而不是 `claude-opus-5.5`) - 修复了当“使用 ChatGPT 登录”的回调端口被另一个登录流程占用时仍继续执行,导致浏览器显示“OAuth state mismatch”的问题;现在会报告端口已被占用的错误([#10265](https://github.com/earendil-works/pi/issues/10265)) - 修复了 Amazon Bedrock OpenAI 模型对输入 token 超过 272k 的请求仍按短上下文费率计费的问题;Bedrock 模型现在包含 models.dev 上列出的分级定价([#10326](https://github.com/earendil-works/pi/issues/10326)) - 修复了系统提示词或工具发生变化后,Amazon Bedrock Claude 请求因“Invalid `signature` in `thinking` block”错误而失败的问题([#10324](https://github.com/earendil-works/pi/issues/10324)) - 修复了 Together 将 DeepSeek V4 Pro 重命名为 `deepseek-ai/DeepSeek-V4-Pro-0813` 后,该模型丢失思考级别控制的问题(由 [@cv](https://github.com/cv) 提交的 [#10336](https://github.com/earendil-works/pi/pull/10336)) - 修复了默认 NVIDIA 模型指向 NVIDIA 已不再提供的 `nvidia/nemotron-3-super-120b-a12b` 的问题;默认模型现为 `nvidia/nemotron-3-ultra-550b-a55b` ### 移除 - 从发布的软件包中移除了 `npm-shrinkwrap.json`。npm 安装不再锁定传递依赖项,库使用者现在可以覆盖这些依赖项。如需锁定依赖项的安装方式,请使用 pi.dev 安装程序([#5653](https://github.com/earendil-works/pi/issues/5653))