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

  1. Install Continue from the VS Code Marketplace
  2. Open Continue config: Cmd/Ctrl + Shift + P → "Continue: Open Config"
  3. 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
  1. 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

  1. Install Cline from VS Code Marketplace
  2. Open Cline settings
  3. Select "OpenAI Compatible" as provider
  4. Configure:
    • Base URL: https://dragonfly-api.com/v1
    • API Key: sk-df-your-key
    • Model: deepseek/deepseek-chat

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 IDBest ForCost/1M tokens
deepseek/deepseek-chatGeneral coding$0.27 in / $1.10 out
deepseek/deepseek-reasonerReasoning, debugging$0.55 in / $2.19 out
qwen/qwen3-235b-a22bMultilingual$1.00 in / $4.00 out
moonshot/kimi-k2Long context$1.00 in / $4.00 out
doubao/doubao-1.5-pro-256kAutocomplete, 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.