fix: Add caching by default for deepseek coder.

This commit is contained in:
Paul Gauthier 2024-08-27 06:12:48 -07:00
parent ec6e23a852
commit 4705136951
2 changed files with 3 additions and 1 deletions

View file

@ -173,7 +173,7 @@ class Coder:
prefix = "Model"
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
if self.add_cache_headers:
if self.add_cache_headers or main_model.caches_by_default:
output += ", prompt cache"
if main_model.info.get("supports_assistant_prefill"):
output += ", infinite output"

View file

@ -75,6 +75,7 @@ class ModelSettings:
extra_headers: Optional[dict] = None
max_tokens: Optional[int] = None
cache_control: bool = False
caches_by_default: bool = False
# https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
@ -400,6 +401,7 @@ MODEL_SETTINGS = [
send_undo_reply=True,
examples_as_sys_msg=True,
reminder="sys",
caches_by_default=True,
),
ModelSettings(
"openrouter/deepseek/deepseek-coder",