mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(databricks/common_utils.py): fix custom endpoint check (#9925)
* fix(databricks/common_utils.py): fix custom endpoint check Fixes https://github.com/BerriAI/litellm/issues/9915 * fix(common_utils.py): add unit test to ensure custom_endpoint=False is handled correctly Fixes https://github.com/BerriAI/litellm/issues/9915
This commit is contained in:
parent
3ca82c22b6
commit
b9f01c9f5b
2 changed files with 33 additions and 1 deletions
|
@ -68,7 +68,7 @@ class DatabricksBase:
|
|||
headers: Optional[dict],
|
||||
) -> Tuple[str, dict]:
|
||||
if api_key is None and not headers: # handle empty headers
|
||||
if custom_endpoint is not None:
|
||||
if custom_endpoint is True:
|
||||
raise DatabricksException(
|
||||
status_code=400,
|
||||
message="Missing API Key - A call is being made to LLM Provider but no key is set either in the environment variables ({LLM_PROVIDER}_API_KEY) or via params",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue