Skip to content

Commit 6a74d89

Browse files
committed
test(bedrock): use Claude Haiku 4.5 for cache TTL e2e tests
Revert the module-level _CACHE_TTL_MODEL_ID constant from Sonnet 4.5 back to Haiku 4.5 (us.anthropic.claude-haiku-4-5-20251001-v1:0). Haiku 4.5 is the newest Haiku available on Bedrock (no 4.6/4.7 yet), officially documented for 1h TTL support alongside Sonnet 4.5 and Opus 4.5, and runs the tests noticeably faster with lower per-run CI cost. The constant is kept so future Haiku versions can be adopted in one line once they become available.
1 parent 2af13f1 commit 6a74d89

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tests_integ/models/test_model_bedrock.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212
# Model ID used for prompt-caching TTL integration tests. Per
1313
# https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
14-
# the models that officially support 1h TTL on CachePoint are
15-
# Claude Opus 4.5, Claude Haiku 4.5, and Claude Sonnet 4.5. Using Sonnet 4.5
16-
# here for longer expected support lifecycle than Haiku.
17-
_CACHE_TTL_MODEL_ID = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
14+
# the models that officially support 1h TTL on CachePoint are Claude Opus 4.5,
15+
# Claude Haiku 4.5, and Claude Sonnet 4.5. Haiku 4.5 is the newest Haiku
16+
# available and is preferred for CI due to lower latency and cost relative to
17+
# the same-version Sonnet 4.5. Bump this when a newer Haiku is released that
18+
# supports CachePoint TTL.
19+
_CACHE_TTL_MODEL_ID = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
1820

1921

2022
@pytest.fixture
@@ -596,7 +598,7 @@ def test_prompt_caching_cache_tools_ttl():
596598
prefix because Bedrock's tool-prefix cache threshold varies by model and region.
597599
The critical behavior under test here is that the TTL field is accepted end-to-end.
598600
599-
Uses Claude Sonnet 4.5 which supports TTL in CachePointBlock on Bedrock per
601+
Uses Claude Haiku 4.5 which supports TTL in CachePointBlock on Bedrock per
600602
https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
601603
(Claude Opus 4.5, Claude Haiku 4.5, and Claude Sonnet 4.5 all support 1h TTL).
602604
"""
@@ -633,7 +635,7 @@ def test_prompt_caching_cache_config_auto_with_ttl():
633635
Verifies that the cache point appended to the last user message by _inject_cache_point
634636
carries the configured TTL, and that Bedrock accepts the request.
635637
636-
Uses Claude Sonnet 4.5 which supports TTL in CachePointBlock on Bedrock per
638+
Uses Claude Haiku 4.5 which supports TTL in CachePointBlock on Bedrock per
637639
https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
638640
"""
639641
model = BedrockModel(
@@ -672,7 +674,7 @@ def test_prompt_caching_aligned_1h_ttl_across_checkpoints():
672674
This test sets 1h TTL on all three checkpoints simultaneously and verifies the
673675
call succeeds.
674676
675-
Uses Claude Sonnet 4.5 which supports 1h TTL per
677+
Uses Claude Haiku 4.5 which supports 1h TTL per
676678
https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
677679
"""
678680
model = BedrockModel(

0 commit comments

Comments
 (0)