Connect a model
Providers, sign-in, LiteLLM, the model picker, effort and usage.
A provider is how pi reaches models: a subscription, an API key, a local server or a LiteLLM proxy. A thread uses one model from your providers. Adding a provider does not change the default model or the model of an existing thread.
Add a provider#
Open Settings → Providers and choose +.
| Option | Use it for |
|---|---|
| Radius | One sign-in to pi's own gateway, with many models. Usage and limits in one place. |
| A subscription you have | ChatGPT, GitHub Copilot and others, through the provider's sign-in in your browser. |
| An API key | OpenRouter, OpenAI, Anthropic, Google, Azure, Bedrock and more. |
| A local model | Ollama, llama-swap, LM Studio or any OpenAI-compatible server on this machine. See Run a local model. |
| LiteLLM | A LiteLLM proxy and the models available to your key. |
A Claude subscription does not include API access: Anthropic needs a separately billed API key.
Video walkthrough · English captions
Add a local provider
Connect an already-running local server, discover its model, save the provider, and send a test greeting to check the connection.
From a terminal:
pi-kit login # choose a provider
pi-kit login openrouter --api-key
pi-kit login --local http://127.0.0.1:8080/v1 # a local server
pi-kit model llama-swap/qwen3-4b # default model for new threads
Sign in#
For Radius or a subscription:
- Select the provider.
- Finish the sign-in in the browser page that opens, or use the fallback link and code.
- Return to pi-kit. The provider appears under Signed in.
- Pick a model in the composer.
For an API key, paste the key in the form. pi-kit shows only its last four characters afterwards.
Where keys go depends on credential storage: on a fresh Mac they are saved as plain text in pi's private
auth.json until you opt in; Windows and Linux use the system's credential store by default. Subscription and Radius sign-ins stay in pi's files. See Credential storage.Local llama.cpp and llama-swap connections are grouped under llama.cpp with a model and connection count. Expand the group to refresh, edit or remove a server.
Connect LiteLLM#
- Choose LiteLLM in the wizard.
- Enter the Proxy URL, for example
http://localhost:4000/v1. - Under Authentication, choose API key (usually a proxy virtual key), Use saved API key, or No API key required.
- Choose Discover models, then Save and use models.
Discovery reads the proxy's catalog; it does not test each model. Context limits and capabilities come from the proxy. The model picker refreshes the catalog when it opens.
Choose a model#
Open the model chip in the composer and search.
| Key | Action |
|---|---|
| ↑ ↓ | Move through the list. |
| Enter | Use the model. |
| Shift+Enter | Pin or unpin it. |
| ⌘⇧M (Ctrl+Shift+M) | Cycle through pinned models; with none pinned, through all. |
Changing the model keeps the conversation. The new model may have a smaller context window or no tool support.
Settings → Chat models has three tabs:
| Tab | Contents |
|---|---|
| Chat defaults | Default model and effort for new threads, and the default model per provider. |
| Pinned models | The ⌘⇧M cycle, in order. Drag to reorder. |
| Catalog | Context window and price per million tokens of every model, and catalog updates. |
Effort#
The flask button next to the model chip sets the thinking effort. The levels depend on the model; models without reasoning ignore it. The default for new threads is in Chat models → Chat defaults.
Usage and cost#
| Shown | Source |
|---|---|
| Context ring | How much of the model's context window the thread uses. |
| Provider usage | Limits or credit reported by Radius, OpenRouter, or a ChatGPT subscription through OpenAI Codex. |
| Cost | An estimate from token counts, not an invoice. Local models cost nothing. |
Missing data is left blank. Turn on Settings → Appearance → Transcript → Show usage under every turn to see tokens, cost and time per turn.
Remove a provider#
Open Settings → Providers, expand the provider and choose Remove provider. This removes the connection, its models and its stored credential. Downloaded model files, chat history and environment variables stay.
pi-kit logout openrouter