Qwen Provider
Access Qwen Code models (Qwen3 Coder) through OAuth authentication with Device Code flow. No API keys required - authenticate via browser and use instantly.Overview
The Qwen provider enables Claude Code to use Qwen’s coding-specialized models through OAuth authentication. Uses Device Code flow for enhanced security. Provider Identifier:qwen
Command: ccs qwen
Supported Models (7 total):
- Qwen3 Max (flagship, 256K context) - Claude Opus equivalent
- Qwen3 Coder Plus (balanced, 1M context) - Claude Sonnet equivalent
- Qwen3 Coder Flash (fast, optimized for speed) - Claude Haiku equivalent
- Qwen3 Max Preview (experimental variant)
- Qwen3 235B (specialized variant)
- Qwen3 VL Plus (vision-language model)
- Qwen3 32B (lightweight variant)
Model Specifications
Tier Equivalence
Qwen models map to Claude tier equivalence for preset configuration:| Qwen Model | Claude Tier | Context | Use Case |
|---|---|---|---|
| Qwen3 Max | Opus | 256K | Complex reasoning, long documents |
| Qwen3 Coder Plus | Sonnet | 1M | Balanced code & analysis, extended context |
| Qwen3 Coder Flash | Haiku | Fast | Quick code generation, API responses |
Extended Context Support
- Qwen3 Coder Plus: Supports 1M token context window
- Qwen3 Max: Supports 256K context (substantial for most tasks)
- Use
--1mflag to enable extended context when available
Model Selection
Qwen provider does not support interactive model configuration via
--config. Use environment variable override or manual settings file editing.Authentication
First-Time Setup
- CCS displays device code and verification URL
- User opens URL in any browser
- Enter device code to authorize
- Token automatically cached when complete
- No callback server required (more secure)
Manual Authentication
Logout
Multi-Account Support
Manage multiple Qwen accounts for different projects:Add Account
List Accounts
Switch Account
Rename Account
~/.ccs/cliproxy/accounts.json
Auto-Nicknames: Generated from email prefix (e.g., john@example.com → john)
Configuration Options
Model Settings
Qwen provider settings stored in: Path:~/.ccs/qwen.settings.json
Configuration via Dashboard:
CLIProxy Integration
Qwen integrates with unified CLIProxy config: Path:~/.ccs/cliproxy/config.yaml
Provider Routing: Requests routed to /api/provider/qwen endpoint
Concurrent Usage: Run Qwen + other providers simultaneously without conflicts
Commands
Basic Usage
Authentication Flags
| Flag | Description |
|---|---|
--auth | Trigger OAuth flow (no session) |
--logout | Clear all tokens |
--auth --add | Add new account (keep existing) |
Account Management Flags
| Flag | Description |
|---|---|
--accounts | List all accounts |
--use <nickname> | Switch default account |
--nickname <name> | Rename default account |
Storage Locations
| Path | Purpose |
|---|---|
~/.ccs/cliproxy/auth/qwen-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry with nicknames |
~/.ccs/qwen.settings.json | Provider-specific settings |
~/.ccs/cliproxy/config.yaml | CLIProxy unified config |
Token Management
Storage Format:Device Code Flow Details
Why Device Code?- More secure (no callback server listening on local port)
- Works seamlessly in headless environments
- No port conflicts or firewall issues
- User completes auth on trusted device
- CCS requests device code from Qwen API
- Displays code + URL to user
- User authorizes in browser (any device)
- CCS polls Qwen API for token availability
- Token saved when authorization complete
null (no server required)
Requirements
- Qwen subscription
- Browser for OAuth (on any device - not necessarily same machine)
- Network access to Qwen authentication servers
Troubleshooting
Device Code Expired
Error: “Device code expired before authorization” Solution: Device codes expire after 10-15 minutes. Re-runccs qwen --auth to get new code.
Authorization Not Detected
Multi-Account Issues
Token Expiry
Tokens refresh automatically via CLIProxyAPI. If refresh fails:Model Alias Normalization
Available since v7.49.0
qwen3-max, Qwen3-Max, and qwen3_max all resolve to the same model. This prevents 406 errors from case or format mismatches in config files.
Cost Information
Qwen Subscription Required: Check qwen.ai for current pricing Usage Limits: Subject to Qwen’s rate limits and subscription tierNext Steps
Multi-Account Setup
Manage multiple Qwen accounts
Dashboard Config
Configure via web interface
