diff --git a/aider/main.py b/aider/main.py index 294da569e..f66114709 100644 --- a/aider/main.py +++ b/aider/main.py @@ -507,7 +507,14 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F return 1 if args.show_model_warnings: - models.sanity_check_models(io, main_model) + problem = models.sanity_check_models(io, main_model) + if problem: + io.tool_output("You can skip this sanity check with --no-show-model-warnings") + try: + if not io.confirm_ask("Proceed anyway?"): + return 1 + except KeyboardInterrupt: + return 1 repo = None if args.git: diff --git a/aider/models.py b/aider/models.py index bcbd08053..535368c2c 100644 --- a/aider/models.py +++ b/aider/models.py @@ -730,9 +730,11 @@ def validate_variables(vars): def sanity_check_models(io, main_model): - sanity_check_model(io, main_model) + problem_weak = None + problem_strong = sanity_check_model(io, main_model) if main_model.weak_model and main_model.weak_model is not main_model: - sanity_check_model(io, main_model.weak_model) + problem_weak = sanity_check_model(io, main_model.weak_model) + return problem_strong or problem_weak def sanity_check_model(io, model): @@ -771,6 +773,8 @@ def sanity_check_model(io, model): if show: io.tool_output(f"For more info, see: {urls.model_warnings}\n") + return show + def fuzzy_match_models(name): name = name.lower()