### 新功能
- **选择 `/share` 的上传目标**:`sessionShareDestination` 可选择 `auto`、`gist` 或 `radius`。请参阅[会话与上下文](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/settings.md#sessions-and-context)和[导出或分享会话](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/sessions.md#export-or-share-a-session)。
- **在 OpenAI GPT-6 上更改思考级别时保留缓存**:使用 API 密钥时,在会话过程中更改思考级别会保留提示词缓存。
- **Kimi Code 改用 Chat Completions**:在对话过程中新增工具不再导致提示词缓存失效。`models.json` 中覆盖的基础 URL 现在必须包含 `/v1`。请参阅[提供商](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/providers.md)。
- **无干扰地切换模型**:切换模型时会丢弃上一模型的思考内容,而不是将其作为文本显示给新模型。
- **恢复的会话会保留其已启用的工具**:`--tools +name`/`-name` 会在这些工具的基础上应用。请参阅[工具](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/settings.md#tools)。
### 新增
- 在使用 OpenAI GPT-6 模型(API 密钥)的会话过程中更改思考级别时,现在会保留提示词缓存([#10853](https://github.com/earendil-works/pi/issues/10853))
- 新增 `sessionShareDestination` 设置,用于为 `/share` 选择自动、GitHub Gist 或 Radius 上传方式([#10870](https://github.com/earendil-works/pi/issues/10870),由 [@vegarsti](https://github.com/vegarsti) 贡献)
### 变更
- 将 `kimi-coding` 提供商改为使用官方 Kimi Code 客户端所采用的 OpenAI Chat Completions 协议,端点为 `https://api.kimi.com/coding/v1`。K3、K3-256K 和 Kimi For Coding 现在支持在对话过程中新增工具,而不会导致提示词缓存失效。`models.json` 中对 `kimi-coding` 基础 URL 的覆盖现在必须包含 `/v1`([#10720](https://github.com/earendil-works/pi/issues/10720))
- 模型切换时,现在会丢弃先前由其他模型生成的助手消息中的思考块,而不是将其作为纯文本发送。此前,新模型会将旧模型的推理视为其回复的一部分,并可能开始把自己的推理写入可见答案中([#10995](https://github.com/earendil-works/pi/issues/10995))
### 修复
- 将 Pi 内部依赖项固定到确切的发布版本,以防止全新安装时混用不兼容的软件包([#10865](https://github.com/earendil-works/pi/issues/10865))
- 修复了恢复会话时丢失会话期间启用的工具的问题。恢复时现在会还原会话中的已启用工具,并在此基础上应用 `--tools +name`/`-name` 条目;但当使用带工具名称的 `--tools`、`--no-tools` 或 `--no-builtin-tools` 显式选择工具时除外([#10785](https://github.com/earendil-works/pi/issues/10785))
- 修复了在 Bun 上停止 codemode 脚本或脚本达到截止时间时,仍需等待不可中断的内置操作返回的问题([#10748](https://github.com/earendil-works/pi/issues/10748))
- 修复了 codemode 反复超时或中止时不断积累未退出工作进程的问题;任务准入机制现在会将跨会话的存活工作进程限制为两个,并在已取消的工作进程实际退出前继续将其计入数量([#10748](https://github.com/earendil-works/pi/issues/10748))
- 修复了当多个提供商均提供匹配模型时,`--model` 会按照目录顺序选择提供商的问题;Pi 现在会优先选择已配置凭据的提供商,否则会报告存在歧义。`--models` 和 `enabledModels` 会为每个提供该模型的提供商分别添加模型,并对歧义发出警告([#10160](https://github.com/earendil-works/pi/issues/10160))
- 修复了 TUI、会话树、HTML 导出和示例中,当参数为数字字符串或 null 时,`read` 行范围标签显示不正确的问题([#9887](https://github.com/earendil-works/pi/issues/9887))
- 修复了提供商切换 API 时 Nix flake 构建失败的问题:当固定的模型目录与最新发布目录中的模型 API 分组不同时,现在会从最新发布的目录刷新该固定版本;发布流程也会固定最新目录,并在打标签前使用该目录完成构建([#10985](https://github.com/earendil-works/pi/issues/10985))
- 修复了 Nix 软件包将其自带的 Node.js 放在 `PATH` 首位,导致 bash 工具 shell 使用 Pi 的 Node 而非用户的 `node`/`npm` 的问题。Pi 的 Node 现在仅作为备用([#10519](https://github.com/earendil-works/pi/issues/10519))
- 修复了提示词模板丢弃空的带引号参数(`""` 或 `''`)的问题;该问题会导致后续位置参数错位,并使位置参数默认值无法生效([#10867](https://github.com/earendil-works/pi/issues/10867))
- 修复了 Nix 软件包构建在安装检查阶段失败的问题,原因是该检查仍预期存在 Pi 已不再依赖的 chord 和 esbuild
- 修复了当字符串包含无效的 `\u` 转义(如 `\usepackage`)时,工具调用参数解析会丢弃字段的问题([#10868](https://github.com/earendil-works/pi/issues/10868))
- 修复了错误工具结果中包含图像时,Anthropic 和 Bedrock Claude 请求返回 400 的问题;这些图像现在会在该轮的工具结果之后发送,因此模型仍然可以看到它们([#10794](https://github.com/earendil-works/pi/issues/10794))
- 修复了 OpenCode Go Gemini 模型因返回 404 而失败的问题:已将 OpenCode Zen 和 OpenCode Go 迁移至 `opencode.ai/inference` 端点,并为 OpenCode Go 提供商新增 Google Generative AI 支持
- 修复了 OpenCode Go MiniMax M2.7 因“Model does not support this protocol”而失败的问题,现改用 Anthropic Messages API
- 修复了网关返回 `Unable to forward upstream stream` 错误时不会触发自动重试的问题([#10920](https://github.com/earendil-works/pi/issues/10920))
- 修复了出现 `The service is temporarily unavailable` 错误时不会触发自动重试的问题,该问题还会导致上下文压缩在首次尝试时失败([#10965](https://github.com/earendil-works/pi/issues/10965))
- 修复了 LiteLLM 等代理在同一个流数据块中发送推理和正文时,OpenAI 兼容响应会在答案之后显示思考内容的问题([#10926](https://github.com/earendil-works/pi/issues/10926))
- 修复了 Google Vertex 上的 Gemini 4 Argon 请求因“Thinking budget is not supported”而失败,以及其思考级别在 Gemini API 上被忽略的问题([#10890](https://github.com/earendil-works/pi/issues/10890))
- 修复了小米 MiMo 模型在 `minimal` 思考级别下返回 400 的问题;这些模型现在仅提供 `off` 和 `high` 两个级别([#10818](https://github.com/earendil-works/pi/issues/10818))
- 修复了 `openai-codex/gpt-6.1-sol` 使用 272K 上下文窗口,而非 Codex 目前提供的 500K 上下文窗口的问题([#10840](https://github.com/earendil-works/pi/issues/10840))
- 修复了当工具调用的最终参数为格式错误的 JSON 时,系统会静默地仅使用出错前已解析字段执行工具的问题;现在此类调用会验证失败,并向模型显示其发送的原始参数([#10897](https://github.com/earendil-works/pi/issues/10897))
- 修复了 Claude Haiku 5.5 和 Claude Opus 5 不支持 `off` 思考级别的问题([#10753](https://github.com/earendil-works/pi/issues/10753))
- 修复了扩展的 `ctx.ui.custom({ overlay: true })` 调用 `done()` 时关闭最上层叠加层而非其自身的问题;该问题会导致已完成的叠加层仍留在屏幕上,同时另一个扩展的对话框无法完成([#10648](https://github.com/earendil-works/pi/issues/10648)、[#10999](https://github.com/earendil-works/pi/pull/10999),由 [@masonc15](https://github.com/masonc15) 贡献)
### New Features
- **Choose where `/share` uploads**: `sessionShareDestination` selects `auto`, `gist`, or `radius`. See [Sessions and context](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/settings.md#sessions-and-context) and [Export or share a session](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/sessions.md#export-or-share-a-session).
- **Cache-preserving thinking level changes on OpenAI GPT-6**: changing the thinking level mid-session with an API key keeps the prompt cache.
- **Kimi Code over Chat Completions**: tools added mid-conversation no longer invalidate the prompt cache. `models.json` base URL overrides must now include `/v1`. See [Providers](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/providers.md).
- **Clean model switching**: thinking from a previous model is dropped instead of being shown to the new model as text.
- **Resumed sessions keep their active tools**: `--tools +name`/`-name` applies on top of them. See [Tools](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/settings.md#tools).
### Added
- Changing the thinking level mid-session on OpenAI GPT-6 models (API key) now keeps the prompt cache ([#10853](https://github.com/earendil-works/pi/issues/10853))
- Added the `sessionShareDestination` setting to choose automatic, GitHub gist, or Radius uploads for `/share` ([#10870](https://github.com/earendil-works/pi/issues/10870) by [@vegarsti](https://github.com/vegarsti))
### Changed
- Changed the `kimi-coding` provider to use OpenAI Chat Completions at `https://api.kimi.com/coding/v1`, the protocol used by the official Kimi Code client. K3, K3-256K, and Kimi For Coding now accept tools added mid-conversation without invalidating the prompt cache. `models.json` overrides of the `kimi-coding` base URL must now include `/v1` ([#10720](https://github.com/earendil-works/pi/issues/10720))
- Changed model switching to drop thinking blocks from earlier assistant messages produced by a different model, instead of sending them as plain text. The new model previously saw the old model's reasoning as part of its replies and could start writing its own reasoning into the visible answer ([#10995](https://github.com/earendil-works/pi/issues/10995))
### Fixed
- Pinned internal Pi dependencies to exact release versions to prevent fresh installs from mixing incompatible packages ([#10865](https://github.com/earendil-works/pi/issues/10865))
- Fixed resumed sessions dropping tools activated during the session. Resume now restores the session's active tools, with `--tools +name`/`-name` entries applied to them, unless `--tools` with tool names, `--no-tools`, or `--no-builtin-tools` selects tools explicitly ([#10785](https://github.com/earendil-works/pi/issues/10785))
- Fixed stopping a codemode script or reaching its deadline waiting for a non-interruptible built-in to return on Bun ([#10748](https://github.com/earendil-works/pi/issues/10748))
- Fixed repeated codemode timeouts or aborts accumulating surviving workers; admission now limits live workers to two across sessions, counting cancelled workers until actual exit ([#10748](https://github.com/earendil-works/pi/issues/10748))
- Fixed `--model` choosing a provider by catalog order when several providers offer the match; Pi now prefers the provider with credentials and otherwise reports the ambiguity. `--models` and `enabledModels` add a model for each provider that offers it and warn about the ambiguity ([#10160](https://github.com/earendil-works/pi/issues/10160))
- Fixed `read` line-range labels for numeric-string or null arguments in the TUI, session tree, HTML exports, and examples ([#9887](https://github.com/earendil-works/pi/issues/9887))
- Fixed the Nix flake build failing when a provider switched APIs: the model catalog pin is now refreshed from the newest published catalog when its model API groups differ, and releases pin the newest catalog and build with it before tagging ([#10985](https://github.com/earendil-works/pi/issues/10985))
- Fixed the Nix package putting its Node.js first on `PATH`, which made bash tool shells use Pi's Node instead of the user's `node`/`npm`. Pi's Node is now only a fallback ([#10519](https://github.com/earendil-works/pi/issues/10519))
- Fixed prompt templates dropping empty quoted arguments (`""` or `''`), which shifted later positional arguments and prevented positional defaults from applying ([#10867](https://github.com/earendil-works/pi/issues/10867))
- Fixed the Nix package build failing in its install check because it still expected chord and esbuild, which Pi no longer depends on
- Fixed tool-call argument parsing dropping fields when a string contains an invalid `\u` escape such as `\usepackage` ([#10868](https://github.com/earendil-works/pi/issues/10868))
- Fixed Anthropic and Bedrock Claude requests failing with a 400 when an error tool result contains images; the images are now sent after the tool results of the turn, so the model still sees them ([#10794](https://github.com/earendil-works/pi/issues/10794))
- Fixed OpenCode Go Gemini models failing with a 404 by moving OpenCode Zen and OpenCode Go to the `opencode.ai/inference` endpoints, and added Google Generative AI support to the OpenCode Go provider
- Fixed OpenCode Go MiniMax M2.7 failing with "Model does not support this protocol" by using the Anthropic Messages API
- Fixed automatic retry not triggering for gateway `Unable to forward upstream stream` errors ([#10920](https://github.com/earendil-works/pi/issues/10920))
- Fixed automatic retry not triggering for `The service is temporarily unavailable` errors, which also made compaction fail on the first attempt ([#10965](https://github.com/earendil-works/pi/issues/10965))
- Fixed OpenAI-compatible responses showing thinking after the answer when a proxy such as LiteLLM sends reasoning and content in the same stream chunk ([#10926](https://github.com/earendil-works/pi/issues/10926))
- Fixed Gemini 4 Argon requests on Google Vertex failing with "Thinking budget is not supported", and its thinking level being ignored on the Gemini API ([#10890](https://github.com/earendil-works/pi/issues/10890))
- Fixed Xiaomi MiMo models failing with a 400 at the `minimal` thinking level; they now expose only the `off` and `high` levels ([#10818](https://github.com/earendil-works/pi/issues/10818))
- Fixed `openai-codex/gpt-6.1-sol` using a 272K context window instead of the 500K window Codex now provides ([#10840](https://github.com/earendil-works/pi/issues/10840))
- Fixed tool calls whose final arguments are malformed JSON silently running with only the fields parsed before the error; they now fail validation and show the model the raw arguments it sent ([#10897](https://github.com/earendil-works/pi/issues/10897))
- Fixed Claude Haiku 5.5 and Claude Opus 5 not supporting the `off` thinking level ([#10753](https://github.com/earendil-works/pi/issues/10753))
- Fixed `done()` of an extension's `ctx.ui.custom({ overlay: true })` closing the topmost overlay instead of its own, which left the finished overlay on screen and another extension's dialog unresolved ([#10648](https://github.com/earendil-works/pi/issues/10648), [#10999](https://github.com/earendil-works/pi/pull/10999) by [@masonc15](https://github.com/masonc15))