Skip to content

docs: update the configuration example of the Deepseek model#2472

Open
Snoopy1866 wants to merge 1 commit into
The-PR-Agent:mainfrom
Snoopy1866:docs-changeing-a-model-deepseek
Open

docs: update the configuration example of the Deepseek model#2472
Snoopy1866 wants to merge 1 commit into
The-PR-Agent:mainfrom
Snoopy1866:docs-changeing-a-model-deepseek

Conversation

@Snoopy1866

@Snoopy1866 Snoopy1866 commented Jun 25, 2026

Copy link
Copy Markdown

The two model names deepseek-chat and deepseek-reasoner will be deprecated at 2026/07/24 23:59 Beijing time, and should be updated to the new model names: deepseek-v4-flash and deepseek-v4-pro. In addition, this PR also updates the link to obtain the API key.

https://api-docs.deepseek.com/

image

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 25, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Docs: update DeepSeek model config example to v4 names and API key link
📝 Documentation 🕐 Less than 5 minutes

Grey Divider

Description

• Update DeepSeek configuration example to use new v4 model identifiers.
• Switch fallback example from deprecated DeepSeek models to v4 replacements.
• Refresh the documentation link for obtaining a DeepSeek API key.
High-Level Assessment

The following are alternative approaches to this PR:

1. Add a deprecation note with both old and new model names
  • ➕ Reduces confusion for users still on deprecated identifiers
  • ➕ Makes the impending cutoff date explicit where users configure models
  • ➖ Slightly longer docs section
  • ➖ Requires keeping the note updated if timelines change
2. Use a small compatibility table (old → new) in the DeepSeek section
  • ➕ Clear at-a-glance migration guidance
  • ➕ Scales if additional model renames occur
  • ➖ More formatting/maintenance than a simple example update

Recommendation: The PR’s approach (updating the example to the new v4 model names and correcting the API key link) is the right default. Consider additionally adding a one-line deprecation/migration note (or a tiny old→new mapping table) to help users who still have configs using deepseek-chat / deepseek-reasoner.

Files changed (1) +4 / -4

Documentation (1) +4 / -4
changing_a_model.mdRefresh DeepSeek config example to v4 model names and API key URL +4/-4

Refresh DeepSeek config example to v4 model names and API key URL

• Updates the DeepSeek usage snippet to use 'deepseek-v4-pro' as the primary model and 'deepseek-v4-flash' as the fallback instead of deprecated identifiers. Adjusts the referenced DeepSeek API key acquisition link to point to the API keys page.

docs/docs/usage-guide/changing_a_model.md

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. DeepSeek v4 example breaks 🐞 Bug ≡ Correctness
Description
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.
Code

docs/docs/usage-guide/changing_a_model.md[R330-335]

+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"]
Evidence
The docs change introduces deepseek/deepseek-v4-pro and deepseek/deepseek-v4-flash, but
MAX_TOKENS currently only contains the older DeepSeek IDs. get_max_tokens() raises when a model is
missing and custom_model_max_tokens is not positive; defaults set custom_model_max_tokens=-1,
and PR processing calls get_max_tokens(model) during diff generation.

docs/docs/usage-guide/changing_a_model.md[328-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]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

  • Author self-review: I have reviewed the code review findings, and addressed the relevant ones.

Qodo Logo

Comment on lines +330 to +335
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"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant