Models & Credentials
Every harness needs a model to run and credentials to reach it. You declare the model in your agent YAML, and Omnigent manages the credentials that authenticate to each provider.
Choose a model
Declare the model in your agent YAML:
executor:
harness: claude-sdk
model: claude-sonnet-4-6
Override it at runtime without editing the file:
omni run agent.yaml --model claude-sonnet-4-6
Switch models mid-session
Use the /model command inside any running session to switch models on the fly.
The agent keeps its conversation history and tool state – only the underlying model changes.
Credentials
Omnigent needs credentials to talk to a model provider.
omni setup
The setup wizard walks you through adding a credential, setting a default, or removing one. It also auto-detects credentials already on your machine (API keys in environment variables, logged-in CLIs, and local servers) so you can confirm them with one tap.
From the web UI
You don't always need a terminal. When a connected host
is missing a provider credential, the web UI's setup dialog offers an Add a
credential action so you can configure it in the browser. It writes the
credential onto that host with the same non-interactive logic omni setup uses:
the secret goes to the host's OS keychain (falling back to
~/.omnigent/secrets.json), and the host's config.yaml gets a providers:
entry that references the secret rather than storing the raw value. The server
is only an authenticated pass-through — it forwards the credential to the host
over the tunnel and never persists or logs it.
The dialog supports three kinds:
- API key — a vendor key stored on the host.
- Gateway — an OpenAI- or Anthropic-compatible proxy; provide a
base_url(must start withhttp://orhttps://) plus a key. - Adopt — reuse a credential the host already has. The dialog lists the
adoptable API keys it detects in the host's environment (for example
$ANTHROPIC_API_KEY) and, on one click, writes a provider entry that references that variable by name — the value is never read or copied.
Once written, the host recomputes readiness and the dialog updates in place, so the harness becomes runnable without reconnecting.
This flow covers the harnesses whose provider credential Omnigent owns — the
Claude, Codex, and Pi families. Environment-authenticated harnesses
such as OpenCode and Qwen are not configurable from the UI; set those up
on the host with omni setup. The web-UI credential flow is only available when
the server has OMNIGENT_HARNESS_INSTALL_ENABLED turned on.
Credential types
| Type | What it is |
|---|---|
| API key | A first-party provider key (Anthropic, OpenAI, OpenRouter, and more) |
| Subscription | A Claude Pro/Max or ChatGPT Plus/Pro plan, via the official claude / codex CLIs |
| Gateway | Bring your own proxy or local model. Just paste a base URL and key. |
| Databricks | A Databricks workspace profile, routing through the Foundation Model API |
API key
Get a key from your provider's dashboard and add it via omni setup.
Supported providers:
| Provider | Key source |
|---|---|
| console.anthropic.com | |
| platform.openai.com | |
| openrouter.ai | |
| console.groq.com | |
| platform.deepseek.com | |
| console.x.ai | |
| console.mistral.ai | |
| api.together.xyz | |
| fireworks.ai |
Subscription
If you have a Claude Pro/Max or ChatGPT Plus/Pro plan, Omnigent can use your existing CLI login. No API key needed. Just make sure you're logged in:
claude auth login # for Claude Pro/Max
codex login # for ChatGPT
omni setup auto-detects an active CLI login and offers it as a one-tap option.
Gateway
Omnigent works with any OpenAI-compatible or Anthropic-compatible gateway:
omni setup asks for a base URL and a key. The base URL differs depending on the agent:
| Provider | For | Base URL | Key |
|---|---|---|---|
| OpenRouter | Claude Code | https://openrouter.ai/api | your OpenRouter key (sk-or-...) |
| OpenRouter | Codex / OpenAI agents | https://openrouter.ai/api/v1 | your OpenRouter key (sk-or-...) |
| Ollama (local) | Codex / OpenAI agents | http://localhost:11434/v1 | any value (Ollama ignores it) |
Note: For Claude Code, point at OpenRouter's Anthropic-compatible
endpoint (.../api, not .../api/v1); for Codex
and the OpenAI-agents harness, use the OpenAI-compatible .../api/v1.
Databricks
Route models through your Databricks workspace using the
Foundation Model API.
Omnigent resolves credentials from your ~/.databrickscfg profile.
executor:
harness: claude-sdk
model: databricks-claude-sonnet-4-6
auth:
type: databricks
profile: <your-profile>
Model names are prefixed with databricks- so Omnigent routes them through your
workspace automatically. See the
Databricks Foundation Model API docs
for the full list of available models.