Qwen Code
Add FluxRouter to Qwen Code through its OpenAI-compatible provider at the /v1 base URL.
Qwen Code talks to FluxRouter through its OpenAI-compatible provider, which uses the /v1 endpoint. Your Flux key is the only credential it needs.
Manual config
The fastest path is environment variables:
export OPENAI_BASE_URL=https://api.fluxrouter.ai/v1
export OPENAI_API_KEY=sk-YOUR-FLUX-KEY
export OPENAI_MODEL=flux-auto
To persist the provider, add an entry to the modelProviders.openai array in ~/.qwen/settings.json:
{
"modelProviders": {
"openai": [
{
"name": "FluxRouter",
"baseURL": "https://api.fluxrouter.ai/v1",
"apiKey": "sk-YOUR-FLUX-KEY",
"model": "flux-auto"
}
]
}
}
The baseURL ends at /v1 (not /v1/chat/completions).
Test it
Run qwen and send a prompt. A reply confirms the connection. Check your FluxRouter dashboard to confirm the request landed.
Notes
flux-auto is the default and routes each request for you. If you want to pin a single lane, set the model to flux-fast, flux-standard, or flux-reasoning.