fix: check gateway's supports_prompt_caching instead of always returning False

This commit is contained in:
Re-bin
2026-02-20 15:14:45 +00:00
parent b286457c85
commit cc04bc4dd1

View File

@@ -111,7 +111,7 @@ class LiteLLMProvider(LLMProvider):
def _supports_cache_control(self, model: str) -> bool:
"""Return True when the provider supports cache_control on content blocks."""
if self._gateway is not None:
return False
return self._gateway.supports_prompt_caching
spec = find_by_model(model)
return spec is not None and spec.supports_prompt_caching