Repository navigation
feat(ai): route xAI models through Responses and default to Grok 4.6 - #8124
Conversation
Jaaneek
commented
Aug 14, 2026
- send user agent from Pi, following patterns from other providers
- default responses API instead of completions API
- Change the default xAI model from Grok 4.5 to Grok 4.6.
Send built-in xAI catalog models through the Responses API with store: false and include reasoning.encrypted_content so encrypted reasoning is requested and replayed, including future models.dev additions. Thinking levels come from models.dev reasoning_options (grok-4.6 exposes xhigh); models without verified options (grok-build-0.1) keep reasoning always on and never send unsupported "none"/"minimal" efforts. Narrow the xAI provider to the Responses API, send pi's runtime User-Agent on xAI requests for provider-side attribution, and make Grok 4.6 the default xAI model.
Azure already covers the shared replay path; keep the xAI-specific include-without-effort case next to the existing request tests.
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
|
lgtm dunno why you are not in contributors yet. will have a look asap |
|
@Jaaneek approved for issues and PRs. Future issues and PRs will not be auto-closed. See CONTRIBUTING.md. |
|
On current main, grok-4.6 Completions dumps the user-facing reply into Checked this branch against the same prompt on Didn’t run a long tool-call replay to verify encrypted reasoning, but the Completions summary path is the one that’s actually broken. |
* upstream/main: (135 commits) fix(ai): retry Copilot GET /models once on 429 during login fix(ai): enable Copilot model policies sequentially during login chore: approve contributors from issue earendil-works#8124 fix(coding-agent): update Z.AI Coding Plan defaults agents: Adjust rules for changelog entries Add [Unreleased] section for next cycle Release v0.84.2 docs: audit changelogs since v0.84.1 docs: audit changelogs since v0.84.1 fix(tui): route selection copy through the host clipboard (earendil-works#8110) chore: approve contributors from issue earendil-works#8092 fix(coding-agent): use APP_NAME in user-facing messages (earendil-works#8067) fix(ai): preserve Google length stops with tool calls chore: approve contributors from issue earendil-works#8063 chore: approve contributors from issue earendil-works#8018 chore: approve contributors from issue earendil-works#8007 fix(coding-agent): collapse fallback tool output closes earendil-works#7979 fix(tui): handle generic SGR mouse releases fix(coding-agent): update vulnerable nanoid dependency chore: approve contributors from issue earendil-works#7973 ...
|
cheers |
….3 (#232) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@earendil-works/pi-coding-agent](https://github.com/earendil-works/pi) ([source](https://github.com/earendil-works/pi/tree/HEAD/packages/coding-agent)) | [`0.84.2` → `0.84.3`](https://renovatebot.com/diffs/npm/@earendil-works%2fpi-coding-agent/0.84.2/0.84.3) |  |  | --- ### Release Notes <details> <summary>earendil-works/pi (@​earendil-works/pi-coding-agent)</summary> ### [`v0.84.3`](https://github.com/earendil-works/pi/blob/HEAD/packages/coding-agent/CHANGELOG.md#0843---2026-08-24) [Compare Source](earendil-works/pi@v0.84.2...v0.84.3) ##### New Features - **PowerShell tool** — Use optional native PowerShell command execution on Windows. See [PowerShell Tool](docs/windows.md#powershell-tool). - **Safer managed updates** — Stage, verify, and atomically activate updates for installer-managed installations. See [Install and Manage](docs/packages.md#install-and-manage). - **Model and thinking controls** — Select thinking levels with `/thinking`, search defaults, keep selections session-scoped, and persist them explicitly with Ctrl+S. See [Models and Thinking](docs/keybindings.md#models-and-thinking). ##### Breaking Changes - Renamed the inherited `GoogleThinkingLevel` type to `GoogleApiThinkingLevel` and added `ResolvedGoogleThinkingLevel` for normalized adapter levels. ##### Added - Added an optional `powershell` tool for Windows, configurable through `defaultTools` and the SDK. See [PowerShell Tool](docs/windows.md#powershell-tool). - Added a `/thinking` selector and searchable default choices to the model and thinking selectors; Ctrl+S saves the selected model as the global default. See [Models and Thinking](docs/keybindings.md#models-and-thinking). - Added optional routing session IDs to exported compaction summary helpers so callers can preserve provider routing without enabling prompt cache writes. - Added usage notices for compaction and branch summaries when cache miss notices are enabled. - Added `session_compact_failed` extension events so compaction failures and aborts expose their reason, retry state, source, and error message to handlers ([#​8175](earendil-works/pi#8175)). - Added inherited provider-neutral `toolChoice` support to simple stream requests. - Added inherited automatic Anthropic server-side refusal fallback for supported first-party models, including returned-model usage pricing ([#​8017](earendil-works/pi#8017)). - Added inherited configurable OpenAI-compatible thinking-token budget fields for vLLM, Qwen/SGLang, and llama.cpp servers. See [OpenAI Compatibility](docs/models.md#openai-compatibility) ([#​8275](earendil-works/pi#8275) by [@​bnsd55](https://github.com/bnsd55)). - Added inherited China-specific ZAI Coding Plan models, including GLM-4.6V vision support and API-equivalent usage cost estimates ([#​8220](earendil-works/pi#8220)). - Added inherited `deepseek-v4-pro-0813` support to the Qwen Token Plan Individual catalog ([#​8194](earendil-works/pi#8194)). ##### Changed - Changed experimental installer-managed installations so `pi update` stages, verifies, and atomically activates the selected release in place. See [Install and Manage](docs/packages.md#install-and-manage). - Changed inherited built-in xAI models to use the Responses API with encrypted reasoning replay and made Grok 4.6 the default xAI model ([#​8124](earendil-works/pi#8124) by [@​Jaaneek](https://github.com/Jaaneek)). - Changed inherited Anthropic, Azure OpenAI, Google, Mistral, and OpenAI adapters to send Pi's default `User-Agent` unless overridden ([#​8305](earendil-works/pi#8305)). - Changed Windows and WSL keybinding defaults to avoid terminal-reserved shortcuts for image paste, model cycling, editor undo, fullscreen transcript navigation and search, and message queueing ([#​8372](earendil-works/pi#8372)). - Changed Bun release archives to ship the native clipboard binary only inside the wrapper package, removing a duplicate platform package from each archive. - Changed package resource glob expansion to use Node.js's built-in implementation with deterministic visible-path matching, reducing the installed runtime dependency tree. - Changed the bundled Node.js runtime to load jiti only when importing an extension and Babel only when uncached source needs transformation, reducing CLI startup time and bundle size. - Changed syntax highlighting to initialize only twenty common languages eagerly and defer the remaining grammars until after the initial TUI render, reducing CLI startup time. - Changed the Node.js CLI and RPC entrypoints to load a bundled runtime, reducing startup filesystem reads while keeping the public library and legacy module paths on the modular runtime for normal dependency identity. - Changed session sharing to render clickable terminal links, display only the canonical Radius artifact URL, and include the current system prompt and active tool definitions in Radius session shares. ##### Fixed - Fixed failed extension factories leaving event subscriptions, provider registrations, and default flag state active ([#​8424](earendil-works/pi#8424) by [@​acmerfight](https://github.com/acmerfight)). - Fixed `models.json` typings omitting the documented OpenAI-compatible `compat.supportsFinishReason` provider and model override ([#​8487](earendil-works/pi#8487) by [@​petrroll](https://github.com/petrroll)). - Fixed `/model` and `/thinking` selections being persisted globally unless explicitly saved with Ctrl+S ([#​5263](earendil-works/pi#5263)). - Fixed JSON and RPC `toolcall_start` events omitting the tool call id and name ([#​7953](earendil-works/pi#7953) by [@​christianklotz](https://github.com/christianklotz)). - Fixed extensions failing to load when the Node.js CLI runs as a single-executable application ([#​8237](earendil-works/pi#8237)). - Fixed nested Markdown skills inside `.agents/skills/` grouping directories not being discovered. - Fixed compaction and branch summarization requests exposing tools to providers. - Fixed single-object `edit` tool inputs failing validation by accepting them as one-edit arrays in both coding-agent and harness edit tools ([#​7835](earendil-works/pi#7835)). - Fixed root Markdown files such as `README.md` and `AGENTS.md` in skill directories being reported as broken skills unless they declare valid skill frontmatter ([#​7805](earendil-works/pi#7805)). - Fixed the default Cerebras model referencing an unavailable Z.AI model. - Fixed inherited OpenAI-compatible Chat Completions reasoning replay to preserve and resend assistant-level `reasoning_details` verbatim and in order ([#​7994](earendil-works/pi#7994)). - Fixed inherited Anthropic server-side fallback responses being priced with the requested model instead of the returned fallback model ([#​8285](earendil-works/pi#8285)). - Fixed inherited GitHub Copilot login triggering model-policy rate limits by limiting policy updates, retrying model discovery once, and honoring server retry delays ([#​7850](earendil-works/pi#7850)). - Fixed inherited Amazon Bedrock dropping and failing to replay opaque redacted reasoning from non-Anthropic models ([#​8314](earendil-works/pi#8314) by [@​seiji](https://github.com/seiji)). - Fixed inherited Z.AI Coding Plan models deriving incomplete reasoning-effort metadata, including missing GLM-5.3 low, high, and max levels ([#​8336](earendil-works/pi#8336)). - Fixed inherited DeepSeek V4 Flash on OpenCode and OpenCode Go omitting its supported low thinking level ([#​8181](earendil-works/pi#8181) by [@​tianshuang](https://github.com/tianshuang)). - Fixed inherited Azure OpenAI Responses ignoring `toolChoice` in provider-specific stream requests. - Fixed inherited Amazon Bedrock response hooks receiving only a synthesized request id instead of the raw response headers ([#​8234](earendil-works/pi#8234)). - Fixed inherited Kimi usage reporting so top-level `cached_tokens` count as cache reads instead of normal input tokens ([#​8075](earendil-works/pi#8075)). - Fixed inherited Google custom models ignoring `thinkingLevelMap`, which dropped extended thinking controls ([#​8135](earendil-works/pi#8135)). - Fixed writes to `auth.json` and `models-store.json` overriding administrator-managed file permissions and ACLs ([#​7779](earendil-works/pi#7779)). - Fixed UTF-8 BOM markers preventing frontmatter and user configuration files from loading ([#​8337](earendil-works/pi#8337)). - Fixed invalid settings files being easy to miss during interactive startup by rendering warnings with the file path inside the TUI ([#​7829](earendil-works/pi#7829)). - Fixed the subagent example repeatedly prompting before running project-local agents in trusted repositories ([#​8261](earendil-works/pi#8261)). - Added `session_compact_failed` extension events so compaction failures and aborts expose their reason, retry state, source, and error message to handlers ([#​8175](earendil-works/pi#8175)). - Fixed truncated compaction and branch summaries being persisted when generation reaches its output token limit ([#​7048](earendil-works/pi#7048)). - Fixed npm package update checks treating older registry versions as available updates, preventing `pi update` from downgrading already-newer installed packages ([#​8226](earendil-works/pi#8226)). - Fixed built-in llama.cpp models disappearing from `/model` when `/llama` refreshed a configured server under `PI_OFFLINE`, and included idle-slept `sleeping` router models plus autoloadable unloaded presets in the selectable catalog ([#​8167](earendil-works/pi#8167)). - Fixed `pi.registerFlag()` accepting default values that do not match the declared flag type ([#​8064](earendil-works/pi#8064)). - Fixed Z.AI Coding Plan defaults referencing the removed GLM-5.1 model ([#​8096](earendil-works/pi#8096)). - Fixed repeated ambiguous truncated-response recovery being mislabeled as context overflow ([#​8130](earendil-works/pi#8130)). - Fixed duplicate fullscreen right-click paste in VS Code-based terminals on Windows ([#​8186](earendil-works/pi#8186)). - Fixed inherited padded text exceeding narrow terminal widths ([#​8252](earendil-works/pi#8252)). - Fixed inherited wrapped Markdown table links leaking color into borders and neighboring cells, including tables inside blockquotes ([#​8335](earendil-works/pi#8335)). - Fixed llama.cpp login guidance to direct users to `/llama` before `/model` when no local models are loaded ([#​8203](earendil-works/pi#8203)). - Fixed hung pi.dev model catalog requests consuming the entire refresh deadline without retrying ([#​8198](earendil-works/pi#8198)). - Fixed inherited Xiaomi model catalogs listing shut-down MiMo V2 models in `/model` and `--list-models` ([#​8187](earendil-works/pi#8187)). - Fixed branch summary entries recording the navigation destination in `fromId` instead of the pre-navigation source leaf. - Fixed threshold auto-compaction being skipped when providers omit streaming usage data ([#​8328](earendil-works/pi#8328)). - Fixed dash-prefixed prompts being parsed as options by supporting `--` as an end-of-options delimiter ([#​7269](earendil-works/pi#7269)). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC40Ni40IiwidXBkYXRlZEluVmVyIjoiNDQuNDYuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
…arendil-works#8124) * feat(ai): route xAI models through Responses and default to Grok 4.6 Send built-in xAI catalog models through the Responses API with store: false and include reasoning.encrypted_content so encrypted reasoning is requested and replayed, including future models.dev additions. Thinking levels come from models.dev reasoning_options (grok-4.6 exposes xhigh); models without verified options (grok-build-0.1) keep reasoning always on and never send unsupported "none"/"minimal" efforts. Narrow the xAI provider to the Responses API, send pi's runtime User-Agent on xAI requests for provider-side attribution, and make Grok 4.6 the default xAI model. * fix(ai): drop duplicate xAI encrypted-reasoning tests Azure already covers the shared replay path; keep the xAI-specific include-without-effort case next to the existing request tests. --------- Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>
… Grok 4.6 (earendil-works/pi#8124) Cherry-picked from upstream 70e878d. Picked cleanly but npm run check failed: xai.ts now returns Provider<"openai-responses"> only, and tests/model-resolver reference grok-4.6, while the catalog data still had xai models split across openai-completions/openai-responses with no grok-4.6 entry. Regenerated the full catalog with `npx tsx scripts/generate-models.ts --strict` against live models.dev data, then kept only xai.json's grok-4.3/grok-4.5/grok-4.6/grok-build-0.1 entries (all under openai-responses, matching upstream's routing change) and reverted every other provider file and models.generated.ts to avoid unrelated catalog drift; rebuilt .manifest.json to match. grok-4.7 exists in live data but is outside this commit's scope, so it was left out. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…arendil-works#8124) * feat(ai): route xAI models through Responses and default to Grok 4.6 Send built-in xAI catalog models through the Responses API with store: false and include reasoning.encrypted_content so encrypted reasoning is requested and replayed, including future models.dev additions. Thinking levels come from models.dev reasoning_options (grok-4.6 exposes xhigh); models without verified options (grok-build-0.1) keep reasoning always on and never send unsupported "none"/"minimal" efforts. Narrow the xAI provider to the Responses API, send pi's runtime User-Agent on xAI requests for provider-side attribution, and make Grok 4.6 the default xAI model. * fix(ai): drop duplicate xAI encrypted-reasoning tests Azure already covers the shared replay path; keep the xAI-specific include-without-effort case next to the existing request tests. --------- Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>