Skip to content

fix: correct DeepSeek V4 context windows - #489

Open
amartejak wants to merge 1 commit into
andrewyng:mainfrom
amartejak:fix/deepseek-v4-context-windows
Open

fix: correct DeepSeek V4 context windows#489
amartejak wants to merge 1 commit into
andrewyng:mainfrom
amartejak:fix/deepseek-v4-context-windows

Conversation

@amartejak

Copy link
Copy Markdown

Fixes #389.

Summary

  • correct the native DeepSeek V4 Flash and V4 Pro context windows from 128K to the official 1M limit
  • record deployment-specific limits for the curated reseller routes: 512K on Together serverless and 1,048,576 on Fireworks and OpenRouter
  • add a regression test that pins all five curated DeepSeek V4 context-window values

Using provider-specific limits matters here: DeepSeek exposes the full 1M context natively, while Together's serverless deployment currently exposes 512K. Treating every route as the model-level maximum would make the context meter and compaction trigger overestimate what that endpoint accepts.

Sources checked 2026-08-10:

Testing

pytest tests/test_token_usage.py tests/test_providers.py tests/test_compaction_engine.py -q
48 passed in 2.09s

No screenshot is applicable: this changes model metadata consumed by the existing context meter and compaction logic, with no UI layout change.

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.

Deepseek context window

1 participant