OpenAI-compatible setup
Aider can use OPENAI_API_BASE=https://api.sagerouter.dev/v1 with a hosted generated sk_sage_* key, or OPENAI_API_BASE=http://127.0.0.1:8790/v1 for local routing.
Aider model routing
Point Aider at one Sage Router endpoint for hosted, local, or Tailnet coding sessions. Sage Router can route edits across authorized OpenAI-compatible providers, Anthropic, Gemini, NVIDIA NIM, Ollama, and Ollama Cloud while preserving BYOK custody and failover policy.
Aider can use OPENAI_API_BASE=https://api.sagerouter.dev/v1 with a hosted generated sk_sage_* key, or OPENAI_API_BASE=http://127.0.0.1:8790/v1 for local routing.
Keep coding-strong local models first, then fail over to authorized cloud routes for larger edits, long context, or degraded local capacity.
When an Aider route, provider key, or upstream model rate-limits, Sage Router can choose the next healthy eligible route instead of making Aider own provider failover.
export OPENAI_API_BASE=https://api.sagerouter.dev/v1 export OPENAI_API_KEY=sk_sage_your_generated_key # Let Sage Router select by policy. aider --model openai/auto # Or point at a local Sage Router on port 8790: # export OPENAI_API_BASE=http://127.0.0.1:8790/v1 # export OPENAI_API_KEY=local-router # aider --model openai/auto
Escalate from local coder models to stronger cloud routes when refactors need more context, quality, or reliability.
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.
Aider is built for fast code edits. Sage Router keeps the Aider-side interface stable while moving provider choice, fallback, local/cloud preference, and telemetry into one routing layer.
Create an API key, open the Aider guide, copy the hosted quickstart, or estimate routing fit.