mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
refactor: Remove redundant model arg from get_thinking/reasoning calls
This commit is contained in:
parent
e1c3a2f8cf
commit
23348f8e65
2 changed files with 6 additions and 6 deletions
|
@ -209,12 +209,12 @@ class Coder:
|
||||||
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
|
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
|
||||||
|
|
||||||
# Check for thinking token budget
|
# Check for thinking token budget
|
||||||
thinking_tokens = main_model.get_thinking_tokens(main_model)
|
thinking_tokens = main_model.get_thinking_tokens()
|
||||||
if thinking_tokens:
|
if thinking_tokens:
|
||||||
output += f", {thinking_tokens} think tokens"
|
output += f", {thinking_tokens} think tokens"
|
||||||
|
|
||||||
# Check for reasoning effort
|
# Check for reasoning effort
|
||||||
reasoning_effort = main_model.get_reasoning_effort(main_model)
|
reasoning_effort = main_model.get_reasoning_effort()
|
||||||
if reasoning_effort:
|
if reasoning_effort:
|
||||||
output += f", reasoning {reasoning_effort}"
|
output += f", reasoning {reasoning_effort}"
|
||||||
|
|
||||||
|
|
|
@ -1496,7 +1496,7 @@ class Commands:
|
||||||
|
|
||||||
if not args.strip():
|
if not args.strip():
|
||||||
# Display current value if no args are provided
|
# Display current value if no args are provided
|
||||||
formatted_budget = model.get_thinking_tokens(model)
|
formatted_budget = model.get_thinking_tokens()
|
||||||
if formatted_budget is None:
|
if formatted_budget is None:
|
||||||
self.io.tool_output("Thinking tokens are not currently set.")
|
self.io.tool_output("Thinking tokens are not currently set.")
|
||||||
else:
|
else:
|
||||||
|
@ -1509,7 +1509,7 @@ class Commands:
|
||||||
value = args.strip()
|
value = args.strip()
|
||||||
model.set_thinking_tokens(value)
|
model.set_thinking_tokens(value)
|
||||||
|
|
||||||
formatted_budget = model.get_thinking_tokens(model)
|
formatted_budget = model.get_thinking_tokens()
|
||||||
budget = model.extra_params["thinking"].get("budget_tokens")
|
budget = model.extra_params["thinking"].get("budget_tokens")
|
||||||
|
|
||||||
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens ({formatted_budget}).")
|
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens ({formatted_budget}).")
|
||||||
|
@ -1525,7 +1525,7 @@ class Commands:
|
||||||
|
|
||||||
if not args.strip():
|
if not args.strip():
|
||||||
# Display current value if no args are provided
|
# Display current value if no args are provided
|
||||||
reasoning_value = model.get_reasoning_effort(model)
|
reasoning_value = model.get_reasoning_effort()
|
||||||
if reasoning_value is None:
|
if reasoning_value is None:
|
||||||
self.io.tool_output("Reasoning effort is not currently set.")
|
self.io.tool_output("Reasoning effort is not currently set.")
|
||||||
else:
|
else:
|
||||||
|
@ -1534,7 +1534,7 @@ class Commands:
|
||||||
|
|
||||||
value = args.strip()
|
value = args.strip()
|
||||||
model.set_reasoning_effort(value)
|
model.set_reasoning_effort(value)
|
||||||
reasoning_value = model.get_reasoning_effort(model)
|
reasoning_value = model.get_reasoning_effort()
|
||||||
self.io.tool_output(f"Set reasoning effort to {reasoning_value}")
|
self.io.tool_output(f"Set reasoning effort to {reasoning_value}")
|
||||||
self.io.tool_output()
|
self.io.tool_output()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue