From 9fd5cfa777f4978b88ce364e2a8d57456a9c1522 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 18 Mar 2025 12:00:36 -0700 Subject: [PATCH] fix: warn when model settings are empty or missing specific keys --- aider/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/main.py b/aider/main.py index 60e6e7ddd..b233923d9 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 main_model.accepts_settings and "reasoning_effort" not in main_model.accepts_settings: + if 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 main_model.accepts_settings and "thinking_tokens" not in main_model.accepts_settings: + if 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."