Free generator for Qwen Code config. Choose Alibaba Model Studio, OpenRouter, or a local endpoint and copy a ready-to-use ~/.qwen/settings.json plus matching environment variables. Fixes the region base-URL mistakes that cause 401s.
Qwen Code is OpenAI-compatible, so the same config shape works whether your model runs on Alibaba Model Studio, OpenRouter, or locally. This tool writes ~/.qwen/settings.json (the modelProviders block) and a matching set of environment variables.
npm install -g @qwen-code/qwen-codehttps://openrouter.ai/api/v1, model in provider/model[:tag] form, e.g. qwen/qwen3-coder:free.http://localhost:11434/v1 or :1234/v1; any non-empty API key works.The env tab gives you OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL exports as a quick alternative to the settings file.
Almost always a base-URL/region or key mismatch. Make sure the base URL matches the region your key was issued in.
No — the config is generated entirely on your device.