Setup
1. Install Qwen Code
2. Configure Bifrost as a Model Provider
Qwen Code uses~/.qwen/settings.json to configure model providers. Add Bifrost as an OpenAI-compatible provider:
3. Set Your API Key
Set theOPENAI_API_KEY environment variable to your Bifrost virtual key or provider API key:
.env file in ~/.qwen/.env:
4. Run Qwen Code
Virtual Keys
When Bifrost has virtual key authentication enabled, setOPENAI_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 Bifrost dashboard.
Model Selection
Use the/model command to switch between models at runtime. All models configured in your modelProviders appear in the picker.
- Use powerful models like
openai/gpt-5oranthropic/claude-sonnet-4-5-20250929for complex coding tasks - Use fast models like
groq/llama-3.3-70b-versatilefor quick completions
Using Multiple Providers
Bifrost routes requests to the correct provider based on the model name. Use theprovider/model-name format in your modelProviders config to access any configured provider through the single OpenAI endpoint:
modelProviders.openai array — they all use the same Bifrost baseUrl and envKey.
Supported Providers
Bifrost supports the following providers with theprovider/model-name format:
openai, azure, gemini, vertex, bedrock, mistral, groq, cerebras, cohere, perplexity, xai, ollama, openrouter, huggingface, nebius, parasail, replicate, vllm, sgl
Qwen Code connects to Bifrost via a single OpenAI-compatible endpoint. Bifrost handles routing to the correct provider based on the model name — no per-provider configuration needed.
Observability
All Qwen Code traffic through Bifrost is logged. Monitor it athttp://localhost:8080/logs — filter by provider, model, or search through conversation content to track usage.
Next Steps
- Provider Configuration — Configure AI providers in Bifrost
- Virtual Keys — Set up usage limits and access control

