Skip to content

fix(models): update deepseek-v4-flash and pro max tokens to 384k - #32107

Closed
wricheek84 wants to merge 5 commits into
BerriAI:litellm_internal_stagingfrom
wricheek84:feature/learning-the-code
Closed

fix(models): update deepseek-v4-flash and pro max tokens to 384k#32107
wricheek84 wants to merge 5 commits into
BerriAI:litellm_internal_stagingfrom
wricheek84:feature/learning-the-code

Conversation

@wricheek84

@wricheek84 wricheek84 commented Jul 4, 2026

Copy link
Copy Markdown

Relevant issues

Fixes #32046

Pre-Submission checklist

  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem

Screenshots / Proof of Fix

Verified locally that the updated values parse correctly:

$env:LITELLM_LOCAL_MODEL_COST_MAP="True"
uv run python -c "import litellm; info = litellm.get_model_info('deepseek/deepseek-v4-flash'); print('Total Context:', info.get('max_tokens'), '| Max Output:', info.get('max_output_tokens'))"
Max Input: 1000000 | Max Output: 384000 | Max Tokens: 384000
<img width="1282" height="70" alt="image" src="https://github.com/user-attachments/assets/0a32318b-ac71-4e5a-b26c-29edbc5594f8" />

WhatsApp Image 2026-07-04 at 12 19 38

Type

🐛 Bug Fix

Changes

  • Fixed deepseek/deepseek-v4-flash and deepseek/deepseek-v4-pro token limits in model_prices_and_context_window.json to properly total context and 384k max output based on API docs.
  • Updated litellm/model_prices_and_context_window_backup.json to match.

yuneng-berri and others added 4 commits June 26, 2026 09:59
chore(ci): promote internal staging to main
chore(ci): promote internal staging to main
chore(ci): promote internal staging to main
chore(ci): promote internal staging to main
@CLAassistant

CLAassistant commented Jul 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR corrects stale token limits for the native DeepSeek V4 Flash and V4 Pro model entries, where both max_output_tokens and max_tokens were set to 8192 despite the models supporting 1M total context and 384k max output.

  • Four entries updateddeepseek-v4-flash, deepseek-v4-pro, deepseek/deepseek-v4-flash, and deepseek/deepseek-v4-pro — in both model_prices_and_context_window.json and the backup file, keeping them in sync.
  • The values (384k output, 1M context) are consistent with DeepSeek's official API documentation and match the equivalent entries already present for azure_ai and fireworks_ai variants of the same models.

Confidence Score: 5/5

Safe to merge — the change is a pure data correction to two JSON config files with no code logic impact.

The corrected values (384k max output, 1M total context) are confirmed by DeepSeek's API documentation and already appear correctly in the azure_ai and fireworks_ai provider variants of the same models. Both JSON files are updated consistently, all four affected entries are addressed, and the PR includes a local verification screenshot. No other deepseek-v4 entries were incorrectly left at 8192.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Corrects max_output_tokens (8192→384000) and max_tokens (8192→1000000) for four deepseek-v4-flash and deepseek-v4-pro entries. Values confirmed accurate against DeepSeek API documentation.
litellm/model_prices_and_context_window_backup.json Mirror of changes in model_prices_and_context_window.json — same four entries corrected, kept in sync with the primary file.

Reviews (1): Last reviewed commit: "bugfix(models): update deepseek-v4-flash..." | Re-trigger Greptile

@wricheek84 wricheek84 changed the title bugfix(models): update deepseek-v4-flash and pro max tokens to 384k fix(models): update deepseek-v4-flash and pro max tokens to 384k Jul 4, 2026
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

The base branch already contains this change (verified against the official provider docs); registry consolidation is tracked in the rolling PR #38990. Closing as superseded.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix "deepseek/deepseek-v4-flash" entry in "model_prices_and_context_window.json"

4 participants