Use Dragonfly with VS Code
Access Chinese AI models in VS Code through Continue, Cody, or any OpenAI-compatible extension.
Option 1: Continue (Recommended)
Continue is the most popular open-source AI coding assistant for VS Code.
Setup
- Install Continue from the VS Code Marketplace
- Open Continue config:
Cmd/Ctrl + Shift + P→ "Continue: Open Config" - Add Dragonfly as a provider in
config.yaml:
models:
- name: DeepSeek V3
provider: openai-compatible
model: deepseek/deepseek-chat
apiBase: https://dragonfly-api.com/v1
apiKey: sk-df-your-key
- name: DeepSeek R1
provider: openai-compatible
model: deepseek/deepseek-reasoner
apiBase: https://dragonfly-api.com/v1
apiKey: sk-df-your-key
- name: Kimi K2
provider: openai-compatible
model: moonshot/kimi-k2
apiBase: https://dragonfly-api.com/v1
apiKey: sk-df-your-key
tabAutocompleteModel:
provider: openai-compatible
model: doubao/doubao-1.5-pro-256k
apiBase: https://dragonfly-api.com/v1
apiKey: sk-df-your-key
- Select your model in the Continue sidebar and start coding.
Recommended Config
- Chat:
deepseek/deepseek-chat— best value for interactive coding - Autocomplete:
doubao/doubao-1.5-pro-256k— cheapest, fast enough for tab completion - Complex reasoning:
deepseek/deepseek-reasoner— for debugging and architecture
Option 2: Cline
Cline is an autonomous AI coding agent for VS Code.
Setup
- Install Cline from VS Code Marketplace
- Open Cline settings
- Select "OpenAI Compatible" as provider
- Configure:
- Base URL:
https://dragonfly-api.com/v1 - API Key:
sk-df-your-key - Model:
deepseek/deepseek-chat
- Base URL:
Option 3: Any OpenAI-Compatible Extension
Any VS Code extension that supports custom OpenAI endpoints works with Dragonfly:
- Base URL:
https://dragonfly-api.com/v1 - API Key: Your
sk-df-...key - Model: Any model from our model list
Available Models
| Model ID | Best For | Cost/1M tokens |
|---|---|---|
deepseek/deepseek-chat | General coding | $0.27 in / $1.10 out |
deepseek/deepseek-reasoner | Reasoning, debugging | $0.55 in / $2.19 out |
qwen/qwen3-235b-a22b | Multilingual | $1.00 in / $4.00 out |
moonshot/kimi-k2 | Long context | $1.00 in / $4.00 out |
doubao/doubao-1.5-pro-256k | Autocomplete, cheap | $0.30 in / $0.90 out |
Why Use Chinese Models for Coding?
- DeepSeek V3 scores within 2% of GPT-4o on coding benchmarks
- 97% cheaper than Claude for everyday coding tasks
- DeepSeek R1 outperforms GPT-4o on math and logic tasks
- Tab autocomplete with Doubao costs almost nothing
Most coding tasks don't need the most expensive model. Chinese models hit the sweet spot of quality and cost.
Troubleshooting
Continue can't connect — Make sure apiBase ends with /v1 (not /v1/).
Autocomplete is slow — Try doubao/doubao-1.5-pro-256k, it's optimized for low-latency responses.
Model not in dropdown — In Continue, models must be explicitly listed in config. Copy the model IDs exactly.