Qwen Code supports modelProviders entries for OpenAI, Anthropic, and Gemini-style SDKs. Use the ModRouter endpoint that matches the auth type.

OpenAI-Compatible Setup

Set the ModRouter root URL and API key in the environment that launches Qwen Code:
Add ModRouter under modelProviders.openai:

Anthropic or Gemini Auth Types

If you configure Qwen Code’s anthropic or gemini auth type, use the matching ModRouter endpoint:

Model Selection

Use Qwen Code’s /model picker to select the configured ModRouter model entry. Prefer explicit provider/model IDs so ModRouter routing is unambiguous.