feat(compression): raise compaction trigger to 85% for gpt-5.5 on Codex OAuth (#40957)
The ChatGPT Codex OAuth backend hard-caps gpt-5.5 at a 272K context window (verified live: a ~330K-token request to chatgpt.com/backend-api/codex/responses is rejected with context_length_exceeded while ~250K succeeds; the same slug exposes 1.05M on the direct OpenAI API / OpenRouter and 400K on Copilot). At the default 50% trigger, auto-compaction fires at ~136K — half the usable window. Raise the trigger to 85% (~231K) on this exact route only, gated by a new compression.codex_gpt55_autoraise config flag (default true). When it fires, emit a one-time notice (CLI inline print + gateway status_callback replay) with the exact opt-back-out command. gpt-5.5 on any other provider keeps the user's global threshold. - _is_codex_gpt55() matches the 5.5 family only on provider=openai-codex - _compression_threshold_for_model() now provider-aware + opt-out param - config key + _config_version bump (27->28) for backfill - docs + tests (40 cases in test_arcee_trinity_overrides.py)
This commit is contained in:
+11
-1
@@ -1139,6 +1139,16 @@ DEFAULT_CONFIG = {
|
||||
# Default False matches historical behavior; set to
|
||||
# True if you'd rather pause than silently lose
|
||||
# context turns when your aux model is flaky.
|
||||
"codex_gpt55_autoraise": True, # When True, gpt-5.5 on the ChatGPT Codex OAuth
|
||||
# route raises its compaction trigger to 85% (vs the
|
||||
# global `threshold` above). Codex hard-caps gpt-5.5
|
||||
# at a 272K window, so the default 50% would compact
|
||||
# at ~136K and waste half the usable context. Set to
|
||||
# False to opt back down to the global threshold
|
||||
# (e.g. 0.50) for Codex gpt-5.5 sessions. Only this
|
||||
# exact route is affected — gpt-5.5 on OpenAI's
|
||||
# direct API, OpenRouter, and Copilot keep the
|
||||
# global threshold regardless.
|
||||
},
|
||||
|
||||
# Anthropic prompt caching (Claude via OpenRouter or native Anthropic API).
|
||||
@@ -2420,7 +2430,7 @@ DEFAULT_CONFIG = {
|
||||
|
||||
|
||||
# Config schema version - bump this when adding new required fields
|
||||
"_config_version": 27,
|
||||
"_config_version": 28,
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user