litellm/tests/test_litellm/llms/bedrock
shubham-arora-clear e5786c6c35
fix(bedrock): preserve cache_control TTL on tools for Claude 4.5+ (#25855)
Bedrock enforces non-increasing TTL ordering across cache_control blocks
(tools → system → messages). The tool cache_control TTL was being
unconditionally dropped to the default 5m, while system blocks preserved
the user-specified TTL for Claude 4.5+ models. This mismatch caused
"a ttl='1h' block must not come after a ttl='5m' block" errors when
users set ttl='1h' on both tools and system.

Converse path: add_cache_point_tool_block() now accepts a model param
and preserves TTL for Claude 4.5+, matching _get_cache_point_block().

Invoke path: _remove_ttl_from_cache_control() now also processes tools
(was only processing system and messages).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:54:26 -07:00
..
chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
count_tokens style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
embed style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
files style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
image style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
image_edit Litellm ishaan april1 try2 (#25110) 2026-04-03 14:57:44 -07:00
invoke_agent fix: use fastuuid helper (#14903) 2025-09-25 15:47:01 -07:00
messages/invoke_transformations fix(bedrock): preserve cache_control TTL on tools for Claude 4.5+ (#25855) 2026-04-23 21:54:26 -07:00
passthrough style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
realtime style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
rerank style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vector_stores style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_anthropic_beta_support.py fix(bedrock): allowlist Bedrock Invoke body fields and filter all anthropic-beta values 2026-04-21 11:26:15 -07:00
test_base_aws_llm.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_bedrock_common_utils.py [Fix] Remove unresolved merge conflict markers in bedrock test file 2026-04-17 18:23:49 -07:00
test_bedrock_ssl_verify.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_cross_region_inference_profile_mapping.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mantle.py feat(bedrock): add support for bedrock-mantle endpoint (Claude Mythos Preview) (#26196) 2026-04-21 15:41:58 -07:00