OpenAI-compatible endpoint
OpenHands can use OPENAI_BASE_URL=https://api.sagerouter.dev/v1 with a hosted generated sk_sage_* key, or OPENAI_BASE_URL=http://127.0.0.1:8790/v1 for local routing.
OpenHands model routing
Route every OpenHands agent action through one Sage Router endpoint. Keep OpenHands on a stable OpenAI-compatible interface while Sage Router selects across local models, Ollama Cloud, NVIDIA NIM, and authorized cloud APIs by policy, capability, latency, and provider health.
OpenHands can use OPENAI_BASE_URL=https://api.sagerouter.dev/v1 with a hosted generated sk_sage_* key, or OPENAI_BASE_URL=http://127.0.0.1:8790/v1 for local routing.
Use local-first for low-risk background work, balanced for general agent sessions, and stronger authorized cloud routes for fragile repo-wide changes.
When an OpenHands route, provider key, or upstream model rate-limits or fails, Sage Router can retry the next healthy eligible provider while OpenHands stays on one endpoint.
export OPENAI_BASE_URL=https://api.sagerouter.dev/v1 export OPENAI_API_KEY=sk_sage_your_generated_key # Or configure OpenHands config.toml: [llm] model = "auto" api_base = "https://api.sagerouter.dev/v1" api_key = "sk_sage_your_generated_key" # Local router alternative: # api_base = "http://127.0.0.1:8790/v1" # api_key = "local-router"
OpenHands keeps running through provider outages because the router owns retry and failover policy behind the endpoint.
Authorized credential pools can load balance and fail over on rate limits, provider health, latency, and policy.
Sage Router does not grant unauthorized OpenAI, Anthropic, Gemini, NVIDIA, Ollama Cloud, or other provider access. Customers bring authorized credentials or use hosted routing for Sage Router account control.
OpenHands does serious multi-step work. Sage Router keeps the agent pointed at one stable endpoint while moving model selection, health-aware fallback, local/cloud preference, and telemetry into one routing layer.
Create an API key, open the OpenHands guide, copy the hosted quickstart, or estimate routing fit.