fix: restore default context window for unknown 3p models (#494)

* fix: restore default context window for unknown 3p models

* fix: add MiniMax context metadata
This commit is contained in:
Kevin Codex
2026-04-08 02:45:49 +08:00
committed by GitHub
parent f9ce81bfb3
commit 69ea1f1e4a
3 changed files with 28 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ export function getContextWindowForModel(
// OpenAI-compatible provider — use known context windows for the model.
// Unknown models get a conservative 8k default so auto-compact triggers
// before hitting a hard context_window_exceeded error (issue #248 finding 3).
// before hitting a hard context_window_exceeded error.
const isOpenAIProvider =
isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI) ||