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:
- Qwen3 Coder (optimized for code generation)
- Additional models configurable via CLIProxy settings
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.
