mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-10 08:28:25 +00:00
fix(openai): raise the SDK's own missing-credentials error so callers keep its class and status
This commit is contained in:
parent
9a710306f8
commit
10647ebfcb
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ def openai_sdk_key_params(api_key: str | None) -> OpenAISdkKeyParams:
|
|||
if not _SDK_READS_ADMIN_KEY_ENV:
|
||||
return {"api_key": api_key}
|
||||
if not api_key:
|
||||
raise OpenAIError(status_code=401, message=_MISSING_OPENAI_API_KEY_MESSAGE)
|
||||
raise openai.OpenAIError(_MISSING_OPENAI_API_KEY_MESSAGE)
|
||||
return {"api_key": api_key, "admin_api_key": api_key}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue