OpenHands (gateway)
Route OpenHands’ LLM calls through the Respan gateway for automatic logging, caching, and model switching. OpenHands uses LiteLLM under the hood and accepts any OpenAI-compatible base URL, so only your RESPAN_API_KEY is needed.
Setup
Set environment variables
Add to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE):
Keep the openai/ prefix on the model. It tells LiteLLM to use the OpenAI-compatible protocol, and the gateway receives the part after the prefix.
No separate provider key needed. The Respan gateway handles provider authentication.
You can also set the same values from inside the CLI. Press Ctrl+P, open Settings, switch to Advanced, and fill in Custom Model (openai/gpt-4o), Base URL (https://api.respan.ai/api), and API Key. Settings persist in ~/.openhands/, so you no longer need --override-with-envs.
Switch models
Change LLM_MODEL to use any of the 1000+ models available through the gateway. Keep the openai/ prefix.
See the full model list.