mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
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:
parent
0e9cd9893e
commit
b23bbb7670
1 changed files with 0 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue