mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Add Anthropic Models to Cache Prompt (#3775)
* Add Anthropic Models to Cache Prompt * Update Cache Prompt Active Check for Partial String Matching
This commit is contained in:
@@ -478,9 +478,8 @@ class LLM:
|
||||
Returns:
|
||||
boolean: True if prompt caching is active for the given model.
|
||||
"""
|
||||
return (
|
||||
self.config.caching_prompt is True
|
||||
and self.config.model in cache_prompting_supported_models
|
||||
return self.config.caching_prompt is True and any(
|
||||
model in self.config.model for model in cache_prompting_supported_models
|
||||
)
|
||||
|
||||
def _post_completion(self, response) -> None:
|
||||
|
||||
Reference in New Issue
Block a user