Skip to main content
Home/Tools/Developer/Qwen Code Config Generator

Qwen Code Config Generator

Generate a Qwen Code settings.json and env vars — Alibaba Model Studio (any region), OpenRouter, or a local Ollama/LM Studio endpoint. OpenAI-compatible setup in seconds.

100% Private - Runs Entirely in Your Browser
No data is sent to any server. All processing happens locally on your device.

Generate a Qwen Code settings.json

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.

Install Qwen Code

npm install -g @qwen-code/qwen-code

Pick your provider

  • Alibaba Model Studio — choose the right regional base URL (International/Singapore, China/Beijing, or US/Virginia). Using the wrong region is the most common cause of 401 errors.
  • OpenRouter — base URL https://openrouter.ai/api/v1, model in provider/model[:tag] form, e.g. qwen/qwen3-coder:free.
  • Local (Ollama / LM Studio) — point at http://localhost:11434/v1 or :1234/v1; any non-empty API key works.

Environment variables

The env tab gives you OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL exports as a quick alternative to the settings file.

FAQ

Why am I getting 401 errors?

Almost always a base-URL/region or key mismatch. Make sure the base URL matches the region your key was issued in.

Does anything leave my browser?

No — the config is generated entirely on your device.

Loading interactive tool...

Generate a Qwen Code settings.json

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.

Install Qwen Code

npm install -g @qwen-code/qwen-code

Pick your provider

  • Alibaba Model Studio — choose the right regional base URL (International/Singapore, China/Beijing, or US/Virginia). Using the wrong region is the most common cause of 401 errors.
  • OpenRouter — base URL https://openrouter.ai/api/v1, model in provider/model[:tag] form, e.g. qwen/qwen3-coder:free.
  • Local (Ollama / LM Studio) — point at http://localhost:11434/v1 or :1234/v1; any non-empty API key works.

Environment variables

The env tab gives you OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL exports as a quick alternative to the settings file.

FAQ

Why am I getting 401 errors?

Almost always a base-URL/region or key mismatch. Make sure the base URL matches the region your key was issued in.

Does anything leave my browser?

No — the config is generated entirely on your device.

You build the idea. I'll ship the product.

Productized MVP development for founders. 9 SaaS apps shipped — yours could be next, in 6 weeks. Secure by default.

ℹ️ Disclaimer

This tool is provided for informational and educational purposes only. All processing happens entirely in your browser - no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results. Use at your own discretion.