Aider (gateway)
Route Aider ’s LLM calls through the Respan gateway for automatic logging, caching, and model switching. Aider supports OpenAI-compatible endpoints, so only your RESPAN_API_KEY is needed.
Paste this into your coding agent:
Help me set up the Respan gateway with the Aider integration.
Follow https://www.respan.ai/docs/integrations/gateway/aider.mdSetup
Install Aider
python -m pip install aider-install && aider-installSet environment variables
Add to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE):
export OPENAI_API_BASE="https://gateway.respan.ai"
export OPENAI_API_KEY="YOUR_RESPAN_API_KEY"No separate OpenAI API key needed. The Respan gateway handles provider authentication.
Run Aider
Prefix the model with openai/ so Aider uses the OpenAI-compatible route:
aider --model openai/gpt-4oAll LLM calls now route through Respan.
Switch models
Change the --model flag to use any of the 1000+ models available through the gateway. Keep the openai/ prefix so calls go through the OpenAI-compatible endpoint.
aider --model openai/gpt-4o
aider --model openai/claude-sonnet-4-5-20250929
aider --model openai/gemini/gemini-3.5-flashSee the full model list .