SupaNexus

Qwen Code

Install Qwen Code, then point its OpenAI custom provider (or ~/.qwen/settings.json) at SupaNexus.

1. Get a SupaNexus API key

Sign in to the Developer Console, open your project → API Keys, create a key, and copy the secret immediately (shown once). One project key works across OpenAI-compatible and Anthropic-compatible clients.

2. Install Qwen Code

Install the CLI globally with npm, then confirm qwen is on PATH.

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

3. Authenticate with a custom OpenAI provider

Start qwen, run /auth, choose OpenAI → Use Custom Provider (wording may vary slightly by version). Set base URL to SupaNexus /v1 and paste the project API key. Pick a default model ID from the catalog.

qwen
> /auth
# OpenAI → Custom Provider
# Base URL: <BASE_URL>/v1
# API Key: sk-snx-...
# Model: deepseek/deepseek-chat

4. Optional: edit ~/.qwen/settings.json

You can also write the OpenAI-compatible env block directly. Prefer this for scripting or when /auth is unavailable in your build.

{
  "env": {
    "OPENAI_BASE_URL": "<BASE_URL>/v1",
    "OPENAI_API_KEY": "sk-snx-...",
    "OPENAI_MODEL": "deepseek/deepseek-chat"
  }
}

5. Pick a catalog model ID

Use exact IDs from the SupaNexus Models marketplace or GET /v1/models (for example deepseek/deepseek-chat, anthropic/claude-3-5-sonnet). Do not invent vendor-only slugs from other gateways.

6. Start a session and verify

Run qwen in your project, confirm the selected model, and send a short coding prompt. Check the SupaNexus console for the request.

cd /path/to/your/project
qwen

7. Troubleshooting

Still on DashScope / Qwen cloud: re-run /auth and ensure Custom Provider is selected. 401: key or base URL wrong — URL must include /v1. Model errors: OPENAI_MODEL must be a SupaNexus catalog id, not a DashScope-only name.

Setup guide →