feat(deepseek): register deepseek-v4-pro and deepseek-v4-flash models#2477
Merged
Merged
Conversation
Register the new DeepSeek V4 model names (deepseek-v4-pro, deepseek-v4-flash) with their 1M-token context window so they can be used without setting custom_model_max_tokens. These replace the deepseek-chat / deepseek-reasoner names, which DeepSeek deprecates on 2026-07-24; the old entries are kept for backward compatibility.
Contributor
PR Summary by QodoRegister DeepSeek V4 model names with 1M-token context limits Description
Diagram
High-Level Assessment
Files changed (1)
|
Contributor
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.
What
Adds the new DeepSeek V4 model names to the
MAX_TOKENSregistry inpr_agent/algo/__init__.py:Why
DeepSeek is deprecating the
deepseek-chatanddeepseek-reasonermodel names on 2026-07-24, replacing them withdeepseek-v4-proanddeepseek-v4-flash(API docs). Both V4 models ship with a 1M-token context window.Without these entries,
get_max_tokens()raises an exception for the new model names unless the user manually setsconfig.custom_model_max_tokens. This complements the docs update in #2472, which points users at thedeepseek-v4-*names — that example would otherwise fail out of the box.The existing
deepseek-chat/deepseek-reasonerentries are left in place for backward compatibility until the deprecation date.Notes
The V4 models are unified chat/reasoning models (standard ChatCompletions, support temperature), so unlike
deepseek-reasonerthey are intentionally not added toUSER_MESSAGE_ONLY_MODELSorNO_SUPPORT_TEMPERATURE_MODELS.