mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-10 14:45:00 +00:00
fixup: use template_vars
This commit is contained in:
parent
92a982ad9a
commit
c925cb8ad0
2 changed files with 5 additions and 4 deletions
|
@ -1595,7 +1595,7 @@ class Commands:
|
|||
# Display current value if no args are provided
|
||||
thinking_value = model.get_enable_thinking()
|
||||
if thinking_value is None:
|
||||
self.io.tool_output("thinking effort is not currently set.")
|
||||
self.io.tool_output("Thinking is not currently set.")
|
||||
else:
|
||||
self.io.tool_output(f"Current thinking setting: {thinking_value}")
|
||||
return
|
||||
|
|
|
@ -765,7 +765,7 @@ class Model(ModelSettings):
|
|||
self.extra_params["extra_body"] = {}
|
||||
try:
|
||||
setting = TypeAdapter(bool).validate_python(setting)
|
||||
self.extra_params["extra_body"]["enable_thinking"] = setting
|
||||
self.extra_params["extra_body"].setdefault("template_vars", {}).update({"enable_thinking": setting})
|
||||
except ValidationError:
|
||||
io.tool_warning("Warning: the enable-thinking command expects true or false")
|
||||
|
||||
|
@ -883,9 +883,10 @@ class Model(ModelSettings):
|
|||
if (
|
||||
self.extra_params
|
||||
and "extra_body" in self.extra_params
|
||||
and "enable_thinking" in self.extra_params["extra_body"]
|
||||
and "template_vars" in self.extra_params["extra_body"]
|
||||
and "enable_thinking" in self.extra_params["extra_body"]["template_vars"]
|
||||
):
|
||||
return self.extra_params["extra_body"]["enable_thinking"]
|
||||
return self.extra_params["extra_body"]["template_vars"]["enable_thinking"]
|
||||
return None
|
||||
|
||||
def is_deepseek_r1(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue