mirror of
https://github.com/openai/codex.git
synced 2026-10-21 12:10:06 +00:00
Apply the unchanged-model compaction shortcut to all session sources (#47934)
Remove the basic-session restriction from the early return in `maybe_run_previous_model_inline_compact`. When the model is unchanged and no compaction compatibility hash change is detected, all session sources now skip rebuilding the previous model's turn context and checking its limits. GitOrigin-RevId: 75044856609603859b12e6668c7bae488ce0f7f5
This commit is contained in:
@@ -1350,10 +1350,7 @@ async fn maybe_run_previous_model_inline_compact(
|
||||
turn_context.model_info().comp_hash.as_deref(),
|
||||
);
|
||||
let previous_model = previous_turn_settings.model;
|
||||
if crate::guardian::is_basic_session_source(&turn_context.session_source)
|
||||
&& !should_compact_for_comp_hash_change
|
||||
&& previous_model == turn_context.model_info().slug
|
||||
{
|
||||
if !should_compact_for_comp_hash_change && previous_model == turn_context.model_info().slug {
|
||||
return Ok(());
|
||||
}
|
||||
let previous_model_turn_context = Arc::new(
|
||||
|
||||
Reference in New Issue
Block a user