# Nous Portal as a native pi-ai provider extension Pi 1.6 exposes two registration forms. We register a complete native `Provider` (built with `createProvider` from `@earendil-works/pi-ai`) rather than the legacy `ProviderConfig` + `oauth` block, because the legacy form's `getApiKey` contract pushes an extension toward minting a session key, and Nous retired that endpoint (HTTP 410 `session_key_minting_retired`, verified 2026-11-25). The native form lets `toAuth` hand the OAuth access token straight to inference, which accepts it (verified 200 on `/v1/models`). Streaming is delegated to the built-in `openai-completions` API; no custom wire protocol. ## Consequences - Pi owns the locked refresh pattern (`refresh` / `toAuth` split), so concurrent requests cannot double-refresh a rotated token. - The extension is a single root `index.ts` with no build step, matching the sibling extensions in `~/Projects/scripting/pi-extensions/`.