Pi 0.85.1
New Features
- GPT-6 Astra — Available through OpenAI API keys and OpenAI Codex subscriptions. See API Keys and OpenAI Codex.
The upstream Pi release archive. For PiG’s story and philosophy, visit the Blog.
SessionManager.inMemory() support for restoring externally managed session entries (#8980 by @y-nk).vllmPriority and supportsMaxOutputTokens model settings for vLLM scheduler priority and OpenAI Responses output-token limits (#9004 by @AppleDannyClegg, #8941 by @scturtle).tui.altScreen.bottom shortcut to the fullscreen transcript while it is scrolled up (#9080 by @rwachtler).ctx.ui prompts. See Extension UI prompt events.clear_queue. See RPC clear_queue.supportsMidConvoEffort to custom Anthropic Messages model compatibility settings.ui_prompt_start and ui_prompt_end extension events so host integrations can distinguish active agent work from waiting on user-facing ctx.ui prompts (#8355 by @cristinaponcela).detectSupportedImageMimeTypeFromFile() to the public library exports (#8600 by @xl0).deepseek-v4-flash-vision-exp model support.clear_queue to retrieve and remove queued steering and follow-up messages (#8432).fullscreenCopyOnSelect to disable automatic fullscreen selection copy; when disabled, Ctrl+X copies the active text selection before falling back to the last assistant message, while /tree still copies the selected message (#7720).scrollbarTrack and scrollbarThumb theme colors with muted and text fallbacks, keep one thumb color across normal and expanded states, and support track-click jumping./thinking, /model, /scoped-models, /trust, per-model thinking settings, and theme settings to keep active options marked while browsing. /scoped-models now uses consistent per-item toggles and strikes through unavailable models (#8900)./thinking, search defaults, keep selections session-scoped, and persist them explicitly with Ctrl+S. See Models and Thinking.GoogleThinkingLevel type to GoogleApiThinkingLevel and added ResolvedGoogleThinkingLevel for normalized adapter levels.powershell tool for Windows, configurable through defaultTools and the SDK. See PowerShell Tool./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.session_compact_failed extension events so compaction failures and aborts expose their reason, retry state, source, and error message to handlers (#8175).toolChoice support to simple stream requests.deepseek-v4-pro-0813 support to the Qwen Token Plan Individual catalog (#8194).pi update stages, verifies, and atomically activates the selected release in place. See Install and Manage.User-Agent unless overridden (#8305).Ctrl+Shift+F, incremental match highlighting, configurable search match theme colors, and next/previous navigation with Enter/Ctrl+G and Shift+Enter/Ctrl+Shift+G.read, bash, edit, and write tools under PI_EXPERIMENTAL=1.defaultTools setting for configuring the initial built-in tool selection globally or per project.--use-theme <name[/name]> to choose an initial per-run interactive theme without changing saved settings (#7722 by @rwachtler).expandPromptTemplates to extension pi.sendUserMessage() options for explicitly dispatching commands and expanding skills and prompt templates. See pi.sendUserMessage() (#7857 by @mrexodia).createGatewayBindingFetch() for routing Cloudflare AI Gateway requests through a Workers AI binding without an API token (#7901 by @Maximo-Guk).AssistantMessage.endTurn to preserve OpenAI Codex's terminal end_turn signal for diagnostics (#7766).User-Agent header.AI_AGENT=pi process marker and how it differs from PI_CODING_AGENT=true (#7747).additional_tools where supported while retaining tool-search and top-level fallbacks (#7709).pi auth check to verify provider or model credentials, optionally emitting the resolved credential.tool_call handlers can stop all-terminating batches without another model call. See Tool Events.QWEN_TOKEN_PLAN_API_KEY. See API Keys (#7659 by @arasovic).pi auth check provider/model auth preflight with optional credential output (#7152).terminate support to blocked extension tool_call events so all-terminating batches can skip the automatic follow-up model call. See Tool Events (#7715 by @muyiyr).PI_* environment guideline in an attempt to reduce unnecessary inspection commands (#7128).AGENTS.override.md to replace context files for a specific directory. See Context Files.samplingParams and opt-in vLLM thinking_token_budget values. See Sampling Parameters.ModelsStreamTransforms interface to ModelsRequestTransforms because its header transformation now applies to all authenticated provider requests.message_update events to emit only assistantMessageEvent deltas, removing the cumulative message and assistantMessageEvent.partial fields that caused quadratic output growth. Clients that need partial messages must assemble deltas between message_start and message_end; the latter remains authoritative (#7290).ModelRegistry.getApiKeyAndHeaders() now returns ProviderHeaders with string | null values and preserves null header-deletion markers. Extensions that inspect returned headers must handle null; extensions forwarding them to pi-ai streams should pass them through unchanged. This prevents placeholder OpenAI credentials from being sent through Cloudflare AI Gateway (#7030).ModelRegistry.refresh() to accept ModelsRefreshOptions and return ModelsRefreshResult instead of discarding cancellation and provider errors.ModelRuntime.setRuntimeApiKey() to accept auth cancellation options rather than catalog refresh options. Call refresh({ providers: [providerId], signal }) separately when remote freshness is required.refreshToken(credentials, signal) callbacks to accept and honor a concrete abort signal.Replaced dynamic provider refresh context store access with the read-only context.stored snapshot and generation-checked context.publish() transaction.
Providers built with createProvider({ fetchModels }): no catalog-publication migration is required. Before and after, return the fetched models and register the resulting provider; createProvider() owns restoration, persistence, and in-memory publication.
// Before
const beforeProvider = createProvider({
// ...
fetchModels: async ({ signal }) => {
const response = await fetch(catalogUrl, { signal });
return parseModels(await response.json());
},
});
pi.registerProvider(beforeProvider);
// After: unchanged
const afterProvider = createProvider({
// ...
fetchModels: async ({ signal }) => {
const response = await fetch(catalogUrl, { signal });
return parseModels(await response.json());
},
});
pi.registerProvider(afterProvider);Handwritten native Provider.refreshModels(): replace direct store access and pre-publication mutation with generation-guarded publications.
```ts // Before refreshModels: async (context) => { const stored = await context.store.read(); if (stored) currentModels = stored.models; if (!context.allowNetwork) return;
const refreshed = await fetchModels(context.signal); currentModels = refreshed;
pi auth print-api-key and pi auth print-bearer-token export configured credentials with automatic OAuth refresh and minimum-validity enforcement./login over SSH by pasting the redirect URL or authorization code when the loopback callback is unavailable. See OpenRouter.Type.Base, Type.Awaited, Type.Promise, Type.AsyncIterator, Type.Iterator, Type.Options, and Value.Mutate, while fixing compiled validation of nullable array tool arguments. Extensions using removed APIs must migrate to supported TypeBox APIs. See Package Dependencies (#7243 by @petrroll).pi auth print-api-key and pi auth print-bearer-token commands for exporting configured credentials to external clients, including automatic OAuth refresh and configurable minimum token validity (#7168).ctx.scopedModels to extensions. See Extension Context (#7191 by @pungggi, #7215).fetch injection for supported text and image provider transports."pending" stop reason for partial streaming messages. See Custom Provider Stream Pattern (#7151 by @lucasmeijer).xhigh), inference profiles, and prompt caching. See Providers.ANTHROPIC_AUTH_TOKEN authenticates against Anthropic-compatible gateways that require Authorization: Bearer, including compaction and branch summaries. See Environment Variables or Auth File.If-None-Match so unchanged providers answer with an empty 304, and llama.cpp models stay listed across restarts. See llama.cpp.outputPad setting to custom message renderers. See Extensions (#7045 by @xl0).ANTHROPIC_AUTH_TOKEN bearer authentication for Anthropic-compatible gateways. See Providers (#5871).If-None-Match, so unchanged provider catalogs answer with an empty 304 instead of a full download.OAuth refresh failed for openai-codex report the provider response instead of a bare wrapper message./login to authorize OpenRouter or a Kimi Code subscription without manually configuring API keys. See OpenRouter.Tool.constrainedSampling with strict JSON Schema (prefer/require) and OpenAI Lark/regex grammar variants across OpenAI, Anthropic, Amazon Bedrock, Google Gemini, and Mistral. See Constrained Sampling for Tools.supportsGrammarTools and supportsStrictTools compatibility flags, expanded supportsStrictMode coverage, and generated model capability metadata to gate constrained sampling./login, minting a user-controlled API key. See OpenRouter (#6927 by @rsaryev).PI_SESSION_ID, PI_SESSION_FILE, PI_PROVIDER, PI_MODEL, and PI_REASONING_LEVEL to commands run by built-in and factory-created bash tools. See Bash Tool Session Environment.bash_execution_update events for direct RPC bash commands, correlated with request IDs. See RPC bash events (#6971 by @ananthakumaran).