New Features
- Codemode and MCP — Connect MCP servers and let models run JavaScript that calls tools in parallel. See MCP Servers and Enable codemode.
- System theme — Pi's colors now come from your terminal's own palette by default. See Use your terminal's colors.
- Sign in with ChatGPT — Use a ChatGPT subscription with the OpenAI provider through
/login openai. See Authenticate interactively. - Virtual models — Extensions can route each request to a different physical model. See Virtual Models.
- Classifier models — Run Jev classifiers from codemode scripts, or use any llama.cpp model as a classifier. See How codemode works and Classification.
Added
- Added codemode, tool search, and MCP support as built-in extensions. The
codemodetool runs model-written JavaScript in a QuickJS sandbox that calls pi's tools; enable it withdefaultToolsor--toolsand configure it withcodemode.modeandcodemode.inlineBudget.tool_searchfinds tools that are not declared to the model and declares them. MCP servers over stdio or streamable HTTP, with OAuth, come frommcp.json(global, or per project once trusted) orpi.registerMcpServer()and are managed with/mcpandpi mcp add|remove|list|login|logout. See MCP Servers and Enable codemode (#10040). - Added extension tool APIs for orchestrating tools:
exposure(direct,model-only,codemode,deferred, orhidden),namespace,annotations,outputSchemawithstructuredContent,isErrorresults,prepareLoadout(), andctx.executeTool()for nested tool calls, which emit events withparentToolCallIdand are recorded as boundednestedCallson the calling tool's result. See Tool exposure. - Added a warning when an extension that registers the same tool, command, or flag replaces a built-in extension (#10174 by @cristinaponcela).
- Added experimental virtual models: extensions register them with
pi.registerVirtualModel()and pick a physical model and thinking level for each request. The footer shows the routed model,/sessionlists cost per physical model, andexamples/extensions/jev-router.tsroutes with the Jev classifier. See Virtual Models. - Added Sign in with ChatGPT to the OpenAI provider in
/login, which uses a ChatGPT subscription with the OpenAI API. Pi stores a stabledeviceIdin the global settings for this login and omits it from bug reports. - Added the
systemtheme, now the default, which derives pi's colors from the terminal's reported foreground, background, and ANSI palette and rebuilds them when the terminal switches between light and dark. See Use your terminal's colors. - Added
#rgb,oklch(), andokhsl()colors and an optionalappearancefield to theme files, andtheme.style(),theme.colors, andtheme.appearancefor extensions. See Themes and TUI. - Added a classifier model for every llama.cpp chat model, answered from next-token label probabilities. See Classification.
- Added inherited Jev classifier models on OpenRouter, Cloudflare Workers AI, Vercel AI Gateway, and OpenCode Zen.
- Added the
fullscreenWheelScrollLinessetting and/settingsentry for fullscreen mouse-wheel scrolling. The default"auto"accelerates fast wheel spins outside local macOS terminals (#9758). - Added per-input disposition to successful RPC
prompt,steer, andfollow_upresponses,AgentSession.steer()/followUp(), andRpcClient.prompt()/steer()/followUp();RpcClient.prompt()also acceptsstreamingBehavior(#9098, #9803). - Added image generation to
ModelRuntime:generateImages()with runtime-resolved auth (stored credentials, OAuth, runtime API keys,models.jsonheaders), plusgetModelsOfType(),getModelOfType(),getAvailableOfType(),getAllModels(), andgetAllAvailable(). OpenRouter image models are listed under theopenrouterprovider and share its credential; an upstream ID can have separate chat and image entries.models.jsonproviders and extension registrations without a model list keep built-in image generation. Extension model lists can include discriminated chat, image, and classifier entries with operation implementations; when supplied, they replace the provider catalog across every operation. Chat-facing reads (getModels(),getAvailableSnapshot(), the model picker) are unchanged. - Added classifier support to
ModelRuntime, includingclassify(), classifier model accessors, runtime-resolved authentication, and the built-in TypeSafejev-latestmodel. - Added
types=chat,image,classifierto pi.dev model catalog requests so remote refreshes overlay every supported model type; entries of unknown model types are ignored. - Added the
provider_stream_eventextension event for observing parsed provider events before normalization, with an opt-in/debug-providerexample viewer (#9784, #9901 by @davidbrai). - Added a show/hide toggle (
H) in HTML exports for custom messages markeddisplay: false. Messages remain hidden by default and can also be revealed from the sidebar (#8896, #10020 by @rwachtler). - Added inherited Claude Sonnet 5.5 support for Anthropic with adaptive thinking and a 1M context window.
- Added a Built-in section in
pi configto disable the built-inmcp,llama.cpp,codemode, andtool-searchextensions globally or per project, stored as-builtin:<name>in theextensionssetting. SDK inline extensions opt in withbuiltin: true. - Added
+nameand-nameentries to thedefaultToolssetting to add or remove tools without repeating the defaults, for example"defaultTools": ["+codemode"]. Project entries of this form apply on top of the user setting. Documented how to enablecodemodewithout MCP and how to use classifier models such as Jev from codemode scripts. - Added the token usage and cost of codemode
models.classify()calls to the codemode tool result, so they count toward the session cost; the codemode result shows each call's cost.
Changed
- Switched the build from the TypeScript native preview to TypeScript 7.0 with an ES2024 target, and replaced
tsxwith Node's built-in type stripping for running from source (#9965). - Removed the
[Themes]section from the startup banner. Custom themes remain available in/settings, and theme conflicts are still reported. - Changed the startup header to show the pi logo with the version instead of the app name.
- Changed the built-in
darkandlightthemes to the revised pi colors, written in OKHSL. - Changed light/dark terminal detection to use the reported background color first, then the terminal's light/dark report, then
COLORFGBG. The first-time setup no longer shows the detected appearance. - Renamed the inherited OpenAI Codex provider to "OpenAI Codex (legacy)"; Sign in with ChatGPT on the OpenAI provider supersedes it.
- Changed inherited terminal detection to treat
TERM=*-directas truecolor. - Built-in extensions and tools are named
builtin:<name>(for examplebuiltin:mcpandbuiltin:read) in errors, diagnostics, RPC source info, and bug reports, instead of<inline:name>and<builtin:name>. Their slash commands no longer carry a[t]autocomplete tag. --no-extensionsalso disables the built-in extensions, including the llama.cpp provider. Load one explicitly with-e builtin:<name>, for examplepi -ne -e builtin:mcp.- Tool calls without a custom call renderer, including direct MCP tool calls, now show their arguments: as
key=valuepairs on the title line when collapsed and onekey: valueline per argument when expanded. MCP calls are titledserver/tooland their results collapse to 5 lines. bashandpowershellstructured results, which codemode scripts receive, now hold up to 1 MiB of output instead of the model-facing 2000 lines or 50KB, and addtruncatedandfull_output_path. Longer output keeps its first and last 512 KiB. Empty output is""instead of(no output).
Fixed
- Fixed X11 clipboard text being misidentified as an image when the clipboard owner accepts unadvertised image targets (#9786).
- Prevented managed git packages from automatically installing Pi peer dependencies and added warnings for extension packages that list host-provided modules in
dependencies(#9863). - Fixed pinned git extensions loaded with
-econtinuing to use the first downloaded commit after the ref changes (#9982). - Fixed
RpcClientskipping the next event listener when a listener unsubscribes while handling an event, which could makewaitForIdle()time out aftercollectEvents()(#9990). - Fixed full-file
readcalls rendering as:1when models sendnullfor omittedoffsetandlimit(#9996). - Fixed new sessions being lost when pi exits before the first assistant response. The session file is now created when the first user message is sent (#10000).
- Fixed unloaded llama.cpp autoload presets overwriting a cached runtime context window with the GGUF training context (#10077, #10158 by @cristinaponcela).
- Fixed custom themes ignoring
terminal.trueColorand other terminal capability overrides and rendering with 256 colors (#9973, #10039 by @christianklotz). - Fixed pasting files copied in Finder inserting the file icon image instead of the file paths; paths are quoted in bash mode (#9999, #10136 by @christianklotz).
- Fixed the startup header, loaded resources, and chat notices keeping their old colors after a theme change.
- Fixed the Fireworks default model pointing at the removed Kimi K2.6 model; it now defaults to Kimi K3.
- Fixed the OpenCode Go default model pointing at the removed Kimi K2.6 model; it now defaults to Kimi K3.
- Fixed the Together default model pointing at the removed Kimi K2.6 model; it now defaults to Kimi K3.
- Reduced CPU use while streaming in long sessions and when previewing themes: the footer caches session usage totals, collapsed bash results cache their preview, and
sanitizeBinaryOutput()no longer splits output into per-character arrays. - Fixed the usage of tools called through
ctx.executeTool(), for example from codemode scripts, being dropped from the session cost; it is now added to the calling tool's result usage. - Fixed inherited
/skillautocomplete appearing empty when loaded skill names did not contain the letters inskill(#9944). - Fixed inherited path and
@autocomplete not working after opening wrappers such as(,[,{,<, or a backtick. - Fixed inherited image stretching in terminals that use the Kitty graphics protocol (#8938, #9957 by @rwachtler).
- Fixed inherited shell cursor staying hidden after exit when an extension closed an overlay during shutdown (#10026).
- Fixed inherited keyboard input being lost after a mouse click in a
/settingssubmenu closed it. - Fixed inherited 1-hour Anthropic cache writes through Vercel AI Gateway being priced at the 5-minute rate (#9210).
- Fixed inherited model-level
samplingParamsbeing dropped by directstream()/complete()calls on OpenAI-compatible APIs (#9506). - Fixed inherited Mistral GLM requests failing with "Expected at most one leading ThinkChunk" after empty content deltas (#9674).
- Fixed inherited OpenAI Fast mode requests being priced at the standard rate (#10034).
- Fixed inherited Mistral reasoning models ignoring the requested thinking level (#9678).
- Fixed inherited OpenCode Zen and OpenCode Go
qwen3.8-flashthinking being replayed as plain text on later turns (#10047). - Fixed inherited OpenAI Responses streams from servers that omit
output_index, such as llama.cpp, running mixed-up tool calls; such streams now end with an error (#9974). - Fixed inherited Anthropic and OpenAI Codex browser sign-in waiting indefinitely after the provider redirected with an authorization error, and Anthropic sign-in failing when its callback port is in use.
- Fixed inherited GitHub Copilot Claude Opus 5.5 offering unsupported thinking levels when upstream model metadata is incomplete.