Skip to content

Conversation

jif-oai
Copy link
Contributor

@jif-oai jif-oai commented Sep 24, 2025

350k tokens for gpt-5-codex auto-compaction and update comments for better description

@jif-oai jif-oai marked this pull request as ready for review September 24, 2025 15:22
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 65 to +68
_ if slug.starts_with("gpt-5-codex") => Some(ModelInfo {
context_window: 272_000,
max_output_tokens: 128_000,
auto_compact_token_limit: Some(250_000),
auto_compact_token_limit: Some(350_000),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep auto-compaction below context window

The new auto_compact_token_limit for gpt-5-codex is set to 350_000 while the same block still declares a context_window of 272_000. Compaction is only triggered when get_auto_compact_token_limit() is exceeded (see the check in core/src/codex.rs around token_limit_reached), so raising the limit above the context window means the code now waits until the conversation already exceeds the model’s documented capacity before summarizing. This will allow requests to hit OpenAI “context length exceeded” errors instead of compacting pre‑emptively. Either keep the threshold below the context window or update the window value consistently.

Useful? React with 👍 / 👎.

@jif-oai jif-oai enabled auto-merge (squash) September 24, 2025 15:25
@jif-oai jif-oai merged commit db4aa6f into main Sep 24, 2025
19 checks passed
@jif-oai jif-oai deleted the jif/deploy-3 branch September 24, 2025 15:31
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants