Model context window limits and early warnings before hitting the cap.
在接近模型限制时提前给出警告,避免 token 超限中断。
Hard-coded per-model context window sizes. Unknown models get a safe 128K default.
各模型上下文窗口大小硬编码。未知模型使用 128K 安全默认值。
| Model | 模型 | Context Window | 上下文窗口 |
|---|---|---|---|
deepseek-v4-flash | 1,000,000 | ||
deepseek-v4-pro | 1,000,000 | ||
deepseek-chat | 1,000,000 | ||
deepseek-reasoner | 1,000,000 | ||
claude-3-5-sonnet | 200,000 | ||
claude-sonnet-4 | 200,000 | ||
gpt-4o | 128,000 | ||
gpt-4o-mini | 128,000 | ||
gemini-2.0-flash | 1,000,000 | ||
gemini-1.5-pro | 2,000,000 | ||
| Unknown | 未知模型 | 128,000 |
The TUI status bar shows usage warnings before hitting the limit:
TUI 状态栏显示使用量警告:
WarnFraction = 0.60)WarnFraction = 0.60)/compact soon — usage > 75% (CriticalFraction = 0.75)/compact soon 提示——使用量超过 75%(CriticalFraction = 0.75)Warnings are passive (no popup, no picker). The TUI status bar (top-right) shows:
警告不打断对话,TUI 右上角显示:
ctx 42% # safe zone — muted grey ⚠ ctx 63% # > 60% — amber warning ⚠ ctx 77% — /compact soon # > 75% — red bold
/branch (fork) or /compact to reduce context/branch 分叉 / /compact 压缩)缩小上下文--resume in a new session, keeping the old one as referenceSee Session Management for context reduction strategies.
参见会话管理了解如何缩减上下文。
usage field, not local estimation