Skip to content

Keep Codex gpt-5.5 compaction banner out of gateway chats#3

Merged
xbrrr merged 2 commits into
mainfrom
server-doctor/clean-codex-banner-fix
Jun 12, 2026
Merged

Keep Codex gpt-5.5 compaction banner out of gateway chats#3
xbrrr merged 2 commits into
mainfrom
server-doctor/clean-codex-banner-fix

Conversation

@xbrrr

@xbrrr xbrrr commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • raises Codex gpt-5.5 compaction trigger to 85% on the Codex OAuth route
  • keeps the auto-tuning notice out of gateway chat replay
  • adds regression coverage that the threshold applies without Telegram/Slack/Discord status callback spam

Test Plan

  • /Users/xbr/.local/src/hermes-agent/.venv/bin/python -m pytest tests/agent/test_codex_gpt55_autoraise_notice.py tests/agent/test_arcee_trinity_overrides.py tests/run_agent/test_compression_feasibility.py tests/gateway/test_stt_config.py -q
  • local runtime smoke: autoraised {'from': 0.5, 'to': 0.85}; _compression_warning=None; callbacks=[]

teknium1 and others added 2 commits June 12, 2026 19:23
…ex OAuth (NousResearch#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)
@github-actions

Copy link
Copy Markdown

🔎 Lint report: server-doctor/clean-codex-banner-fix vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9341 on HEAD, 9339 on base (🆕 +2)

🆕 New issues (2):

Rule Count
unresolved-attribute 2
First entries
tests/agent/test_codex_gpt55_autoraise_notice.py:34: [unresolved-attribute] unresolved-attribute: Object of type `AIAgent` has no attribute `_compression_warning`
tests/agent/test_codex_gpt55_autoraise_notice.py:33: [unresolved-attribute] unresolved-attribute: Object of type `AIAgent` has no attribute `context_compressor`

✅ Fixed issues: none

Unchanged: 4937 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@xbrrr xbrrr merged commit cd9e97e into main Jun 12, 2026
22 checks passed
@xbrrr xbrrr deleted the server-doctor/clean-codex-banner-fix branch June 12, 2026 16:31
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.

2 participants