mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(proxy): type the key emailed on virtual key creation
The untyped or-chain added one basedpyright unknown-variable error.
This commit is contained in:
parent
efc2dc1524
commit
bc5aa2ab0f
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ import asyncio
|
|||
import json
|
||||
from collections.abc import Sequence
|
||||
from datetime import datetime, timezone
|
||||
from typing import TYPE_CHECKING, Final
|
||||
from typing import TYPE_CHECKING, Final, cast
|
||||
|
||||
from pydantic import TypeAdapter
|
||||
|
||||
|
|
@ -532,7 +532,7 @@ class KeyManagementEventHooks:
|
|||
from litellm.proxy.proxy_server import general_settings, proxy_logging_obj
|
||||
|
||||
# generate_key_fn remaps token to the hashed token_id. The plaintext sk- key stays on key.
|
||||
plaintext_key: Final = response.get("key") or response.get("token") or ""
|
||||
plaintext_key: Final[str] = cast(str, response.get("key") or response.get("token") or "")
|
||||
|
||||
##########################
|
||||
# v2 integration for emails (enterprise)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue