Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/docs/usage-guide/changing_a_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ See [litellm](https://docs.litellm.ai/docs/providers/bedrock#usage) documentatio

### DeepSeek

To use deepseek-chat model with DeepSeek, for example, set:
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"]
Comment on lines +330 to +335

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
Contributor 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?

```

and fill up your key
Expand All @@ -342,7 +342,7 @@ and fill up your key
key = ...
```

(you can obtain a deepseek-chat key from [here](https://platform.deepseek.com))
(you can obtain a deepseek-v4 key from [here](https://platform.deepseek.com/api_keys))

### DeepInfra

Expand Down
Loading