mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
feat: Add --check-model-accepts-settings flag with default true
This commit is contained in:
parent
9fd5cfa777
commit
076c38526a
2 changed files with 8 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue