mirror of
https://github.com/openai/codex.git
synced 2026-11-05 08:28:29 +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:
1 parent
0340e12f5d
commit
528fd7ace5
2 files changed
+4
-4
No files matched your search
@@ -1332,7 +1332,7 @@ async fn remote_manual_compact_chatgpt_auth_reuses_service_tier_and_prompt_cache
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test_case(None; "default_preserves_images")]
|
#[test_case(None; "default_trims_images")]
|
||||||
#[test_case(Some(false); "disabled_preserves_images")]
|
#[test_case(Some(false); "disabled_preserves_images")]
|
||||||
#[test_case(Some(true); "enabled_trims_images")]
|
#[test_case(Some(true); "enabled_trims_images")]
|
||||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
#[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"],
|
follow_up.inputs_of_type("compaction")[0]["encrypted_content"],
|
||||||
"IMAGE_BUDGET_SUMMARY"
|
"IMAGE_BUDGET_SUMMARY"
|
||||||
);
|
);
|
||||||
let dropped = if image_budget_enabled == Some(true) {
|
let dropped = if image_budget_enabled.unwrap_or(true) {
|
||||||
cycle
|
cycle
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
|||||||
@@ -1616,8 +1616,8 @@ pub const FEATURES: &[FeatureSpec] = &[
|
|||||||
FeatureSpec {
|
FeatureSpec {
|
||||||
id: Feature::CompactionImageBudget,
|
id: Feature::CompactionImageBudget,
|
||||||
key: "compaction_image_budget",
|
key: "compaction_image_budget",
|
||||||
stage: Stage::UnderDevelopment,
|
stage: Stage::Stable,
|
||||||
default_enabled: false,
|
default_enabled: true,
|
||||||
},
|
},
|
||||||
FeatureSpec {
|
FeatureSpec {
|
||||||
id: Feature::RetainClientDeveloperMessages,
|
id: Feature::RetainClientDeveloperMessages,
|
||||||
|
|||||||
Reference in new issue
Block a user