continuedev / continuedev/continue
DeepSeek FIM API 原生可用,但 Continue 的 autocomplete/FIM stream 链路报错
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
* OS: Windows
* Continue version: v1.2.22; also tested an older version from around 8 months ago
* IDE version: VS Code on Windows
* Model: deepseek-v4-pro
* Provider: deepseek
* Role: autocomplete
* File type tested: Markdown (`.md`)
* Config:
models:
- name: DeepSeek Autocomplete
provider: deepseek
model: deepseek-v4-pro
apiBase: https://api.deepseek.com/beta
roles:
- autocomplete
defaultCompletionOptions:
temperature: 0.0
maxTokens: 64
autocompleteOptions:
disable: false
maxPromptTokens: 1024
debounceDelay: 800
modelTimeout: 10000
maxSuffixPercentage: 0.2
prefixPercentage: 0.6
onlyMyCode: false
API key is omitted/redacted.
Description
DeepSeek FIM autocomplete fails in Continue, while the native DeepSeek FIM API works correctly.
Continue does trigger the FIM autocomplete path for Markdown files, but autocomplete fails with an internal error from llm_stream_fim.
The same DeepSeek FIM endpoint works when called directly with PowerShell:
- Endpoint:
https://api.deepseek.com/beta/completions - Model:
deepseek-v4-pro stream: true- Result: SSE chunks are returned successfully, ending with
[DONE]
So the issue does not seem to be the DeepSeek API key, network, endpoint, model name, or Markdown triggering. It appears to be related to Continue's DeepSeek FIM stream handling.
To reproduce
- Configure a DeepSeek autocomplete model in Continue:
- name: DeepSeek Autocomplete
provider: deepseek
model: deepseek-v4-pro
apiBase: https://api.deepseek.com/beta
roles:
- autocomplete
defaultCompletionOptions:
temperature: 0.0
maxTokens: 64
autocompleteOptions:
disable: false
maxPromptTokens: 1024
debounceDelay: 800
modelTimeout: 10000
maxSuffixPercentage: 0.2
prefixPercentage: 0.6
onlyMyCode: false
-
Enable Continue autocomplete.
-
Select
DeepSeek Autocompleteas the current autocomplete model. -
Enable FIM autocomplete over Next Edit.
-
Open a Markdown file.
-
Type something like:
## Fourier series
Let \(f(x)\) be defined on
-
Wait for autocomplete.
-
Continue triggers
llm_stream_fim, but no autocomplete suggestion appears and the extension logs an error.
Log output
[Extension Host] [@continuedev] error: {"context":"llm_stream_fim","model":"deepseek-v4-pro","provider":"deepseek","useOpenAIAdapter":true}
Error generating autocompletion: Error:
at streamResponse2 (...\continue.continue-1.2.22-win32-x64\out\extension.js:178977:11)
at async streamSse2 (...\continue.continue-1.2.22-win32-x64\out\extension.js:179048:20)
at async DeepSeekApi.fimStream (...\continue.continue-1.2.22-win32-x64\out\extension.js:243838:26)
at async Deepseek.streamFim (...\continue.continue-1.2.22-win32-x64\out\extension.js:318216:30)
Native DeepSeek FIM API test succeeds:
PowerShell request:
$body = @{
model = "deepseek-v4-pro"
prompt = "## Fourier series`n`nLet \(f(x)\) be defined on "
suffix = " and be piecewise smooth"
max_tokens = 64
temperature = 0
stream = $true
} | ConvertTo-Json
Invoke-RestMethod `
-Uri "https://api.deepseek.com/beta/completions" `
-Method Post `
-Headers @{
"Authorization" = "Bearer <redacted>"
"Content-Type" = "application/json"
} `
-Body $body
The response returns SSE data chunks and ends with:
data: [DONE]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the llm_stream_fim path through DeepSeekApi.fimStream and Deepseek.streamFim; the report only identifies the bundled extension.js locations. Compare Continue's handling with the successful DeepSeek SSE response and reproduce the Markdown autocomplete case. Done means the configured DeepSeek model produces an autocomplete suggestion without the stream error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100