New version of pi. Download from npm or view release on GitHub.
New Features
- Unified model runtime and provider authentication —
ModelRuntime centralizes model configuration, provider-owned /login, and dynamic provider catalogs. See Providers.
- Live model catalog refresh —
/model refreshes configured providers in the background, and pi update --models forces an immediate refresh. See Install and Manage.
- xAI device-code OAuth and Grok 4.5 Responses support — Sign in to xAI with a device code and use Grok 4.5 with low, medium, or high thinking. See xAI.
Breaking Changes
- Replaced the SDK's
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.
- Removed redundant
ModelRuntime.getAll(), find(), getSnapshot(), and getAuthOptions() projections. Use the pi-ai Models methods getModels(), getModel(), getProviders(), and checkAuth() directly.
- Replaced SDK request-auth assembly through
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.
- Changed extension-facing
ModelRegistry.refresh() from synchronous void to Promise<void> because models.json loading is asynchronous. Extensions must await it before making synchronous registry reads.
- Moved canonical dynamic catalog refresh to async
ModelRuntime.refresh()/pi-ai Models.refresh(). Legacy extension OAuth modifyModels remains supported as a synchronous compatibility projection after credential initialization.
Added
- Added
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.
- Added provider-owned
/login discovery directly from registered pi-ai providers, including ambient auth status and informational links.
- Added file-backed dynamic catalogs in
models-store.json, per-provider pi.dev catalog overlays, and Radius gateway support including offline migration from legacy credential-cached catalogs.
- Added extension provider
refreshModels(context) support for dynamic model discovery with optional provider-controlled persistence.
- Added
pi update --models to force an immediate model catalog refresh without updating pi or extensions.
- Added inherited xAI device-code OAuth login and Grok 4.5 OpenAI Responses support, with low, medium, and high thinking levels (#6651 by @Jaaneek).
Changed
- Changed
ModelRuntime to compose built-in providers, immutable models.json configuration, and extension overlays through ad-hoc pi-ai provider methods.
- Changed
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.
- Changed
/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.
Read more