Pi 0.84.0
New version of pi. Download from npm or view release on GitHub.
New Features
- Fullscreen TUI mode — Switch between regular and fullscreen modes at runtime, with a sticky editor and footer, independently scrollable transcript, and draggable scrollbars. See UI & Display.
- Mermaid and LaTeX rendering — Render Mermaid diagrams and terminal-friendly Unicode math in interactive transcripts. See Markdown settings and TUI Markdown.
- Per-directory context overrides — Use
AGENTS.override.mdto replace context files for a specific directory. See Context Files. - Advanced custom model sampling — Configure arbitrary OpenAI-compatible
samplingParamsand opt-in vLLMthinking_token_budgetvalues. See Sampling Parameters. - Baseten provider — Use built-in Baseten authentication and model support. See API Keys.
Breaking Changes
Renamed the inherited pi-ai
ModelsStreamTransformsinterface toModelsRequestTransformsbecause its header transformation now applies to all authenticated provider requests.Changed JSON and RPC
message_updateevents to emit onlyassistantMessageEventdeltas, removing the cumulativemessageandassistantMessageEvent.partialfields that caused quadratic output growth. Clients that need partial messages must assemble deltas betweenmessage_startandmessage_end; the latter remains authoritative (#7290).ModelRegistry.getApiKeyAndHeaders()now returnsProviderHeaderswithstring | nullvalues and preservesnullheader-deletion markers. Extensions that inspect returned headers must handlenull; 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 acceptModelsRefreshOptionsand returnModelsRefreshResultinstead of discarding cancellation and provider errors.Changed
ModelRuntime.setRuntimeApiKey()to accept auth cancellation options rather than catalog refresh options. Callrefresh({ 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.storedsnapshot and generation-checkedcontext.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 usedcontext.storefor custom persistence, readcontext.storedand callcontext.publish({ persist: entry }). Inpublish(), omitpersistto leave storage unchanged, pass aModelsStoreEntryto write it, or passpersist: nullto delete it.Replaced the inherited pi-agent-core harness session model with the v4 lane-based
Session,SessionStorage, andSessionRepoAPIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.Promoted the inherited v2 session and
AgentHarnessAPI 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
JsonlSessionRepoorInMemorySessionRepo, both implementing the newSessionRepocontract.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.sessionsno longer exposes runtime phase, model, thinking, attachment, or lock state, which remains available from acquiredSessionSnapshotvalues (#7708).
Added
- Added built-in Baseten provider support with
BASETEN_API_KEYauthentication andzai-org/GLM-5.2as the default model. - Added experimental remote-session client APIs: the transport-neutral
PiClient, CBOR protocol, Unix-socket transport, and@earendil-works/pi-coding-agent/clientRemoteSessioncontroller with transcript reducers. See Pi Client and Remote Protocol (#7344, #7348, #7371, #7409). - Added
CredentialSynchronizationErrorfor credential changes that commit successfully but fail to synchronize local model state. - Added chainable
pi.registerMarkdownTransformer()hooks for display-only transformation of user and assistant Markdown. Seepi.registerMarkdownTransformer()(#7231 by @xl0). - Added an experimental fullscreen TUI mode, selectable through
--tui-mode fullscreenor/settings(#7304). - Added runtime switching between regular and fullscreen TUI modes through
/settings. - Added a sticky editor, status, widget, and footer dock to fullscreen mode while keeping the transcript independently scrollable.
- Added a draggable transcript scrollbar to fullscreen mode with configurable
auto,always, andhiddenmodes through/settings;alwaysreserves the rightmost column. - Added page scrolling and marked-message navigation shortcuts to fullscreen mode.
- Added an optional
scrollbarThumbtheme color for fullscreen scrollbar thumbs, falling back toselectedBg. - Added configurable themed Unicode rendering for supported Mermaid diagrams in interactive messages, including optional rendering while streaming. See Markdown settings (#7624 by @xl0).
- Added opt-in
Ctrl+P/Ctrl+Nprompt history navigation, with explicit history bindings taking precedence over application shortcuts while the editor is focused. - Added per-directory
AGENTS.override.mdcontext files, which replaceAGENTS.mdorCLAUDE.mdin the same directory while preserving context from other directories. See Context Files (#7681 by @Marvae). - Added
AI_AGENT=pito CLI and RPC child-process environments for generic agent attribution. See Environment Variables (#7493 by @renaudhartert-db). - Added inherited terminal-friendly Unicode rendering for LaTeX expressions in Markdown. See TUI Markdown.
- Added stacked transient notifications in fullscreen mode.
- Added arbitrary OpenAI-compatible model sampling parameters through
samplingParamsinmodels.json, model overrides, extension providers, and stream options. See Sampling Parameters (#7568 by @mrexodia). - Added inherited opt-in vLLM
thinking_token_budgetsupport for OpenAI-compatible models, reserving output tokens for the final answer (#7638 by @bnsd55). - Added inherited support for OpenAI-compatible streams that omit
finish_reason, usingcompat.supportsFinishReasonto infer normal and tool-use stops when the stream ends. See OpenAI Compatibility. - Added inherited deferred provider request contracts, durable response handles, authenticated fetch/cancel dispatch, and faux-provider support for pending, ready, failed, and cancelled responses (#7339 by @davidbrai).
- Added inherited vendor-neutral telemetry contracts plus agent-owned typed AI-request and harness schemas, composed span starters, and callback helpers. See the agent telemetry schema reference.
- Added inherited structured Amazon Bedrock failure diagnostics with HTTP status, modeled error code, and AWS request id when available (#7286 by @brianstanley).
- Added inherited
AgentOptions.shouldStopAfterTurnfor gracefully stopping after a completed turn before queued messages or another model call are processed. See Agent Options (#7367 by @acmerfight). - Added inherited v4
JsonlSessionReposupport for append-only JSONL harness sessions (#7611 by @davidbrai). - Added inherited bounded branch-entry and indexed open-operation recovery queries to the v4 session API (#7448, #7646).
- Added the inherited compile-complete
AgentHarnessv2 scaffold; unfinished operation paths reject withHarnessNotImplementedwhile durable execution is implemented.
Changed
- Added inherited optional cancellation to pi-ai
ModelsStorereads, writes, and deletions; catalog orchestration binds these waits to the provider refresh signal. - Reduced the inherited default fullscreen mouse wheel step from three lines to one for finer scrolling.