Skip to content

Qwen Code

Qwen Code is Alibaba’s powerful coding assistant with advanced reasoning capabilities. By connecting it to DeepIntShield, you get access to any provider/model in your DeepIntShield configuration, plus governance features like virtual keys and built-in observability.

Terminal window
npm install -g @qwen-code/qwen-code

2. Configure DeepIntShield as a Model Provider

Section titled “2. Configure DeepIntShield as a Model Provider”

Qwen Code uses ~/.qwen/settings.json to configure model providers. Add DeepIntShield as an OpenAI-compatible provider:

{
"modelProviders": {
"openai": [
{
"id": "openai/gpt-5",
"name": "GPT-5 (via DeepIntShield)",
"baseUrl": "http://localhost:8080/openai",
"envKey": "OPENAI_API_KEY"
},
{
"id": "anthropic/claude-sonnet-4-5-20250929",
"name": "Claude Sonnet 4.5 (via DeepIntShield)",
"baseUrl": "http://localhost:8080/openai",
"envKey": "OPENAI_API_KEY"
}
]
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "openai/gpt-5"
}
}

Set the OPENAI_API_KEY environment variable to your DeepIntShield virtual key or provider API key:

Terminal window
export OPENAI_API_KEY=your-deepintshield-virtual-key

Alternatively, use a .env file in ~/.qwen/.env:

OPENAI_API_KEY=your-deepintshield-virtual-key
Terminal window
qwen

When DeepIntShield has virtual key authentication enabled, set OPENAI_API_KEY to your virtual key. This lets you enforce usage limits, budgets, and access control per user or environment.

For team deployments, create a separate virtual key for each team — each key can have its own rate limits, budgets, and provider access rules configured in the DeepIntShield dashboard.

Use the /model command to switch between models at runtime. All models configured in your modelProviders appear in the picker.

Terminal window
# Launch with a specific model
qwen --model "anthropic/claude-sonnet-4-5-20250929"
  • Use powerful models like openai/gpt-5 or anthropic/claude-sonnet-4-5-20250929 for complex coding tasks
  • Use fast models like groq/llama-3.3-70b-versatile for quick completions

DeepIntShield routes requests to the correct provider based on the model name. Use the provider/model-name format in your modelProviders config to access any configured provider through the single OpenAI endpoint:

anthropic/claude-sonnet-4-5-20250929
openai/gpt-5
gemini/gemini-2.5-pro
mistral/mistral-large-latest

Add multiple models to your modelProviders.openai array — they all use the same DeepIntShield baseUrl and envKey.

DeepIntShield supports the following providers with the provider/model-name format:

openai, azure, gemini, vertex, bedrock, mistral, groq, cerebras, cohere, perplexity, xai, ollama, openrouter, huggingface, nebius, parasail, replicate, vllm, sgl

All Qwen Code traffic through DeepIntShield is logged. Monitor it at http://localhost:8080/logs — filter by provider, model, or search through conversation content to track usage.