How to Use DeepSeek for Coding in VS Code (Continue)
DeepSeek offers strong coding models over an API. There is no required first-party DeepSeek VS Code IDE — use the Continue extension with provider: deepseek. Continue’s docs commonly use deepseek-chat for chat and deepseek-coder for autocomplete.
In short: get a DeepSeek API key, install Continue, add chat + autocomplete models in ~/.continue/config.yaml, reload, and test on a small function. Re-check model names on the DeepSeek console if a name fails.
Why DeepSeek via Continue
DeepSeek is popular for low-cost coding help. Continue keeps you in VS Code with the same chat/edit UX you use for Ollama or Grok.
What you need
- DeepSeek API key: from the DeepSeek platform/console.
- Continue: extension
Continue.continue. - Chat model: docs example:
deepseek-chat. - Autocomplete model: docs example:
deepseek-coderwithroles: [autocomplete].
How it connects
Install steps
- Create an API key in the DeepSeek console. Store it in Continue secrets / environment variables.
- Install Continue: Marketplace search Continue, or
code --install-extension Continue.continue. - Open Continue → open
config.yaml. - Paste a DeepSeek chat model and (optional) coder autocomplete model.
- Reload config. Select DeepSeek Chat for the side chat.
Configuration
~/.continue/config.yaml (sample)name: DeepSeek Coding
version: 0.0.1
schema: v1
models:
- name: DeepSeek Chat
provider: deepseek
model: deepseek-chat
apiKey: ${{ secrets.DEEPSEEK_API_KEY }}
roles:
- chat
- edit
- apply
- name: DeepSeek Coder (autocomplete)
provider: deepseek
model: deepseek-coder
apiKey: ${{ secrets.DEEPSEEK_API_KEY }}
roles:
- autocomplete- provider:
deepseek. - Embeddings: Continue docs note DeepSeek may not offer embeddings — use another provider if you need @codebase embeddings.
- Local alternative: you can also run DeepSeek-derived models through Ollama; that is a different lesson (local Continue).
- Disable duplicate inline providers if Copilot and Continue autocomplete both fire.
Settings
- Use Chat for questions and Edit/Apply for patches.
- Try Agent only after chat works; tool-calling quality varies by model.
- Watch the DeepSeek usage dashboard so practice sessions do not surprise-bill you.
First task (5 minutes)
Language: Python 3.12. Write final_price(price, coupon=None) where SAVE10 is 10% off, result never below 0, round to 2 decimals. Example: final_price(200, "SAVE10") -> 180. Only the function.
- Apply to a single new file.
- Ask a follow-up for two pytest cases, or write them yourself.
- Run
pytest -q. Keep only green code.
| Model (docs examples) | Role |
|---|---|
| deepseek-chat | chat / edit / apply |
| deepseek-coder | autocomplete |
- Do not paste customer data into a cloud API.
- Follow company policy for China-/foreign-hosted APIs if that matters for your employer.
Quick quiz
1. Which Continue provider string?
deepseek.
2. Typical chat model id in Continue docs?
deepseek-chat.
3. Typical autocomplete model id?
deepseek-coder with autocomplete role.
4. Where is the config file?
~/.continue/config.yaml.
Save tokens and money
DeepSeek is often cheap, not free. Still prefer small prompts. Use Ollama locally when the code must not leave the machine.