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."