fix(cli): send authentication error resume message to user, not llm (#10421)

This commit is contained in:
llamantino
2025-08-16 18:01:42 +02:00
committed by GitHub
parent fe486ad1f1
commit 19105a2a13

View File

@@ -360,12 +360,12 @@ async def run_session(
# Check if it's an authentication error
if 'ERROR_LLM_AUTHENTICATION' in error_message:
# Start with base authentication error message
initial_message = 'Authentication error with the LLM provider. Please check your API key.'
welcome_message = 'Authentication error with the LLM provider. Please check your API key.'
# Add OpenHands-specific guidance if using an OpenHands model
llm_config = config.get_llm_config()
if llm_config.model.startswith('openhands/'):
initial_message += " If you're using OpenHands models, get a new API key from https://app.all-hands.dev/settings/api-keys"
welcome_message += "\nIf you're using OpenHands models, get a new API key from https://app.all-hands.dev/settings/api-keys"
else:
# For other errors, use the standard message
initial_message = (