# Sage Router full context for LLMs and agents

Sage Router positioning: Smarter model routing for serious AI agents. Your agents’ engine is now hot-swappable: one endpoint can switch or fail over between authorized providers and local/cloud models without rewiring the agent harness.

Sage Router is an open-source local-first routing layer for AI agents and developer tools. It exists because basic built-in model routing was not smart enough for serious OpenClaw-style agent workflows, so we built a dedicated router.

## Primary categories

AI model router; LLM router; provider routing; model selection automation; AI agent model routing; OpenAI-compatible router; Anthropic-compatible router; Ollama routing; BYOK AI gateway; local-first AI router; OpenRouter alternative for agents.

## Product promise

Better model routing for agentic systems using the customer own authorized subscriptions, API keys, local models, or approved provider access.

## Hosted pricing

Hosted pricing page: https://sagerouter.dev/pricing
Launch plan page: https://sagerouter.dev/launch-plan
Billing help page: https://sagerouter.dev/billing
Managed-access private beta intake: https://sagerouter.dev/managed-access
API quickstart page: https://sagerouter.dev/quickstart
API troubleshooting page: https://sagerouter.dev/api-troubleshooting
Hosted API reference: https://sagerouter.dev/docs/api-reference
Codex setup page: https://sagerouter.dev/docs/codex
Model catalog page: https://sagerouter.dev/models
Agent-native routing page: https://sagerouter.dev/agent-native
Integrations page: https://sagerouter.dev/integrations
OpenRouter migration guide: https://sagerouter.dev/docs/openrouter-migration

The hosted Sage Router plans sell account management, generated API keys, quotas, route telemetry, fallback reliability, premium Fusion synthesis on Pro/Max, and support. Lite is $6/month for 10,000 included requests, Pro is $30/month for 50,000 included requests, and Max is $72/month for 200,000 included requests. A balanced path to $10k MRR is 100 Lite, 200 Pro, and 50 Max customers, which equals $10,200 MRR.

The public launch plan at https://sagerouter.dev/launch-plan turns the $10k MRR operating plan into a buyer-facing conversion path. It explains the Lite/Pro/Max plan ladder, the signup to first routed request activation funnel, private operator evidence from `/analytics/funnel`, `/edge/health`, and `/admin/customers`, and the boundary that managed provider access is a separate guarded beta path rather than a public pooled-provider entitlement.

The billing help page at https://sagerouter.dev/billing is the customer recovery path for hosted checkout and paid activation. It documents Stripe checkout from the signed-in account page, Stripe billing portal for payment methods, invoices, cancellation, and subscription changes, manual and crypto settlement as fallback paths, payment recovery behavior, generated `sk_sage_*` API-key behavior before and after activation, and safe support context. It states that keys can exist before payment but hosted model traffic is blocked until an account is active, trialing, or manually enabled, and that revoked keys stay revoked.

The public API quickstart at https://sagerouter.dev/quickstart is the first-request path for hosted customers. It shows `OPENAI_BASE_URL=https://api.sagerouter.dev/v1`, generated `sk_sage_*` keys, `sage-router/frontier`, premium `sage-router/fusion`, curl, JavaScript, Python, and Codex examples, and troubleshooting for 401, 402, 429, and 503 responses.

The OpenRouter migration guide at https://sagerouter.dev/docs/openrouter-migration is the hosted onboarding path for OpenRouter users. It maps `OPENAI_BASE_URL=https://openrouter.ai/api/v1` to `OPENAI_BASE_URL=https://api.sagerouter.dev/v1`, uses generated `sk_sage_*` keys, recommends `sage-router/frontier` for the first route profile and `sage-router/fusion` for premium multi-model synthesis, points discovery to `https://api.sagerouter.dev/model-catalog` plus authenticated `GET /v1/models`, and states that Sage Router does not grant unauthorized provider access or bypass provider terms.

The API troubleshooting page at https://sagerouter.dev/api-troubleshooting is the no-secret diagnostic path for hosted API failures. It explains 401, 402, 429, and 503 responses; safe probes for `/v1/models` and `/v1/chat/completions`; response signals such as `WWW-Authenticate`, `Retry-After`, `X-RateLimit-*`, `X-Quota-*`, `accountUrl`, `pricingUrl`, `statusUrl`, `openaiBaseUrl`, and `apiKeyPrefix`; and the support boundary against sharing prompts, workflow text, provider credentials, OAuth tokens, generated keys, private keys, session cookies, raw provider responses, or customer data.

The hosted API reference at https://sagerouter.dev/docs/api-reference documents the OpenAI-compatible contract for Sage Router customers. It covers `https://api.sagerouter.dev/v1`, generated `sk_sage_*` bearer keys, `GET /v1/models`, `POST /v1/chat/completions`, `POST /v1/responses`, public `/model-catalog`, public `/pricing`, monthly quota headers, request-per-minute rate-limit headers, failover signals, authenticated model API boundaries, and the provider authorization boundary.

