# Configure models

| Goal | Command |
| --- | --- |
| Full first-run wizard, also shown by the Web UI on first launch | `openprogram setup` |
| Just the model section | `openprogram setup model` |
| Pick a section | `openprogram setup menu` |
| Credentials only: scan, log in, verify | `openprogram providers setup` |

## Provider commands

| `openprogram providers` | Effect |
| --- | --- |
| `keys <provider> add` (or `login <provider>`) | Adds a key or sign-in to the end of the provider's list. Scripts: `--api-key-stdin` |
| `keys <provider>` `list` `rename` `move` `disable` `replace` `remove` `strategy` | The same list the Providers page shows |
| `logout <provider>` | Removes every stored key and sign-in |
| `status <provider>` | Are the credentials usable? |
| `list` | Every provider's list |
| `available [QUERY]` | The full configurable catalogue, including community entries |
| `discover` `adopt` | Scan and import credentials on this machine: [Authentication](https://fzkuji.github.io/OpenProgram/docs/models/auth.html) |
| `doctor` | Expiry, refresh, cooldown, conflicts |
| `aliases` | Short names |

## Enabled models

Only enabled models appear in the chat picker; credentials alone are not enough.

| Ways to enable |  |
| --- | --- |
| Setup wizard | Tick them |
| Settings → Model services | Tick them. **Fetch models** updates the catalogue. |
| Subscription login | Enables a default set |

| Fact | Rule |
| --- | --- |
| Stored in | `~/.openprogram/config.json` (`~/.openprogram-<name>/` with `--profile`), `providers.<id>`: an `enabled` flag and `models` rows with context window, pricing and so on. Hand-added models carry `source: "manual"`. |
| Read by | `openprogram/models/providers/catalog/enabled_models.py`, at startup; config changes apply on reload |
| Empty selection | Allowed, even for the last model; stays empty after reload and restart |
| New chats | No default model. Starts on the top-level `last_used_model`, the one last picked or sent with. A fresh install asks. Disabling that model clears it. |
| Other uses | Titles, memory writes, MCP sampling and Auto permission review use that model when they have no conversation of their own |
| Provider settings | Open from saved models and cached catalogues, without waiting for the remote endpoint |
| Brand icons | Bundled locally; custom or unrecognized providers show an initial |

[Local models](https://fzkuji.github.io/OpenProgram/docs/models/local-models.html) · [Providers](https://fzkuji.github.io/OpenProgram/docs/models/providers.html) · [Authentication](https://fzkuji.github.io/OpenProgram/docs/models/auth.html) · [Use several keys](https://fzkuji.github.io/OpenProgram/docs/models/several-keys.html) · [Fast mode](https://fzkuji.github.io/OpenProgram/docs/models/fast-tier.html) · [Thinking effort](https://fzkuji.github.io/OpenProgram/docs/models/thinking-effort.html) · [Token tracking](https://fzkuji.github.io/OpenProgram/docs/models/token-tracking.html)
