mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix: remove duplicate error message in provider validator (#10088)
This commit is contained in:
parent
d525c5ad93
commit
029a19ca05
@ -205,20 +205,11 @@ async def modify_llm_settings_basic(
|
||||
provider = verified_providers[choice_index]
|
||||
else:
|
||||
# User selected "Select another provider" - use manual selection
|
||||
# Define a validator function that prints an error message
|
||||
def provider_validator(x):
|
||||
is_valid = x in organized_models
|
||||
if not is_valid:
|
||||
print_formatted_text(
|
||||
HTML('<grey>Invalid provider selected: {}</grey>'.format(x))
|
||||
)
|
||||
return is_valid
|
||||
|
||||
provider = await get_validated_input(
|
||||
session,
|
||||
'(Step 1/3) Select LLM Provider (TAB for options, CTRL-c to cancel): ',
|
||||
completer=provider_completer,
|
||||
validator=provider_validator,
|
||||
validator=lambda x: x in organized_models,
|
||||
error_message='Invalid provider selected',
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user