From 3f3b1fb65703765a56a359bb06c6e10f5fa9893b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 28 Mar 2025 18:03:05 -1000 Subject: [PATCH] refactor: Update OpenRouter OAuth flow timeout to 5 minutes --- aider/onboarding.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aider/onboarding.py b/aider/onboarding.py index 7ba083757..ea09e5738 100644 --- a/aider/onboarding.py +++ b/aider/onboarding.py @@ -288,8 +288,8 @@ def start_openrouter_oauth_flow(io, analytics): io.tool_output() print(auth_url) - MINUTES=5 # ai! - io.tool_output("\nWaiting for authentication... (Timeout: 2 minutes)") + MINUTES = 5 + io.tool_output(f"\nWaiting for authentication... (Timeout: {MINUTES} minutes)") try: webbrowser.open(auth_url) @@ -300,7 +300,7 @@ def start_openrouter_oauth_flow(io, analytics): # Wait for the callback to set the auth_code or for timeout/error interrupted = False try: - shutdown_server.wait(timeout=120) # 2 minute timeout + shutdown_server.wait(timeout=MINUTES * 60) # Convert minutes to seconds except KeyboardInterrupt: io.tool_warning("\nOAuth flow interrupted by user.") analytics.event("oauth_flow_failed", provider="openrouter", reason="user_interrupt")