Client setup
Qwen Code setup
Qwen Code's openai protocol supports OpenAI-compatible endpoints. These launch arguments provide the authentication method, model, and credential directly, without entering a sign-in flow or writing a settings file:
qwen --auth-type openai \
--model "your-client-facing-model-name" \
--openai-api-key "your-lumoswitch-access-key" \
--openai-base-url "https://api.lumoswitch.com/v1"For multiple persistent models, use modelProviders in user-level ~/.qwen/settings.json.
Export the credential in the shell that starts Qwen Code:
export OPENAI_API_KEY="your-lumoswitch-access-key"{
"modelProviders": {
"openai": {
"protocol": "openai",
"models": [
{
"id": "your-client-facing-model-name",
"name": "Lumoswitch model",
"envKey": "OPENAI_API_KEY",
"baseUrl": "https://api.lumoswitch.com/v1"
}
]
}
}
}Project-level .qwen/settings.json overrides user settings. Check this precedence and the current shell environment if setup appears ignored.
References: Qwen Code authentication and model providers.