mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
refactor: Update reasoning effort command to accept string values
This commit is contained in:
parent
f37799b39c
commit
dc06c2fab3
1 changed files with 4 additions and 10 deletions
|
@ -1425,21 +1425,15 @@ class Commands:
|
||||||
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens.")
|
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens.")
|
||||||
|
|
||||||
def cmd_reasoning_effort(self, args):
|
def cmd_reasoning_effort(self, args):
|
||||||
"Set the reasoning effort level (valid values depend on the model, typically 0-1)"
|
"Set the reasoning effort level (valid values: number or low/medium/high depending on model)"
|
||||||
if not args.strip():
|
if not args.strip():
|
||||||
self.io.tool_error("Please specify a reasoning effort value (typically between 0-1).")
|
self.io.tool_error("Please specify a reasoning effort value (a number or low/medium/high).")
|
||||||
return
|
return
|
||||||
|
|
||||||
value = args.strip()
|
value = args.strip()
|
||||||
try:
|
|
||||||
effort = float(value)
|
|
||||||
except ValueError:
|
|
||||||
self.io.tool_error(f"Invalid reasoning effort value: {value}. Please use a number.")
|
|
||||||
return
|
|
||||||
|
|
||||||
model = self.coder.main_model
|
model = self.coder.main_model
|
||||||
model.set_reasoning_effort(effort)
|
model.set_reasoning_effort(value)
|
||||||
self.io.tool_output(f"Set reasoning effort to {effort}")
|
self.io.tool_output(f"Set reasoning effort to {value}")
|
||||||
|
|
||||||
def cmd_copy_context(self, args=None):
|
def cmd_copy_context(self, args=None):
|
||||||
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue