mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-14 08:34:59 +00:00
feat: Add --reasoning-effort CLI parameter to control model reasoning effort
This commit is contained in:
parent
f4f4761517
commit
3fa796382e
2 changed files with 12 additions and 4 deletions
|
@ -304,6 +304,11 @@ def get_parser(default_config_files, git_root):
|
|||
default=2,
|
||||
help="Multiplier for map tokens when no files are specified (default: 2)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--reasoning-effort",
|
||||
type=float,
|
||||
help="Control how much effort the model spends on reasoning (0.0-1.0)",
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("History Files")
|
||||
|
|
|
@ -778,10 +778,13 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
)
|
||||
|
||||
# add --reasoning-effort cli param
|
||||
# defaults to None
|
||||
# if present, set main_model.extra_params["extra_body"]["reasoning_effort"] = <val>
|
||||
# be careful, not all those dicts will be initialized
|
||||
# ai!
|
||||
if args.reasoning_effort is not None:
|
||||
if not hasattr(main_model, 'extra_params'):
|
||||
main_model.extra_params = {}
|
||||
if 'extra_body' not in main_model.extra_params:
|
||||
main_model.extra_params['extra_body'] = {}
|
||||
main_model.extra_params['extra_body']['reasoning_effort'] = args.reasoning_effort
|
||||
|
||||
if args.copy_paste and args.edit_format is None:
|
||||
if main_model.edit_format in ("diff", "whole"):
|
||||
main_model.edit_format = "editor-" + main_model.edit_format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue