Integrations
Qwen Code
Run Qwen Code against Quobit through its OpenAI-compatible mode. Tested with Qwen Code 0.26.8.
Step 1 — Install
Install the Qwen Code CLI with npm. It requires Node.js 22 or later.
npm install -g @qwen-code/qwen-code
qwen --versionStep 2 — Provide your API key
Qwen Code reads the OpenAI-compatible key, base URL and model from these environment variables. Set them in the terminal that runs qwen.
export OPENAI_API_KEY="<your-api-key>"
export OPENAI_BASE_URL="https://api.quobit.ai/v1"
export OPENAI_MODEL="glm-5.2"Create your own key under API keys and treat it as private: do not commit it, paste it into tickets or chat, or write it into logs.
Step 3 — Select OpenAI-compatible authentication
So that the interactive app does not ask you to sign in to a Qwen account, add this to ~/.qwen/settings.json (create the file if needed). You can also pass --auth-type openai on the command line.
{
"security": { "auth": { "selectedType": "openai" } }
}Step 4 — Test the connection
qwen -p "Reply with exactly: OK"With a correct configuration Qwen Code replies "OK".
Notes
- OPENAI_API_KEY and OPENAI_BASE_URL are also read by other OpenAI tools. Set them only in the terminal session you use for Qwen Code if other tools on your machine use a different provider.
Common errors
- 401 authentication error: the key is missing, revoked or mistyped. Check that OPENAI_API_KEY is set in the same terminal that runs the client.
- 404 or model not found: use a public model alias enabled for your plan, exactly as shown on the Models page.
- 400 context too long: the conversation plus the requested output is longer than your plan allows per request. Start a new chat or shorten the conversation.
- 429 rate_window_exceeded: you have reached your plan's 5-hour cost window. Wait for it to roll over, or upgrade your plan.