Skip to content

DeepSeek FIM API 原生可用,但 Continue 的 autocomplete/FIM stream 链路报错 #12600

Open

Description

@notzyyong

Before submitting your bug report

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

  1. 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
  1. Enable Continue autocomplete.

  2. Select DeepSeek Autocomplete as the current autocomplete model.

  3. Enable FIM autocomplete over Next Edit.

  4. Open a Markdown file.

  5. Type something like:

## Fourier series

Let \(f(x)\) be defined on
  1. Wait for autocomplete.

  2. 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]

Activity

  1. added
    area:autocompleteRelates to the auto complete feature
    ide:vscodeRelates specifically to VS Code extension
    kind:bugIndicates an unexpected problem or unintended behavior
    os:windowsHappening specifically on Windows
    on Jun 11, 2026
  2. MiklyWay0118 commented on Jul 16, 2026

    @MiklyWay0118

    On July 16th, I encountered this issue on my computer as well. However, it can be forced to occur once using a shortcut key.

  3. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  4. mvanhorn commented on Oct 17, 2026

    @mvanhorn
    Contributor

    FIM requests always resolved the relative path beta/completions against the configured API base. A base whose path is already /beta/ therefore becomes /beta/beta/completions, and the completions call fails.

    Both FIM call sites now build the endpoint with the same helper. When the pathname ends with /beta, trailing slashes are stripped and the request targets completions on that base.

    #13391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autocompleteRelates to the auto complete featureide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windowsstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions