fix(bedrock): rename the cache point inliner so the recursion detector stops flagging it

This commit is contained in:
mateo-berri 2026-09-16 12:30:33 -07:00
parent 3c15f64fd4
commit c052d7816e

View file

@ -59,7 +59,7 @@ def _content_block_with_cache_point(block: ContentBlock, cache_point: CachePoint
return {**block, "cachePoint": cache_point}
def _inline_cache_points(
def _inline_block_cache_points(
blocks: Sequence[_CachePointCarrier],
with_cache_point: Callable[[_CachePointCarrier, CachePointBlock], _CachePointCarrier],
) -> list[_CachePointCarrier]:
@ -153,11 +153,11 @@ class AmazonInvokeNovaConfig(AmazonInvokeConfig, AmazonConverseConfig):
"""
return {
**request,
"system": _inline_cache_points(request.get("system", []), _system_block_with_cache_point),
"system": _inline_block_cache_points(request.get("system", []), _system_block_with_cache_point),
"messages": [
MessageBlock(
role=message["role"],
content=_inline_cache_points(message["content"], _content_block_with_cache_point),
content=_inline_block_cache_points(message["content"], _content_block_with_cache_point),
)
for message in request.get("messages", [])
],