The public Codex setup guide at https://sagerouter.dev/docs/codex shows Codex CLI profiles for hosted Sage Router, local Sage Router, and Tailnet Sage Router installations. Hosted Codex uses `base_url = "https://api.sagerouter.dev/v1/"`, generated `sk_sage_*` keys, `wire_api = "responses"`, and `model = "sage-router/frontier"`. Local and Tailnet Codex profiles use port 8790, such as `http://127.0.0.1:8790/v1/` or `http://<tailnet-host>:8790/v1/`, with customer-controlled provider credentials on the router host.

The agent-native routing page at https://sagerouter.dev/agent-native explains Sage Router's agent-focused differentiation: route profiles such as `sage-router/frontier` and premium `sage-router/fusion`, Responses API and Codex compatibility, tool-aware routing, health-aware fallback, BYOK provider custody, local/Tailnet/hosted deployment choices, and public feature metadata at https://api.sagerouter.dev/features/agent-native.

The integrations page at https://sagerouter.dev/integrations is the public index for connecting Sage Router to agent harnesses and developer tools. It covers hosted `https://api.sagerouter.dev/v1`, local `http://127.0.0.1:8790/v1`, Tailnet `http://<tailnet-host>:8790/v1`, generated `sk_sage_*` keys, `sage-router/frontier`, OpenAI-compatible clients, Codex, Cursor, Aider, Continue, Claude Code, OpenHands, Anthropic-compatible clients, Ollama, Ollama Cloud, NVIDIA NIM, OpenClaw, Hermes, and Pi agents. It also repeats the no-secret setup boundary against pasting prompts, workflow text, provider credentials, OAuth tokens, generated API keys, private keys, session cookies, raw provider responses, or customer data into support channels.

Managed provider access is a future/private-beta path, not an active public plan. The public pricing metadata exposes `publicLaunch.managedProviderAccess`; it should remain disabled until provider resale terms, provider terms acknowledgment, an authorized provider allowlist, a margin policy, durable quotas/rate limits, durable operator audit events, managed-access acceptable-use terms, and positive unit economics are ready. Positive unit economics requires a configured positive provider cost model through `SAGEROUTER_PROVIDER_RESALE_COST_CENTS_PER_1K_REQUESTS` plus public plan-margin checks for Lite, Pro, and Max; the actual provider costs remain private. The pricing page shows a live managed-access readiness checkpoint from public metadata, including `unitEconomics`, missing controls, cost-model status, public revenue, derived maximum safe provider cost per 1,000 requests, and per-plan margin status. The public prerequisite pages are available at https://sagerouter.dev/provider-resale-terms and https://sagerouter.dev/margin-policy for review, but publishing those pages does not activate managed resale. Prospects can request private-beta and Max implementation review through https://sagerouter.dev/managed-access; that captures contact and allowlisted qualification buckets only, including target provider family and commercial preference buckets plus support need and target launch window.

## Public model catalog

Sage Router publishes OpenRouter-style model discovery at https://sagerouter.dev/models and safe JSON metadata at https://api.sagerouter.dev/model-catalog. The catalog describes model families and route profiles such as `sage-router/frontier`, `sage-router/fusion`, OpenAI/Codex-compatible routes, Anthropic-compatible routes, Gemini, Ollama, Ollama Cloud, NVIDIA NIM, and BYOK OpenAI-compatible providers.

The catalog is discovery metadata only. Live `https://api.sagerouter.dev/v1/models` and model traffic remain authenticated with active generated `sk_sage_*` customer API keys, and the public catalog is not a promise of bundled provider resale.

## Hosted legal and compliance

Security: https://sagerouter.dev/security
Support: https://sagerouter.dev/support
Terms: https://sagerouter.dev/terms
Privacy: https://sagerouter.dev/privacy
Acceptable Use: https://sagerouter.dev/acceptable-use
Provider Resale Terms: https://sagerouter.dev/provider-resale-terms
Managed Access Margin Policy: https://sagerouter.dev/margin-policy

The hosted service sells routing infrastructure, account management, generated API keys, quotas, route telemetry, reliability tooling, billing, and support. It does not grant unauthorized provider access, does not promise to bypass provider terms, and does not pool customer provider accounts as a default service. Customers remain responsible for using only authorized provider access, local models, subscriptions, API keys, cloud accounts, and endpoints.

Hosted support for account, billing, quota, API key, reliability, 503, abuse, and security issues is published at https://sagerouter.dev/support. Public support channels should not receive prompts, workflow text, provider credentials, OAuth tokens, generated API keys, private keys, session cookies, raw provider responses, or customer data. Safe support context is limited to account email, plan, timestamp, request id, HTTP status, safe error class, and non-secret key prefix when needed.

