From fa3c68fccd22ad08102cc2f9b3694bbcc5aee257 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 28 Mar 2025 17:46:12 -1000 Subject: [PATCH] fix: Use print for auth URL and refine missing key message --- aider/onboarding.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/onboarding.py b/aider/onboarding.py index 842309844..235d67557 100644 --- a/aider/onboarding.py +++ b/aider/onboarding.py @@ -87,10 +87,10 @@ def select_default_model(args, io, analytics): # Fall through to the final error message # Final fallback if no key found and OAuth not attempted or failed/declined - io.tool_error( - "No model specified and no API key found or configured.\n" - "Please set an API key environment variable (e.g., OPENAI_API_KEY),\n" - "use the OpenRouter authentication flow (if offered),\n" + io.tool_error("No model specified and no API key found or configured.") + io.tool_output( + "Please set an API key environment variable (e.g., OPENAI_API_KEY)," + "use the OpenRouter authentication flow," "or specify both --model and --api-key." ) io.offer_url(urls.models_and_keys, "Open documentation URL for more info?") @@ -263,7 +263,7 @@ def start_openrouter_oauth_flow(io, analytics): io.tool_output( "\nPlease open the following URL in your web browser to authorize Aider with OpenRouter:" ) - io.tool_output(auth_url) + print(auth_url) io.tool_output("\nWaiting for authentication... (Timeout: 2 minutes)") try: