Pi 0.85.1
New version of pi. Download from npm or view release on GitHub.
New Features
- GPT-6 Astra — Available through OpenAI API keys and OpenAI Codex subscriptions. See API Keys and OpenAI Codex.
Release notes, project updates, and announcements from the Pi team.
New version of pi. Download from npm or view release on GitHub.
New version of pi. Download from npm or view release on GitHub.
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).New version of pi. Download from npm or view release on GitHub.
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).New version of pi. Download from npm or view release on GitHub.
/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).New version of pi. Download from npm or view release on GitHub.
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).New version of pi. Download from npm or view release on GitHub.
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).New version of pi. Download from npm or view release on GitHub.
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.Renamed the inherited pi-ai ModelsStreamTransforms interface to ModelsRequestTransforms because its header transformation now applies to all authenticated provider requests.
Changed JSON and RPC 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).
Changed ModelRegistry.refresh() to accept ModelsRefreshOptions and return ModelsRefreshResult instead of discarding cancellation and provider errors.
Changed ModelRuntime.setRuntimeApiKey() to accept auth cancellation options rather than catalog refresh options. Call refresh({ providers: [providerId], signal }) separately when remote freshness is required.
Required config-form extension OAuth 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.
// 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;
await context.store.write({ models: refreshed, checkedAt: Date.now() });
},
// After
refreshModels: async (context) => {
if (context.stored) {
const restored = context.stored.models;
if (!(await context.publish({
update: () => { currentModels = restored; },
}))) return;
}
if (!context.allowNetwork) return;
const refreshed = await fetchModels(context.signal);
if (context.signal.aborted) return;
await context.publish({
persist: { models: refreshed, checkedAt: Date.now() },
update: () => { currentModels = refreshed; },
});
},
For the config-form pi.registerProvider(name, { refreshModels }), callbacks that only return models remain unchanged; pi publishes the returned list. If such a callback previously used context.store for custom persistence, read context.stored and call context.publish({ persist: entry }). In publish(), omit persist to leave storage unchanged, pass a ModelsStoreEntry to write it, or pass persist: null to delete it.
Replaced the inherited pi-agent-core harness session model with the v4 lane-based Session, SessionStorage, and SessionRepo APIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.
Promoted the inherited v2 session and AgentHarness API from pi-agent-core's experimental entrypoint to its default export and removed the experimental subpaths.
Removed the inherited legacy JSONL and in-memory repository APIs. Use pi-agent-core's v4 JsonlSessionRepo or InMemorySessionRepo, both implementing the new SessionRepo contract.
Added the inherited required pi-agent-core FileSystem.renameFile() operation for atomic JSONL publication; custom harness file-system implementations must provide same-filesystem replacement semantics (#7707 by @davidbrai).
Replaced experimental remote-session list summaries with durable SessionMetadata; RemoteSession.sessions no longer exposes runtime phase, model, thinking, attachment, or lock state, which remains available from acquired SessionSnapshot values (#7708).
BASETEN_API_KEY authentication and zai-org/GLM-5.2 as the default model.PiClient, CBOR protocol, Unix-socket transport, and @earendil-works/pi-coding-agent/client RemoteSession controller with transcript reducers. See Pi Client and Remote Protocol (#7344, #7348, #7371, #7409).CredentialSynchronizationError for credential changes that commit successfully but fail to synchronize local model state.pi.registerMarkdownTransformer() hooks for display-only transformation of user and assistant Markdown. See pi.registerMarkdownTransformer() (#7231 by @xl0).--tui-mode fullscreen or /settings (#7304)./settings.auto, always, and hidden modes through /settings; always reserves the rightmost column.scrollbarThumb theme color for fullscreen scrollbar thumbs, falling back to selectedBg.Ctrl+P/Ctrl+N prompt history navigation, with explicit history bindings taking precedence over application shortcuts while the editor is focused.AGENTS.override.md context files, which replace AGENTS.md or CLAUDE.md in the same directory while preserving context from other directories. See Context Files (#7681 by @Marvae).AI_AGENT=pi to CLI and RPC child-process environments for generic agent attribution. See Environment Variables (#7493 by @renaudhartert-db).samplingParams in models.json, model overrides, extension providers, and stream options. See Sampling Parameters (#7568 by @mrexodia).thinking_token_budget support for OpenAI-compatible models, reserving output tokens for the final answer (#7638 by @bnsd55).finish_reason, using compat.supportsFinishReason to infer normal and tool-use stops when the stream ends. See OpenAI Compatibility.AgentOptions.shouldStopAfterTurn for gracefully stopping after a completed turn before queued messages or another model call are processed. See Agent Options (#7367 by @acmerfight).JsonlSessionRepo support for append-only JSONL harness sessions (#7611 by @davidbrai).AgentHarness v2 scaffold; unfinished operation paths reject with HarnessNotImplemented while durable execution is implemented.ModelsStore reads, writes, and deletions; catalog orchestration binds these waits to the provider refresh signal.New version of pi. Download from npm or view release on GitHub.
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).New version of pi. Download from npm or view release on GitHub.
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.New version of pi. Download from npm or view release on GitHub.
/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).New version of pi. Download from npm or view release on GitHub.
New version of pi. Download from npm or view release on GitHub.
get_available_thinking_levels RPC command and RpcClient.getAvailableThinkingLevels() method (#6865 by @cristinaponcela)./login connection setup and /llama Hugging Face model search and downloads, explicit loading, unloading, and live progress. See llama.cpp.New version of pi. Download from npm or view release on GitHub.
max level and supports replaying empty-signature thinking blocks. See Kimi For Coding setup and Model Options.New version of pi. Download from npm or view release on GitHub.
kimi-deferred-tools.ts example.kimi-deferred-tools.ts example.New version of pi. Download from npm or view release on GitHub.
ModelRuntime centralizes model configuration, provider-owned /login, and dynamic provider catalogs. See Providers./model refreshes configured providers in the background, and pi update --models forces an immediate refresh. See Install and Manage.CreateAgentSessionOptions.authStorage and modelRegistry options with the async modelRuntime option. AuthStorage and its storage backends are no longer exported; use ModelRuntime (or a custom pi-ai CredentialStore), or readStoredCredential() for one-off reads of auth.json.ModelRuntime.getAll(), find(), getSnapshot(), and getAuthOptions() projections. Use the pi-ai Models methods getModels(), getModel(), getProviders(), and checkAuth() directly.ModelRegistry.getApiKeyAndHeaders() with ModelRuntime.getAuth(). Passing a provider ID returns provider-scoped auth; passing a model also resolves built-in, models.json, and extension model headers.ModelRegistry.refresh() from synchronous void to Promise<void> because models.json loading is asynchronous. Extensions must await it before making synchronous registry reads.ModelRuntime.refresh()/pi-ai Models.refresh(). Legacy extension OAuth modifyModels remains supported as a synchronous compatibility projection after credential initialization.ModelRuntime as the canonical async SDK and internal model/auth facade while preserving the synchronous extension-facing ModelRegistry API. ModelRuntime.create() accepts any pi-ai CredentialStore through its credentials option./login discovery directly from registered pi-ai providers, including ambient auth status and informational links.models-store.json, per-provider pi.dev catalog overlays, and Radius gateway support including offline migration from legacy credential-cached catalogs.refreshModels(context) support for dynamic model discovery with optional provider-controlled persistence.pi update --models to force an immediate model catalog refresh without updating pi or extensions.ModelRuntime to compose built-in providers, immutable models.json configuration, and extension overlays through ad-hoc pi-ai provider methods.ModelRuntime to own final request assembly: getAuth(model) includes configured model headers, stream methods resolve auth once, and before_provider_headers runs as the Models-only header transform before provider dispatch./model to render the current model snapshot immediately, refresh configured providers in the background, and update the open selector with partial results or timeout errors.New version of pi. Download from npm or view release on GitHub.
openai-responses compat.sendSessionIdHeader flag from models.json. Session-affinity behavior is now controlled by compat.sessionAffinityFormat ("openai", "openai-nosession", or "openrouter"). Replace sendSessionIdHeader: false with sessionAffinityFormat: "openai-nosession" (#6496 by @petrroll).Ctrl+X copies the last assistant message in the transcript or the selected message in /tree, making older and branched messages directly copyable. See Display and Message Queue.xhigh and max thinking - Native xhigh and max thinking levels are available across generated provider catalogs. See Model Options.xhigh and max thinking levels for Claude Fable 5 across all generated provider catalogs (#6490 by @davidbrai).Ctrl+X to copy the last assistant message, or the selected message in /tree.toolChoice support for OpenAI and Codex Responses, including required and named tool selection (#6588 by @xl0).New version of pi. Download from npm or view release on GitHub.
max thinking level - New opt-in thinking level above xhigh, natively supported on GPT-5.6 and adaptive Claude models, available across CLI (--thinking max), SDK, RPC, and model selection. Custom themes can define thinkingMax. See CLI Reference.models.json and modelOverrides. See Model Configuration.max thinking level across CLI, SDK, RPC, model selection, and themes. Custom themes can define thinkingMax; existing themes fall back to thinkingXhigh.models.json, modelOverrides, and extension-registered providers.~ (home directory) expansion for the shellPath setting (#6470 by @aaronkyriesenbach).New version of pi. Download from npm or view release on GitHub.
showCacheMissNotices. See Model & Thinking.pi config -l and Tab switching manage global vs project-local package resources. See Enable and Disable Resources.agent_settled, before_provider_headers, entry renderers, and InlineExtension. See agent_start / agent_end / agent_settled, before_provider_headers, and InlineExtension.gpt-5.6, gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna, plus verified openai-codex support for gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna./login <provider> support with provider autocomplete.agent_settled events plus session-level idle waiting for fully settled agent runs (#6363).before_provider_headers extension hook support for injecting provider request headers (#6350 by @pmateusz).InlineExtension type for named inline extension factories (#6267 by @any-victor).pi config, including project mode startup with pi config -l and Tab switching between global and project scopes (#6309).InMemorySessionStorage and JsonlSessionStorage exports from the agent harness (#6435).showCacheMissNotices setting and /settings toggle for significant prompt-cache miss transcript notices.New version of pi. Download from npm or view release on GitHub.
outputPad controls horizontal padding for user messages, assistant messages, and thinking blocks. See Settings.externalEditor lets Ctrl+G use a configured editor before $VISUAL/$EDITOR fallbacks. See Settings and Keybindings.get_entries and get_tree. See get_entries and get_tree.session_info_changed. See session_info_changed.get_entries and get_tree RPC commands for reading session entries and tree snapshots over RPC (#6078 by @geraschenko)../rpc-entry export for launching Pi directly in RPC mode.Usage.reasoning token counts for providers that report reasoning/thinking token usage (#6057).externalEditor settings.json override for Ctrl+G external editor commands, with default fallbacks to Notepad on Windows and nano elsewhere (#6122).outputPad setting for user message, assistant message, and thinking horizontal padding (#6168).gpt-5.5.New version of pi. Download from npm or view release on GitHub.
ApiKeyCredential to use the auth.json-compatible discriminator type: "api_key" and provider-scoped env values instead of type: "api-key" and metadata.ExecutionEnvExecOptions to ShellExecOptions.