diff --git a/aider/io.py b/aider/io.py index 87bce5b17..62efbfe38 100644 --- a/aider/io.py +++ b/aider/io.py @@ -698,7 +698,12 @@ class InputOutput: options += "/(D)on't ask again" valid_responses.append("don't") - question += options + " [Yes]: " + if default.lower().startswith("y"): + question += options + " [Yes]: " + elif default.lower().startswith("n"): + question += options + " [No]: " + else: + question += options + f" [{default}]: " if subject: self.tool_output() @@ -732,13 +737,12 @@ class InputOutput: question, style=style, complete_while_typing=False, - default=default, ) else: res = input(question) if not res: - res = "y" # Default to Yes if no input + res = default break res = res.lower() good = any(valid_response.startswith(res) for valid_response in valid_responses) diff --git a/aider/main.py b/aider/main.py index bc76cffb6..ba7a39ae3 100644 --- a/aider/main.py +++ b/aider/main.py @@ -757,7 +757,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F ("OPENAI_API_KEY", "gpt-4o"), ("GEMINI_API_KEY", "flash"), ] - args.model = "gpt-4o-2024-08-06" # default + for env_key, model_name in model_key_pairs: if os.environ.get(env_key): args.model = model_name