Qwen Code (gateway)
Route Qwen Code’s LLM calls through the Respan gateway for automatic logging, caching, and model switching. Qwen Code supports any OpenAI-compatible endpoint, so only your RESPAN_API_KEY is needed.
Setup
Set environment variables
Add to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE), or to ~/.qwen/.env:
Then tell Qwen Code to use the OpenAI-compatible auth type without the interactive /auth prompt. Add to ~/.qwen/settings.json:
No separate provider key needed. The Respan gateway handles provider authentication.
Switch models
Change OPENAI_MODEL to use any of the 1000+ models available through the gateway.
See the full model list.