-
-
Notifications
You must be signed in to change notification settings - Fork 70
feat(providers): add deepseek responses adapter #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: "GoModel & DeepSeek" | ||
| description: "Configure DeepSeek V4 in GoModel and understand how reasoning effort is mapped to DeepSeek's reasoning_effort field." | ||
| icon: "brain" | ||
| --- | ||
|
|
||
| GoModel routes to DeepSeek through DeepSeek's chat completions API. DeepSeek | ||
| does not expose a native Responses API, so GoModel translates `/v1/responses` | ||
| requests to `/chat/completions` automatically. | ||
|
|
||
| ## 1. Configure DeepSeek | ||
|
|
||
| Env-only is enough: | ||
|
|
||
| ```bash | ||
| export DEEPSEEK_API_KEY="..." | ||
| ``` | ||
|
|
||
| Or in `config.yaml` (not recommended): | ||
|
|
||
| ```yaml | ||
| providers: | ||
| deepseek: | ||
| type: deepseek | ||
| base_url: "https://api.deepseek.com" | ||
| api_key: "${DEEPSEEK_API_KEY}" | ||
| ``` | ||
|
|
||
| <Note> | ||
| If you previously configured DeepSeek as `type: openai`, switch it to `type: | ||
| deepseek` so GoModel translates `/v1/responses` and remaps reasoning effort. | ||
| The generic OpenAI provider does neither. | ||
| </Note> | ||
|
|
||
| ## 2. Reasoning effort mapping | ||
|
|
||
| DeepSeek V4 reasoning models accept `reasoning_effort` as a top-level string | ||
| with two levels: `high` and `max`. GoModel accepts the standard OpenAI-style | ||
| levels and remaps them: | ||
|
|
||
| | Client sends | DeepSeek receives | | ||
| | --------------- | ----------------- | | ||
| | `low` | `high` | | ||
| | `medium` | `high` | | ||
| | `high` | `high` | | ||
| | `xhigh` / `max` | `max` | | ||
| | anything else | passed through | | ||
|
|
||
| `low` and `medium` are mapped up to `high` because DeepSeek's reasoning models | ||
| do not accept lower levels. If you want to avoid reasoning entirely, omit the | ||
| `reasoning` field instead of passing `low`. | ||
|
|
||
| GoModel rewrites the request body so DeepSeek sees a top-level | ||
| `reasoning_effort: "..."` instead of OpenAI's nested | ||
| `"reasoning": {"effort": "..."}` shape. No client change is required. | ||
|
|
||
| ## Current support | ||
|
|
||
| Integrated: | ||
|
|
||
| - chat completions and streaming | ||
| - Responses API and streaming (translated to chat completions) | ||
| - model listing through `/models` | ||
|
|
||
| Not supported by DeepSeek: | ||
|
|
||
| - embeddings (returns an `invalid_request_error`) |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ENTERPILOT/GoModel
Length of output: 44
Remove DeepSeek from the provider list in line 3.
The README advertises DeepSeek support, but the Helm chart does not expose any DeepSeek configuration (no
providers.deepseek.*orDEEPSEEK_*settings found inhelm/). Operators cannot configure this provider from Helm, so remove it from the description to match what the chart actually supports.🤖 Prompt for AI Agents