The Point of Being Model-Agnostic
Hermes does not ship tied to one model vendor. hermes model is a single command that walks you through connecting any of over a dozen backends, and you can hold several configured at once, switching mid-session with /model. This lesson covers the three most common entry points: Nous Portal (aggregated OAuth), OpenRouter (aggregated API), and direct provider APIs.
Option 1: Nous Portal
The fastest path from zero to a working agent. One OAuth login covers 300+ frontier agentic models across providers, Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, Grok, and more, without juggling separate API keys and bills.
hermes setup --portal # OAuth + provider + gateway, in one command
hermes model # or, pick "Nous Portal" from the interactive list
This is the mode you used in Lesson 2’s Quick Setup. It’s the right default while you’re still deciding which model fits your workload.
Option 2: OpenRouter
OpenRouter is a pay-per-token aggregator with its own routing intelligence across the providers that host a given model.
# ~/.hermes/.env
OPENROUTER_API_KEY=sk-or-...
# ~/.hermes/config.yaml
model:
provider: "openrouter"
default: "anthropic/claude-sonnet-5"
provider_routing:
sort: "price" # or "throughput", "latency"
ignore: ["deepinfra"] # exclude specific backend providers
provider_routing is OpenRouter-specific and worth understanding: many open-weight models are hosted by several competing inference providers behind OpenRouter’s single API. sort tells OpenRouter which dimension to optimize when picking among them per request. If a project cares more about not timing out than about shaving fractions of a cent, switch to sort: "latency".
Option 3: Direct Provider APIs
For production workloads, or when you need provider-specific guarantees, connect directly.
Anthropic:
# ~/.hermes/.env
ANTHROPIC_API_KEY=sk-ant-...
model:
provider: "anthropic"
default: "claude-sonnet-5"
Claude subscribers can also use OAuth instead of a pay-per-token key, run hermes model and select the OAuth flow for extra usage credits on eligible plans.
OpenAI:
export OPENAI_API_KEY=sk-...
hermes chat --provider openai-api --model gpt-5.4
Google (direct or Vertex AI):
export GOOGLE_API_KEY=...
# Vertex AI variant, for GCP-native deployments
model:
provider: "vertex"
default: "google/gemini-3-flash-preview"
vertex:
project_id: "my-gcp-project"
region: "global"
AWS Bedrock, if your organization already routes model traffic through AWS, needs no API key at all, it uses the standard boto3 credential chain:
export AWS_PROFILE=my-profile
export AWS_REGION=us-east-1
hermes chat --provider bedrock --model us.anthropic.claude-sonnet-5
Switching Providers Mid-Session
You don’t need to restart Hermes to change models. Inside an active chat:
/model
opens the same picker hermes model shows outside a session, letting you swap providers or models on the fly, useful when you start a task on a fast, cheap model and want to escalate to a stronger one partway through.
Checking What You’ve Got Configured
hermes doctor
validates every configured provider’s credentials and reports which are reachable, catching a typo’d API key or an expired OAuth token before it surfaces as a confusing mid-task failure.
Exercise: connect two providers, Nous Portal (or OpenRouter) plus one direct API key, set your default to the aggregator, and confirm you can switch to the direct connection with
/modelmid-session. You’ll use both again in Lesson 6 when you build a fallback chain between them.