Choose the route that fits
A provider is the account or backend, such as anthropic, openai-codex, or ollama. A model is selected as provider/model-id.
For most people, the shortest path is:
- Start
omp. - Run
/model. - Choose a provider. Providers without credentials appear as not configured; select one and press Enter to start its login flow when available.
- Choose a model after login finishes.
Use this table if you already know how you want to authenticate:
| Route | Best for | First action |
|---|---|---|
| OAuth or account sign-in | Browser, device-code, and hosted-account flows | In omp, run /login, or jump to one provider with /login openai-codex |
| Coding subscription | ChatGPT Plus/Pro, Claude Pro/Max, Copilot, and other supported plans | Use the plan's provider ID, not the vendor's API provider ID |
| API key | Usage-based APIs, CI, and non-interactive shells | Export the provider's environment variable, then start omp |
| Local engine | Private or offline-capable inference with Ollama, llama.cpp, or LM Studio | Start the engine; omp discovers it without a login |
| Custom endpoint | Team gateways, self-hosted APIs, and providers not built in | Add the endpoint to ~/.omp/agent/models.yml |
Account subscriptions and developer APIs are often separate products. For example, ChatGPT credentials use openai-codex; openai expects OPENAI_API_KEY. Google and xAI have similar splits. See Provider-specific caveats before guessing an ID.
Get one route working
Sign in with OAuth or a subscription
Inside an interactive session:
/login openai-codex
Follow the browser, device-code, or paste-code instructions shown by omp. For a remote terminal, the flow may ask you to paste the final redirect URL or code back as /login <value>. When a provider supports several accounts or workspaces, run /login <provider> again to add another one; omp can rotate managed accounts.
Then verify and select a concrete model:
omp models openai-codex
omp --model openai-codex/gpt-5.5
omp models <provider> prints only models currently available to this installation. Copy a selector from that output if the example model has changed. In an existing session, run /model or /model provider/model-id instead.
Use /logout to choose credentials to remove, or /logout <provider> to open that provider directly.
Use an API key
For a one-off launch or CI job, put the key in the process environment:
OPENAI_API_KEY=sk-... omp --model openai/gpt-5.5
For an interactive setup, many key-based providers also appear in /login; omp opens the provider's key page, asks for the key, validates it, and stores the credential. Providers without a login entry use their environment variable.
To persist an environment variable without adding it to shell startup files, omp loads .env files. An already-exported process value wins, followed by:
<current-directory>/.env~/.omp/agent/.env~/.omp/.env~/.env
Do not commit a project .env containing secrets. See Environment variables for every provider key name and the complete .env rules.
Verify the route before starting a long task:
omp models openai
omp --model openai/gpt-5.5 "Reply with the model provider and model ID you are using."
Use a local engine
omp probes these local providers automatically:
| Provider ID | Default endpoint | Override |
|---|---|---|
ollama | http://127.0.0.1:11434 | OLLAMA_BASE_URL, then OLLAMA_HOST |
llama.cpp | http://127.0.0.1:8080 | LLAMA_CPP_BASE_URL |
lm-studio | http://127.0.0.1:1234/v1 | LM_STUDIO_BASE_URL |
Start the engine and load a model there first. No login or config file is required for the default keyless endpoints. Then ask omp what it found:
omp models ollama
Copy a selector from the output:
omp --model ollama/model-id
If an engine is on another machine, set its base-URL environment variable. An explicit provider with the same ID in models.yml replaces automatic discovery. vllm is also a built-in provider route, but configure or authenticate it when it is not exposed as an unauthenticated local endpoint.
Add a custom provider
Use ~/.omp/agent/models.yml for an OpenAI-compatible, Anthropic-compatible, or other supported public endpoint. This minimal example reads the key from MY_GATEWAY_API_KEY:
providers:
my-gateway:
baseUrl: https://gateway.example.com/v1
api: openai-completions
apiKey: MY_GATEWAY_API_KEY
models:
- id: fast-chat
name: Fast Chat
contextWindow: 128000
maxTokens: 8192
Set the key and verify the loaded entry:
export MY_GATEWAY_API_KEY=...
omp models my-gateway
omp --model my-gateway/fast-chat
apiKey is resolved as an environment-variable name first and otherwise as literal text. Prefer an environment-variable name so the secret stays out of the file. Use auth: none instead of apiKey for a genuinely keyless endpoint.
See Custom models & providers for other wire APIs, model discovery, headers, secret commands, compatibility options, and model overrides.
How models become available
At startup, omp assembles the model registry in this order:
- bundled providers and known models;
- provider overrides and custom models from
~/.omp/agent/models.ymlormodels.yaml; - cached or live discovery for supported providers and local engines;
- providers and models registered by loaded extensions.
A custom model with the same provider and id replaces the bundled entry. Runtime discovery can update the models exposed by a provider; model overrides are reapplied afterward.
A model is selectable only when:
- its provider is not in the effective
disabledProviderslist; and - the provider is keyless or has a credential omp can resolve.
Useful checks:
omp models # all currently available models
omp models find sonnet # search provider, ID, selector, or display name
omp models refresh # force fresh online discovery, then list
Inside the TUI, /model includes available models and shows catalog providers without credentials as locked. Selecting a login-capable locked provider starts its setup. Disabled providers are omitted.
For initial selection, an explicit --model wins. Without it, omp considers the active model scope, a saved default, known provider defaults, and finally the first available model. Prefer an exact provider/model-id when the same model ID exists through several routes; bare IDs and fuzzy --model patterns depend on the available catalog and configured provider order. See Model roles for persistent defaults and task-specific model choices.
Credential precedence
When several credentials exist for the same provider, omp uses the first applicable source:
- runtime
--api-keyfor this process; models.ymlproviders.<id>.apiKey;- stored OAuth credentials, refreshed when needed;
- an API key stored by
/login; - the provider environment variable, including values loaded from
.env; - another stored API key, such as a broker-migrated key;
- a custom-provider fallback resolver.
This means a stored OAuth login normally wins over ANTHROPIC_API_KEY in the environment, while a key explicitly pinned in models.yml wins over OAuth. Keep provider IDs separate when you want both account and API access available.
Local credentials normally live in ~/.omp/agent/agent.db. With an auth broker configured, login, logout, refresh, and credential reads use the remote store instead. See Secrets and auth for storage, multiple accounts, the auth broker, and the provider-compatible auth gateway.
Current provider matrix
The live catalog is authoritative: run omp models after authenticating. The groups below cover the current built-in model-provider IDs and the normal setup route.
| Route | Provider IDs | Normal setup |
|---|---|---|
| Major model APIs | anthropic, openai, google, groq, mistral, xai, deepseek, openrouter | API key; anthropic, xai, deepseek, and openrouter also offer guided /login setup |
| Account and subscription access | openai-codex, github-copilot, cursor, google-antigravity, google-gemini-cli, kimi-code, xai-oauth, devin, firepass, ollama-cloud | /login <provider> |
| Coding plans and regional portals | aiand, alibaba-coding-plan, alibaba-token-plan, minimax-code, minimax-code-cn, qwen-portal, umans, xiaomi, xiaomi-token-plan-ams, xiaomi-token-plan-cn, xiaomi-token-plan-sgp, zai, zhipu-coding-plan | /login <provider>; the flow either signs in or validates a pasted plan key |
| Git-hosted assistants | gitlab-duo, gitlab-duo-agent | /login <provider> or GITLAB_TOKEN; GitHub Copilot is listed with subscriptions above |
| Hosted inference APIs | aimlapi, baseten, cerebras, coreweave, fireworks, gmi-cloud, huggingface, meta, minimax, moonshot, nanogpt, nvidia, novita, qianfan, sakana, siliconflow, siliconflow-cn, synthetic, together, venice, wafer-serverless | Provider API key; most also support guided /login key entry |
| Gateways and aggregators | cloudflare-ai-gateway, kilo, litellm, opencode-go, opencode-zen, vercel-ai-gateway, zenmux | Gateway key and, where required, a base URL or account/team setting |
| Cloud identity routes | amazon-bedrock, bedrock-mantle, azure, google-vertex | Cloud-specific credentials and region/project/endpoint configuration |
| Local and self-hosted engines | ollama, llama.cpp, lm-studio, vllm | Start the endpoint; authenticate only if the endpoint requires it |
Exact environment-variable names are intentionally centralized in Environment variables, because some providers accept more than one credential source.
Provider-specific caveats
| Provider or family | What to know |
|---|---|
| OpenAI | openai-codex is ChatGPT subscription access. openai is the developer API and uses OPENAI_API_KEY. For a headless Codex sign-in, choose openai-codex-device; it stores the result for openai-codex. |
| Anthropic | The anthropic route supports Claude Pro/Max OAuth and API keys. Repeating login can add separate organizations or subscription workspaces. A pinned models.yml key overrides stored OAuth. Foundry deployments have separate enterprise credential settings. |
google uses GEMINI_API_KEY; google-gemini-cli and google-antigravity use account sign-in; google-vertex uses Google Cloud project/location credentials. These IDs are not interchangeable. | |
| xAI | xai is the paid API-key route. xai-oauth is the SuperGrok or X Premium+ account route. |
| GitHub Copilot | Login uses GitHub's device flow. Enterprise users must authenticate against the intended Enterprise host; that host and API endpoint are kept with the credential. |
| GitLab Duo | gitlab-duo is the non-agentic route; gitlab-duo-agent is the Duo Agent route. Both can use GITLAB_TOKEN, but their model catalogs and request paths differ. |
| Z.AI | /login zai validates a coding-plan API key. The separate sign-in choice zai-coding-plan stores its minted credential under the model provider zai, so model selectors still start with zai/. |
| Azure OpenAI | A key alone is not enough if omp cannot infer your deployment endpoint. Configure the Azure endpoint/deployment route described in Custom models & providers. |
| Google Vertex | Application Default Credentials require a project and location. A catalog entry may exist before cloud identity is usable, so verify with omp models google-vertex. |
| Amazon Bedrock | Bedrock uses the AWS credential chain and region rather than a normal bearer key. bedrock-mantle is a separate bearer-token route. |
| Gateways | Use the gateway's provider ID when it has built-in discovery. For a private gateway or nonstandard URL, use models.yml; its configured apiKey deliberately overrides any stored upstream OAuth token. |
| Local engines | Automatic discovery is skipped when the same provider ID is explicitly configured or disabled. The engine must already be running and expose at least one model. |
Troubleshooting
The provider is locked or absent from omp models. Check its credential, then check whether it is disabled:
omp config get disabledProviders
A disabled provider stays unavailable even with valid credentials. Project settings can replace the global disabledProviders array; see Settings.
Login succeeded but the model list is stale. Run omp models refresh, then list the provider again. Dynamic catalogs may differ by account, workspace, region, or plan.
The wrong account or key is used. Compare your sources with the credential order above. Look for a pinned models.yml key, a stored OAuth account, an exported variable, and the four .env locations. Remove a managed account with /logout <provider>.
A custom provider is skipped. Run omp models; validation errors are printed before the list. A provider with explicit models needs baseUrl, an api value, and apiKey unless it declares auth: none.
A local provider returns no models. Confirm the engine is listening at the effective base URL and has a model loaded. Then run omp models refresh. An empty or unreachable local endpoint remains unavailable.