From 274c40793fb45c903edd02025adb461c64a4fd4b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 18 Mar 2025 12:27:28 -0700 Subject: [PATCH] refactor: Use warn_setting variable for model setting warnings --- aider/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/main.py b/aider/main.py index 74cdc6e1c..3cd00ecc9 100644 --- a/aider/main.py +++ b/aider/main.py @@ -800,19 +800,19 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F if args.reasoning_effort is not None and ( not main_model.accepts_settings or "reasoning_effort" not in main_model.accepts_settings ): - # Refactor this to warn_setting = "reasoning_effort" - # Show the warning below by the ask. ai! + warn_setting = "reasoning_effort" io.tool_warning( - f"Warning: {main_model.name} may not support the 'reasoning_effort'" + f"Warning: The model {main_model.name} may not support the '{warn_setting}'" " setting." ) warned = True - + if args.thinking_tokens is not None and ( not main_model.accepts_settings or "thinking_tokens" not in main_model.accepts_settings ): + warn_setting = "thinking_tokens" io.tool_warning( - f"Warning: {main_model.name} may not support the 'thinking_tokens'" + f"Warning: The model {main_model.name} may not support the '{warn_setting}'" " setting." ) warned = True