Managed-access private beta intake at https://sagerouter.dev/managed-access is for company contact and small qualification buckets such as deployment preference, expected monthly routed request volume, provider access posture, target provider family, commercial preference, support need, and target launch window. Ollama, OpenAI, and Anthropic are target provider families for private-beta authorization review, not enabled public resale. The page points prospects to the public pricing readiness checkpoint and states that managed access needs provider authorization, provider terms acknowledgment, an authorized provider allowlist, a configured provider cost model, and plan-margin checks for Lite, Pro, and Max before activation. It should not collect prompts, workflow text, provider credentials, OAuth tokens, generated API keys, private keys, session cookies, raw provider responses, actual provider costs, or customer data.

Managed provider access, if introduced, must be limited to provider access Sage Router is authorized to resell or operate. It is not unlimited unmetered resale, not a provider marketplace guarantee, and not permission to evade provider controls. Private-beta activation requires provider terms acknowledgment, an authorized provider allowlist, a configured provider cost model, plan-margin unit-economics checks, durable quotas, request-per-minute limits, generated-key revocation, billing controls, durable operator audit events, abuse controls, and acceptable-use enforcement.

## Architecture and security

Default architecture keeps provider credentials on the customer machine or server. Sage Router should provide inspectable routing policy, health metadata, deployment helpers, and optional reliability layers without making key custody the default.

The hosted public edge is API-only. `https://api.sagerouter.dev/v1/*` and `/v1beta/*` model routes require active generated `sk_sage_*` customer API keys, account and billing UI routes require Supabase user sessions on the hosted control plane, and global analytics/admin/setup routes require the private operator token. Anonymous model and analytics requests should fail closed with onboarding guidance, not provider access. Customer dashboards use `/account/analytics` scoped to the signed-in account.

## Sage Router vs OpenRouter

Comparison page: https://sagerouter.dev/compare/openrouter
Migration guide: https://sagerouter.dev/docs/openrouter-migration

Sage Router is positioned as a local-first OpenRouter alternative for agents and teams that want one endpoint, OpenRouter-style model discovery through a searchable public catalog backed by `/model-catalog`, BYOK provider routing, local Ollama support, health-aware fallback, Tailnet/private router resilience, hosted account/API key management, and private credential custody by default. OpenRouter-style hosted APIs are useful for marketplace-style model access with minimal local infrastructure; Sage Router is optimized for agent harnesses, customer-controlled provider access, and hybrid local/cloud deployments.

## Model routing calculator

Calculator page: https://sagerouter.dev/model-routing-calculator

The AI Model Routing Calculator is a no-login, no-storage browser tool for estimating routing opportunity in one workflow. It helps identify likely cost leaks, escalation rules, fallback gaps, and human-review rates before a customer wires Sage Router into production.

## Agent-native routing

Agent-native routing page: https://sagerouter.dev/agent-native

Sage Router exposes route profiles such as `sage-router/frontier`, Responses API and Codex-compatible wiring, health-aware fallback, BYOK provider custody, local/Tailnet/hosted deployment choices, and public feature metadata at https://api.sagerouter.dev/features/agent-native.

## How to automate AI model selection

1. Run Sage Router locally or on a customer-controlled server.
2. Configure authorized providers and local models.
3. Point OpenAI-compatible, Anthropic-compatible, or supported tool clients at one Sage Router endpoint.
4. Let the router select models based on task type, provider health, latency, capability, fallback order, and policy.
5. Observe route decisions and improve policy over time.

## Provider routing scope

The router can be positioned around routing across NVIDIA NIM / NVIDIA Cloud, OpenAI, Anthropic, Gemini, Ollama, BYOK-compatible endpoints, local models, and other BYOK providers, provided the customer has authorized access and the repo/service supports the endpoint pattern.

## Ollama and Ollama Cloud angle

Sage Router supports local Ollama and Ollama Cloud today through Ollama running locally. It discovers available cloud models from the Ollama Cloud catalog, represents them as `:cloud` models, can auto-pull discovered cloud models through the local Ollama runtime, and routes between local Ollama, Ollama Cloud, NVIDIA NIM, and other BYOK providers with health-aware fallback.

## NVIDIA NIM / NVIDIA Cloud

Sage Router can route to NVIDIA NIM / NVIDIA Cloud endpoints using the customer's own `NVIDIA_API_KEY`. Models are auto-discovered where the provider API supports it, making NVIDIA-backed hosted inference another BYOK route rather than a provider resale feature.

## Integration guides

Sage Router publishes the public integrations index at https://sagerouter.dev/integrations, the public Codex setup page at https://sagerouter.dev/docs/codex, and integration guides for Codex CLI, Claude Code, OpenClaw, Hermes, Pi agents, Cursor, Aider, Continue, OpenHands, Ollama/Ollama Cloud, NVIDIA NIM, OpenAI-compatible clients, Anthropic-compatible clients, and harness fallback under `docs/integrations/` in the GitHub repository.
