feat - add parent_otel_span to UserAPIKeyAuth

This commit is contained in:
Ishaan Jaff
2024-06-07 08:25:26 -07:00
parent 78a6604295
commit 737f8aa61b
+6
View File
@@ -6,6 +6,8 @@ from datetime import datetime
import uuid, json, sys, os
from litellm.types.router import UpdateRouterConfig
from litellm.types.utils import ProviderField
from typing_extensions import Annotated
from opentelemetry.trace import Span
class LitellmUserRoles(str, enum.Enum):
@@ -1194,6 +1196,7 @@ class UserAPIKeyAuth(
]
] = None
allowed_model_region: Optional[Literal["eu"]] = None
parent_otel_span: Optional[Span] = None
@model_validator(mode="before")
@classmethod
@@ -1206,6 +1209,9 @@ class UserAPIKeyAuth(
values.update({"api_key": hash_token(values.get("api_key"))})
return values
class Config:
arbitrary_types_allowed = True
class LiteLLM_Config(LiteLLMBase):
param_name: str