style: fix whitespace and format code

This commit is contained in:
Paul Gauthier (aider) 2025-03-08 17:26:20 -08:00
parent 6f99392eda
commit 3ed16fb796
2 changed files with 4 additions and 7 deletions

View file

@ -776,7 +776,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
# Set reasoning effort if specified
if args.reasoning_effort is not None:
main_model.set_reasoning_effort(args.reasoning_effort)
# Set thinking tokens if specified
if args.thinking_tokens is not None:
main_model.set_thinking_tokens(args.thinking_tokens)

View file

@ -590,18 +590,15 @@ class Model(ModelSettings):
if "extra_body" not in self.extra_params:
self.extra_params["extra_body"] = {}
self.extra_params["extra_body"]["reasoning_effort"] = effort
def set_thinking_tokens(self, num):
"""Set the thinking token budget for models that support it"""
if num is not None:
self.use_temperature = False
if not self.extra_params:
self.extra_params = {}
self.extra_params["thinking"] = {
"type": "enabled",
"budget_tokens": num
}
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num}
def is_deepseek_r1(self):
name = self.name.lower()
if "deepseek" not in name: