diff --git a/computer-use-demo/computer_use_demo/loop.py b/computer-use-demo/computer_use_demo/loop.py index 2ca05da6..6da864a7 100644 --- a/computer-use-demo/computer_use_demo/loop.py +++ b/computer-use-demo/computer_use_demo/loop.py @@ -113,9 +113,9 @@ async def sampling_loop( if enable_prompt_caching: betas.append(PROMPT_CACHING_BETA_FLAG) _inject_prompt_caching(messages) - # Is it ever worth it to bust the cache with prompt caching? - if image_truncation_threshold: - image_truncation_threshold = 0 + # Because cached reads are 10% of the price, we don't think it's + # ever sensible to break the cache by truncating images + only_n_most_recent_images = 0 system["cache_control"] = {"type": "ephemeral"} if only_n_most_recent_images: