mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
Enable retained-image budgeting by default (#40994)
## What changed - Promote `compaction_image_budget` to stable and enable it by default. - Charge retained images against the remote compaction context budget unless the feature is explicitly disabled, trimming older images as needed. ## Testing - Update remote compaction coverage for the default, explicitly enabled, and explicitly disabled behavior. GitOrigin-RevId: 0f715347cefc33b814bdcfd9b430ef453d3bd6df
This commit is contained in:
@@ -1332,7 +1332,7 @@ async fn remote_manual_compact_chatgpt_auth_reuses_service_tier_and_prompt_cache
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case(None; "default_preserves_images")]
|
||||
#[test_case(None; "default_trims_images")]
|
||||
#[test_case(Some(false); "disabled_preserves_images")]
|
||||
#[test_case(Some(true); "enabled_trims_images")]
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
@@ -1437,7 +1437,7 @@ async fn remote_compact_v2_charges_retained_images_to_token_budget(
|
||||
follow_up.inputs_of_type("compaction")[0]["encrypted_content"],
|
||||
"IMAGE_BUDGET_SUMMARY"
|
||||
);
|
||||
let dropped = if image_budget_enabled == Some(true) {
|
||||
let dropped = if image_budget_enabled.unwrap_or(true) {
|
||||
cycle
|
||||
} else {
|
||||
0
|
||||
|
||||
@@ -1616,8 +1616,8 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
FeatureSpec {
|
||||
id: Feature::CompactionImageBudget,
|
||||
key: "compaction_image_budget",
|
||||
stage: Stage::UnderDevelopment,
|
||||
default_enabled: false,
|
||||
stage: Stage::Stable,
|
||||
default_enabled: true,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::RetainClientDeveloperMessages,
|
||||
|
||||
Reference in New Issue
Block a user