fix: drop the unreachable duplicate baseten branch in validate_environment

validate_environment's provider chain tests custom_llm_provider == "baseten"
twice, at lines 6171 and 6235. The elif at 6235 can never be reached because
6171 already matched, so those five lines are dead.

The two blocks are byte-identical, so removing the second one changes nothing:

    validate_environment(model="baseten/deployment-x")
    without BASETEN_API_KEY -> {'keys_in_environment': False, 'missing_keys': ['BASETEN_API_KEY']}
    with BASETEN_API_KEY    -> {'keys_in_environment': True,  'missing_keys': []}

Identical before and after. baseten is the only provider duplicated inside this
chain -- the other 42 appear exactly once.
This commit is contained in:
Lin Junrong 2026-08-12 14:42:38 +08:00
parent 0e9cd9893e
commit b23bbb7670

View file

@ -6232,11 +6232,6 @@ def validate_environment(
keys_in_environment = True
else:
missing_keys.append("CEREBRAS_API_KEY")
elif custom_llm_provider == "baseten":
if "BASETEN_API_KEY" in os.environ:
keys_in_environment = True
else:
missing_keys.append("BASETEN_API_KEY")
elif custom_llm_provider == "xai":
if "XAI_API_KEY" in os.environ:
keys_in_environment = True