mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
Clamp auto-compact limit to context window (#11516)
- Clamp auto-compaction to the minimum of configured limit and 90% of context window - Add an e2e compact test for clamped behavior - Update remote compact tests to account for earlier auto-compaction in setup turns
This commit is contained in:
@@ -266,7 +266,6 @@ async fn remote_compact_trims_function_call_history_to_fit_context_window() -> R
|
||||
responses::ev_shell_command_call(trimmed_call_id, trimmed_command),
|
||||
responses::ev_completed("trimmed-call-response"),
|
||||
]),
|
||||
sse(vec![responses::ev_completed("trimmed-final-response")]),
|
||||
],
|
||||
)
|
||||
.await;
|
||||
@@ -385,10 +384,6 @@ async fn auto_remote_compact_trims_function_call_history_to_fit_context_window()
|
||||
"trimmed-final-response",
|
||||
500_000,
|
||||
)]),
|
||||
sse(vec![
|
||||
responses::ev_assistant_message("post-compact-assistant", "post compact complete"),
|
||||
responses::ev_completed("post-compact-final-response"),
|
||||
]),
|
||||
],
|
||||
)
|
||||
.await;
|
||||
|
||||
Reference in New Issue
Block a user