Skip to content

fix: give DeepSeek V4 models a 1M last-resort context window - #226

Merged
jkyberneees merged 1 commit into
mainfrom
fix/deepseek-v4-context-window
Sep 9, 2026
Merged

fix: give DeepSeek V4 models a 1M last-resort context window#226
jkyberneees merged 1 commit into
mainfrom
fix/deepseek-v4-context-window

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

  • Last-resort context for the whole deepseek-v4* family is now 1M (flash, pro, and v4.1 preview ids).
  • V3 deepseek-chat / deepseek-reasoner stay at 128K.
  • This is the budget trim and maxContextTokens use — Flash was incorrectly capped at 131k.

Test plan

  • TestLastResortContext covers flash, pro, v4.1, and V3 ids
  • /api/models asserts 1M for deepseek-v4-flash and the v4.1 preview id
  • make vet && make lint (0 issues)
  • go test -short -race ./internal/llmclient/ ./cmd/odek/

Made with Cursor

Flash and v4.1 ids were falling through to the V3 128K default, so trim
and the ctx gauge used 131k against a 1M-class model.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jkyberneees
jkyberneees merged commit 50542fb into main Sep 9, 2026
10 checks passed
@jkyberneees
jkyberneees deleted the fix/deepseek-v4-context-window branch September 9, 2026 17:58
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.

1 participant