发布日期: 2026-06-23
版本号: v0.80.0

本次更新新增了 Ctrl+J 作为默认的换行快捷键,并将提供商显示名称更改为 ZAI Coding Plan (Global)。旧的全局 API 已迁移至 @earendil-works/pi-ai/compat 入口点,现有扩展仍可运行,但新代码建议使用新的 API 并更新导入路径,兼容入口将在未来版本中移除。修复了会话名称中换行符的规范化、会话选择器的排序逻辑、扩展相关崩溃报告,以及多个继承的流式连接(如 OpenAI、Bedrock、Cloudflare)在认证、重连和元数据处理方面的问题。同时修正了 pi --resume 的主题加载和 models.json 自定义提供商的凭证验证。此外,移除了 @earendil-works/pi-ai/base@earendil-works/pi-agent-core/base 两个入口点。

更新内容 (中文)

变更

  • 新增 Ctrl+J 作为默认换行键绑定,与 Shift+Enter 并列使用。
  • 为提升清晰度,将显示的 zai 提供商标签重命名为 ZAI Coding Plan(全球版)(#5965)。
  • pi-ai 的旧版全局 API(stream/complete/completeSimplegetModel/getModels/getProvidersregisterApiProvidergetEnvApiKey 等)已从 @earendil-works/pi-ai 根入口点迁移至 @earendil-works/pi-ai/compat。扩展程序在运行时不受影响:扩展加载器会将 pi-ai 根路径解析为兼容入口点(功能严格超集),因此现有扩展将继续正常工作。针对 pi-ai 发布类型进行类型检查的扩展源代码,应将相关导入切换至 @earendil-works/pi-ai/compat(或迁移至新的 createModels()/提供商工厂 API)。兼容入口点及加载器别名将在未来版本中移除,并提供迁移指南。

修复

  • 修复会话名称在存储或显示标签前的换行符标准化处理问题 (#5999 by @haoqixu)。
  • 修复会话选择器按每个子树内任意位置的最新活动对线程化会话树进行排序的问题 (#5784 by @Perlence)。
  • 修复扩展相关崩溃及启动失败报告,建议使用 pi -ne 命令重启。
  • 修复继承的 OpenAI 响应流在缺失终止事件前失败的问题,并修复上下文使用量及压缩估算忽略截断响应后的畸形全零助手用量问题 (#5526 by @dmmulroy)。
  • 修复继承的 OpenAI Codex 响应 WebSocket 会话在输出开始前达到 OpenAI 连接限制时的重连问题 (#5973)。
  • 修复继承的 Amazon Bedrock 端点解析以遵循作用域化的 AWS_PROFILE 值。
  • 修复继承的 Cloudflare 提供商要求账户/网关配置,并通过提供商认证路由内置兼容调用。
  • 修复提供商作用域认证环境值传递至继承的 Models/ImagesModels API 调用及兼容 API 密钥注入的问题。
  • 修复继承的 OpenCode Go GLM-5.2 元数据以公开 xhigh 推理能力并发送提供商的最大推理努力级别 (#5967)。
  • 修复 pi --resume 以加载用户包主题并解析自动明暗主题设置。
  • 修复 models.json 自定义提供商,使存储的凭证无需冗余的提供商级 apiKey 即可满足认证需求 (#5953)。

移除

  • 移除继承的特定提供商入口点 @earendil-works/pi-ai/base@earendil-works/pi-agent-core/base;请改用带有显式 Models 提供商工厂的根包。

更新内容 (原始)

Changed

  • Added Ctrl+J as a default newline keybinding alongside Shift+Enter.
  • Renamed the displayed zai provider label to ZAI Coding Plan (Global) for clarity (#5965).
  • pi-ai’s old global API (stream/complete/completeSimple, getModel/getModels/getProviders, registerApiProvider, getEnvApiKey, …) moved off the @earendil-works/pi-ai root entrypoint to @earendil-works/pi-ai/compat. Extensions are not affected at runtime: the extension loader resolves the pi-ai root to the compat entrypoint (a strict superset), so existing extensions keep working unchanged. Extension sources that typecheck against pi-ai’s published types should switch those imports to @earendil-works/pi-ai/compat (or migrate to the new createModels()/provider-factory API). The compat entrypoint and the loader alias will be removed in a future release with a migration guide.

Fixed

  • Fixed session names to normalize newline characters before storing or displaying labels (#5999 by @haoqixu).
  • Fixed the session selector to order threaded session trees by the latest activity anywhere in each subtree (#5784 by @Perlence).
  • Fixed extension-related crash and startup-failure reporting to suggest restarting with pi -ne.
  • Fixed inherited OpenAI Responses streams to fail before missing terminal events and fixed context usage and compaction estimates to ignore malformed all-zero assistant usage after truncated responses (#5526 by @dmmulroy).
  • Fixed inherited OpenAI Codex Responses WebSocket sessions to reconnect once when OpenAI’s connection limit is reached before output starts (#5973).
  • Fixed inherited Amazon Bedrock endpoint resolution to honor scoped AWS_PROFILE values.
  • Fixed inherited Cloudflare providers to require account/gateway configuration and route built-in compat calls through provider auth.
  • Fixed provider-scoped auth environment values to reach inherited Models/ImagesModels API calls and compat API-key injection.
  • Fixed inherited OpenCode Go GLM-5.2 metadata to expose xhigh reasoning and send the provider’s max reasoning effort (#5967).
  • Fixed pi --resume to load user package themes and resolve automatic light/dark theme settings.
  • Fixed models.json custom providers so stored credentials can satisfy auth without a redundant provider-level apiKey (#5953).

Removed

  • Removed inherited selective-provider @earendil-works/pi-ai/base and @earendil-works/pi-agent-core/base entrypoints; use the root packages with explicit Models provider factories instead.

下载链接