docs: update the configuration example of the Deepseek model#2472
docs: update the configuration example of the Deepseek model#2472Snoopy1866 wants to merge 1 commit into
Conversation
PR Summary by QodoDocs: update DeepSeek model config example to v4 names and API key link Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. DeepSeek v4 example breaks
|
| To use deepseek-v4 model with DeepSeek, for example, set: | ||
|
|
||
| ```toml | ||
| [config] # in configuration.toml | ||
| model = "deepseek/deepseek-chat" | ||
| fallback_models=["deepseek/deepseek-chat"] | ||
| model = "deepseek/deepseek-v4-pro" | ||
| fallback_models=["deepseek/deepseek-v4-flash"] |
There was a problem hiding this comment.
1. Deepseek v4 example breaks 🐞 Bug ≡ Correctness
The docs now recommend model = "deepseek/deepseek-v4-pro", but this model ID is not present in pr_agent.algo.MAX_TOKENS; with the default custom_model_max_tokens=-1, get_max_tokens() raises and PR-Agent fails during diff/prompt preparation. Users following the example will likely crash PR-Agent unless they also set config.custom_model_max_tokens or the code adds these model IDs to MAX_TOKENS.
Agent Prompt
## Issue description
The DeepSeek docs example was updated to `deepseek/deepseek-v4-pro` / `deepseek/deepseek-v4-flash`, but these model IDs are not present in `pr_agent.algo.MAX_TOKENS`. With default settings (`custom_model_max_tokens=-1`), PR-Agent raises in `get_max_tokens()` and fails during PR diff processing.
## Issue Context
Users copy/paste this section to configure PR-Agent. The system calls `get_max_tokens(model)` early in PR processing; if the model is missing from `MAX_TOKENS` and `custom_model_max_tokens` is not set to a positive value, the run fails.
## Fix Focus Areas
- docs/docs/usage-guide/changing_a_model.md[330-336]
- pr_agent/algo/__init__.py[66-71]
- pr_agent/algo/utils.py[992-1010]
- pr_agent/settings/configuration.toml[31-36]
- pr_agent/algo/pr_processing.py[67-80]
## What to change
Implement one of:
1) Update `MAX_TOKENS` (and any related model lists if needed) to include `deepseek/deepseek-v4-pro` and `deepseek/deepseek-v4-flash` with appropriate context sizes.
2) If you intentionally don’t want to hardcode these model IDs, update the DeepSeek docs snippet to include `custom_model_max_tokens=...` (a positive value) so it won’t raise at runtime.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
The maximum context length supported by deepseek-v4-pro and deepseek-v4-flash is 1000000. Do I need to open a separate PR and modify MAX_TOKENS in pr_agent/algo/__init__.py?
The two model names
deepseek-chatanddeepseek-reasonerwill be deprecated at 2026/07/24 23:59 Beijing time, and should be updated to the new model names:deepseek-v4-flashanddeepseek-v4-pro. In addition, this PR also updates the link to obtain the API key.https://api-docs.deepseek.com/