@@ -650,9 +650,9 @@ class GenerateRequestBase(LiteLLMPydanticObjectBase):
650
650
allowed_cache_controls : Optional [list ] = []
651
651
config : Optional [dict ] = {}
652
652
permissions : Optional [dict ] = {}
653
- model_max_budget : Optional [dict ] = (
654
- {}
655
- ) # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {}
653
+ model_max_budget : Optional [
654
+ dict
655
+ ] = {} # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {}
656
656
657
657
model_config = ConfigDict (protected_namespaces = ())
658
658
model_rpm_limit : Optional [dict ] = None
@@ -908,12 +908,12 @@ class NewCustomerRequest(BudgetNewRequest):
908
908
alias : Optional [str ] = None # human-friendly alias
909
909
blocked : bool = False # allow/disallow requests for this end-user
910
910
budget_id : Optional [str ] = None # give either a budget_id or max_budget
911
- allowed_model_region : Optional [AllowedModelRegion ] = (
912
- None # require all user requests to use models in this specific region
913
- )
914
- default_model : Optional [str ] = (
915
- None # if no equivalent model in allowed region - default all requests to this model
916
- )
911
+ allowed_model_region : Optional [
912
+ AllowedModelRegion
913
+ ] = None # require all user requests to use models in this specific region
914
+ default_model : Optional [
915
+ str
916
+ ] = None # if no equivalent model in allowed region - default all requests to this model
917
917
918
918
@model_validator (mode = "before" )
919
919
@classmethod
@@ -935,12 +935,12 @@ class UpdateCustomerRequest(LiteLLMPydanticObjectBase):
935
935
blocked : bool = False # allow/disallow requests for this end-user
936
936
max_budget : Optional [float ] = None
937
937
budget_id : Optional [str ] = None # give either a budget_id or max_budget
938
- allowed_model_region : Optional [AllowedModelRegion ] = (
939
- None # require all user requests to use models in this specific region
940
- )
941
- default_model : Optional [str ] = (
942
- None # if no equivalent model in allowed region - default all requests to this model
943
- )
938
+ allowed_model_region : Optional [
939
+ AllowedModelRegion
940
+ ] = None # require all user requests to use models in this specific region
941
+ default_model : Optional [
942
+ str
943
+ ] = None # if no equivalent model in allowed region - default all requests to this model
944
944
945
945
946
946
class DeleteCustomerRequest (LiteLLMPydanticObjectBase ):
@@ -1076,9 +1076,9 @@ class BlockKeyRequest(LiteLLMPydanticObjectBase):
1076
1076
1077
1077
class AddTeamCallback (LiteLLMPydanticObjectBase ):
1078
1078
callback_name : str
1079
- callback_type : Optional [Literal [ "success" , "failure" , "success_and_failure" ]] = (
1080
- " success_and_failure"
1081
- )
1079
+ callback_type : Optional [
1080
+ Literal [ "success" , "failure" , " success_and_failure"]
1081
+ ] = "success_and_failure"
1082
1082
callback_vars : Dict [str , str ]
1083
1083
1084
1084
@model_validator (mode = "before" )
@@ -1335,9 +1335,9 @@ class ConfigList(LiteLLMPydanticObjectBase):
1335
1335
stored_in_db : Optional [bool ]
1336
1336
field_default_value : Any
1337
1337
premium_field : bool = False
1338
- nested_fields : Optional [List [ FieldDetail ]] = (
1339
- None # For nested dictionary or Pydantic fields
1340
- )
1338
+ nested_fields : Optional [
1339
+ List [ FieldDetail ]
1340
+ ] = None # For nested dictionary or Pydantic fields
1341
1341
1342
1342
1343
1343
class ConfigGeneralSettings (LiteLLMPydanticObjectBase ):
@@ -1604,9 +1604,9 @@ class LiteLLM_OrganizationMembershipTable(LiteLLMPydanticObjectBase):
1604
1604
budget_id : Optional [str ] = None
1605
1605
created_at : datetime
1606
1606
updated_at : datetime
1607
- user : Optional [Any ] = (
1608
- None # You might want to replace ' Any' with a more specific type if available
1609
- )
1607
+ user : Optional [
1608
+ Any
1609
+ ] = None # You might want to replace 'Any' with a more specific type if available
1610
1610
litellm_budget_table : Optional [LiteLLM_BudgetTable ] = None
1611
1611
1612
1612
model_config = ConfigDict (protected_namespaces = ())
@@ -2354,9 +2354,9 @@ class TeamModelDeleteRequest(BaseModel):
2354
2354
# Organization Member Requests
2355
2355
class OrganizationMemberAddRequest (OrgMemberAddRequest ):
2356
2356
organization_id : str
2357
- max_budget_in_organization : Optional [float ] = (
2358
- None # Users max budget within the organization
2359
- )
2357
+ max_budget_in_organization : Optional [
2358
+ float
2359
+ ] = None # Users max budget within the organization
2360
2360
2361
2361
2362
2362
class OrganizationMemberDeleteRequest (MemberDeleteRequest ):
@@ -2545,9 +2545,9 @@ class ProviderBudgetResponse(LiteLLMPydanticObjectBase):
2545
2545
Maps provider names to their budget configs.
2546
2546
"""
2547
2547
2548
- providers : Dict [str , ProviderBudgetResponseObject ] = (
2549
- {}
2550
- ) # Dictionary mapping provider names to their budget configurations
2548
+ providers : Dict [
2549
+ str , ProviderBudgetResponseObject
2550
+ ] = {} # Dictionary mapping provider names to their budget configurations
2551
2551
2552
2552
2553
2553
class ProxyStateVariables (TypedDict ):
@@ -2675,9 +2675,9 @@ class LiteLLM_JWTAuth(LiteLLMPydanticObjectBase):
2675
2675
enforce_rbac : bool = False
2676
2676
roles_jwt_field : Optional [str ] = None # v2 on role mappings
2677
2677
role_mappings : Optional [List [RoleMapping ]] = None
2678
- object_id_jwt_field : Optional [str ] = (
2679
- None # can be either user / team, inferred from the role mapping
2680
- )
2678
+ object_id_jwt_field : Optional [
2679
+ str
2680
+ ] = None # can be either user / team, inferred from the role mapping
2681
2681
scope_mappings : Optional [List [ScopeMapping ]] = None
2682
2682
enforce_scope_based_access : bool = False
2683
2683
enforce_team_based_model_access : bool = False
@@ -2799,6 +2799,10 @@ class DailyUserSpendTransaction(BaseDailySpendTransaction):
2799
2799
user_id : str
2800
2800
2801
2801
2802
+ class DailyTagSpendTransaction (BaseDailySpendTransaction ):
2803
+ tag : str
2804
+
2805
+
2802
2806
class DBSpendUpdateTransactions (TypedDict ):
2803
2807
"""
2804
2808
Internal Data Structure for buffering spend updates in Redis or in memory before committing them to the database
0 commit comments