From 076c38526a08aafb30ce517140e152b57c7b2249 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 18 Mar 2025 12:01:45 -0700 Subject: [PATCH] feat: Add --check-model-accepts-settings flag with default true --- aider/args.py | 6 ++++++ aider/main.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/aider/args.py b/aider/args.py index 012383606..6db9dacd9 100644 --- a/aider/args.py +++ b/aider/args.py @@ -181,6 +181,12 @@ def get_parser(default_config_files, git_root): default=True, help="Only work with models that have meta-data available (default: True)", ) + group.add_argument( + "--check-model-accepts-settings", + action=argparse.BooleanOptionalAction, + default=True, + help="Check if model accepts settings like reasoning_effort/thinking_tokens (default: True)", + ) group.add_argument( "--max-chat-history-tokens", type=int, diff --git a/aider/main.py b/aider/main.py index b233923d9..af79b5fc2 100644 --- a/aider/main.py +++ b/aider/main.py @@ -789,7 +789,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: - if not main_model.accepts_settings or "reasoning_effort" not in main_model.accepts_settings: + if args.check_model_accepts_settings and (not main_model.accepts_settings or "reasoning_effort" not in main_model.accepts_settings): io.tool_warning( f"Warning: The model {main_model.name} may not support the 'reasoning_effort'" " setting." @@ -798,7 +798,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F # Set thinking tokens if specified if args.thinking_tokens is not None: - if not main_model.accepts_settings or "thinking_tokens" not in main_model.accepts_settings: + if args.check_model_accepts_settings and (not main_model.accepts_settings or "thinking_tokens" not in main_model.accepts_settings): io.tool_warning( f"Warning: The model {main_model.name} may not support the 'thinking_tokens'" " setting."