piagent_
← /news
Nov 20, 2026community

thirteen fixes land in pi on November 20, v1.6.0's day: gateway retries and Bedrock SSO through a proxy on the provider side, Decisions cache tokens, session loading after compaction, and Gemini 3+ detection for prefixed Google model IDs

Thirteen pull requests merged into pi on November 20 — the day v1.6.0 shipped at 11:35 UTC. Five landed before the release (#12134, #12347, #12348, #12349, #12351) and eight after (#12352, #12355, #12358, #12360, #12366, #12370, #12365, #12371); every one is a fix, spread across the ai, coding-agent, tui, and p2 packages. Whether the five pre-release merges rode the v1.6.0 cut is not determined here — the release notes’ Fixed section mostly carries issue numbers rather than PR numbers, and this entry does not diff the tag — so the per-PR details below stand on their own merge facts. The running tally: 143 merges since v1.5.0 through November 19’s entry, plus these 13, for 156; 89 are verified inside v1.5.1 and v1.5.2, and the remaining 67’s v1.6.0 membership is not determined here (the release notes credit several of them by PR number) — the eight post-release merges are certainly main-only by this entry’s window.

The provider-side fixes open with #12134: on the chat-completions API, pi’s openai-completions provider sent every reasoning model’s system messages with the developer role unless the catalog opted out — developer is OpenAI’s role, and other hosts’ chat templates reject it, Groq’s qwen/qwen3.8-27b failing the first message with 400: minijinja: rendering failed: raise_exception: Unexpected message role. (#10741). The default instruction role is now system. #12352 extends auto-retry to OpenRouter-style gateways that report errors as a mid-stream SSE event: error frame with no HTTP status — texts like “The provider is temporarily unavailable. Retry shortly.” and “The provider ended the response before it was complete.” matched none of isRetryableAssistantError’s patterns, so auto-retry never fired. #12365 routes Bedrock SSO credential fetches through HTTPS_PROXY: the Bedrock runtime client already got a proxy-aware NodeHttpHandler, but the SSO credential chain built its own SSOClient and SSOOIDCClient from clientConfig without inheriting that handler, so GetRoleCredentials and token refresh went direct and failed on proxy-only networks. #12371 closes #12321 by fixing Gemini 3+ detection for prefixed Google model IDs: the adapters keyed Gemini 3+ behavior off IDs starting with gemini-N, so a served ID like randomprefix-gemini-4-argon was treated as an older Gemini — no strict tools (strict: "prefer" fell back, strict: "require" failed), no tool-call IDs, tool-result images in a separate user turn — while the thinking-level check already matched the ID anywhere, giving the same model Gemini 3+ thinking with pre-3 tool handling; the PR also adds a compat.supportsStrictMode flag.

Three of the fixes are about seeing costs and output correctly. #12358 makes parseClassifierUsage() (packages/ai/src/api/classifier-shared.ts) report the OpenAI Decisions API’s cached_tokens and cache_write_tokens as cacheRead and cacheWrite — both were already inside input_tokens, but the parser ignored them and reported cacheRead: 0, cacheWrite: 0, counting every gpt-6-luna classifier token as uncached input. #12355 handles bash output ending with an over-50KB line followed by a blank line: such output came back as (no output), and past ~200KB as newlines only, while the log file was fine — #12092 had fixed the single-trailing-newline case and left this one, with truncateTail() the first of two causes the PR names. #12347 keeps unscoped highlighted text readable in tool previews: the shared syntax highlighter colored keywords and numbers but emitted unscoped text without a foreground, so identifiers and punctuation inherited the terminal’s default and vanished on contrasting themes; previews now apply pi’s theme foreground, the same fix v1.6.0’s notes carry for unscoped syntax-highlighted text.

The remaining six touch ai, the TUI, sessions, and p2. #12366 stops createProvider providers with fetchModels from re-merging the baseline and fetched catalogs on every getModels()/getAllModels() call — the merge ran per read with a findIndex per fetched model, making Models.getModel() lookups quadratic in catalog size — and now runs once in the two publish callbacks through a type+id index. #12348 releases the abort listener a completed retry backoff leaves attached — { once: true } only removes it on abort, so each completed backoff leaked a listener onto the caller’s signal. #12349 repaints the editor after extension ctx.ui.pasteToEditor() and ctx.ui.setEditorText() calls made outside the input loop — after an await or in a timer, the text changed but nothing repainted until the next key press. #12370 fixes #12279 by moving a repeated prompt to the front of the editor history instead of duplicating it: tree navigation re-populates history with populateHistory: true and addToHistory only skipped a repeat of the most recent entry, so navigating back to p4 turned p5 p4 p3 p2 p1 into p3 p2 p1 p5 p4 p3 p2 p1. #12360 fixes a RangeError: Maximum call stack size exceeded when loading sessions whose branch carries roughly 120k or more entries after the last compaction: buildContextEntries spread them into contextEntries.push(...) as separate arguments. #12351, the day’s one p2 fix, resets text-underline-offset to auto for links in Elanor Markdown — p2’s base rule pushed the underline 3px below the font’s own position, against the next line’s text.

All thirteen are fixes; the per-PR details above are written from the PR bodies, and the merge list behind the source link is the count’s source. The eight post-release merges are on main only as of this entry’s window.

source: https://github.com/earendil-works/pi/pulls?q=is%3Apr+is%3Aclosed+merged%3A2026-11-20T00%3A00%3A00Z..2026-11-21T00%3A00%3A00Z