Repository navigation
Conversation
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. Otherwise the helper still resolves beta/completions, covering the default root and bases written without a trailing slash. The added tests assert the /beta/ URL and JSON body, the default root URL, the concatenated stream text, and that a failed response throws the response body. Fixes continuedev#12600
2 of 4 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DeepSeek fill-in-the-middle autocomplete shows no suggestion and the extension logs a stream error. The same model and key return a normal streamed completion when DeepSeek’s beta completions endpoint is called directly. 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. A root base such as https://api.deepseek.com/ still resolves to /beta/completions, which is the path those bases need.
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. Otherwise the helper still resolves beta/completions, covering the default root and bases written without a trailing slash. The added tests assert the /beta/ URL and JSON body, the default root URL, the concatenated stream text, and that a failed response throws the response body.
Fixes #12600
AI Code Review
@continue-reviewAI was used for assistance.
Checklist
Screen recording or screenshot
No user-visible surface changes in this PR, so there is nothing to show.
Tests
No local test run is recorded for the continue Deepseek change to
core/llm/llms/Deepseek.tsandpackages/openai-adapters/src/apis/DeepSeek.ts.