Benefits of Using Qwen Code with Nordlys
When you integrate Qwen Code with Nordlys, you unlock powerful capabilities:- Mixture of Models Activation: The right specialists activate per prompt
- Cost Optimization: Save 60-90% on API costs with lab‑tuned models
- Consistent Quality: Stable output quality across coding tasks
- Drop-in Integration: OpenAI-compatible settings with zero code changes
- Usage Analytics: Monitor model usage, costs, and performance in real-time
Get Your Nordlys API Key
Sign up here to create an account and generate your API key.Quick Setup
Run Automated Installer
- Install Qwen Code if not present (via npm)
- Configure OpenAI-compatible environment variables for Nordlys
- Add configuration to your shell profile (~/.bashrc, ~/.zshrc, etc.)
- Verify the installation
Verify Configuration
Start Using
Manual Installation
If you prefer to set up Qwen Code manually or need more control over the installation process:Step 1: Install Qwen Code
Qwen Code requires Node.js 20 or higher. Check your version with
node --version.Step 2: Configure Environment Variables
Qwen Code uses OpenAI-compatible API configuration:Step 3: Apply Configuration
Step 4: Verify Installation
Alternative Setup Methods
Advanced Configuration
Model Selection
Use Nordlys by setting the model ID explicitly:OPENAI_MODEL, Qwen Code will use its default model. Nordlys model
IDs will be listed in the docs as new models ship.
Usage Examples
Code Understanding & Editing
Workflow Automation
Session Management
Control your token usage with configurable session limits:Session token limit applies to a single conversation, not cumulative API calls.
Vision Model Support
Qwen Code includes automatic vision model detection for image analysis:Nordlys Model Behavior
Nordlys activates the right specialists per prompt and keeps costs predictable.Troubleshooting
Installation Issues
Installation Issues
Problem: Qwen Code installation failsSolutions:
-
Ensure Node.js 20+ is installed:
node --version -
Install Node.js if needed:
-
Check npm permissions:
npm config get prefix -
Try with sudo (not recommended):
sudo npm install -g @qwen-code/qwen-code -
Clear npm cache:
npm cache clean --force
Authentication Errors
Authentication Errors
Problem: “Unauthorized” or “Invalid API key” errorsSolutions:
- Verify your API key at nordlylabs.com/dashboard
-
Check environment variables are set:
-
Ensure variables are exported in your shell config:
- Restart your terminal if changes were made to shell config
-
Verify the base URL is correct:
https://api.nordlylabs.com/v1 -
Check for the
# qwen-codecomment to ensure correct environment variables
Connection Errors
Connection Errors
Problem: Cannot connect to Nordlys APISolutions:
- Check internet connectivity
-
Verify base URL is correct:
echo $OPENAI_BASE_URL -
Test API directly:
- Check if your network/firewall blocks the API endpoint
- Try using a different network or VPN
Model ID Issues
Model ID Issues
Problem: Requests fail due to a model ID errorSolutions:
-
Set the model ID explicitly:
- Confirm the value is spelled exactly and matches the docs.
Performance Issues
Performance Issues
Problem: Slow response times or timeoutsSolutions:
- Verify rate limits aren’t exceeded
- Check your network connection
- Reduce prompt size or request complexity
- Retry with smaller batches if processing large files
Session Token Limits
Session Token Limits
Problem: Hitting token limits in long sessionsSolutions:
-
Configure higher session limits in
.qwen/settings.json: -
Use session compression to reduce token usage:
-
Clear conversation history and start fresh:
-
Monitor token usage:
- Break large tasks into smaller sessions
Uninstallation
If you need to remove Qwen Code or revert configuration:1
Remove Qwen Code
2
Remove Environment Variables
Edit your shell config file and remove these lines:
3
Reload Shell Configuration
Next Steps
Monitor Usage & Savings
Track your cost savings and usage analytics in real-time
API Documentation
Learn about Nordlys’s API capabilities and advanced features
More CLI Tools
Explore other CLI tools with Nordlys integration
Advanced Model selection
Learn about advanced Nordlys model and load balancing
Monitor Usage & Savings
Track your cost savings and usage analytics in real-time
API Documentation
Learn about Nordlys’s API capabilities and advanced features
More CLI Tools
Explore other CLI tools with Nordlys integration
Advanced Model selection
Learn about advanced Nordlys model and load balancing
Was this page helpful? Contact us at
[email protected] for feedback or assistance
with your Qwen Code integration.



