@@ -326,6 +326,7 @@ class LiteLLMRoutes(enum.Enum):
326
326
"/v1/messages" ,
327
327
]
328
328
329
+ llm_api_routes = openai_routes + anthropic_routes + mapped_pass_through_routes
329
330
info_routes = [
330
331
"/key/info" ,
331
332
"/key/health" ,
@@ -654,9 +655,9 @@ class GenerateRequestBase(LiteLLMPydanticObjectBase):
654
655
allowed_cache_controls : Optional [list ] = []
655
656
config : Optional [dict ] = {}
656
657
permissions : Optional [dict ] = {}
657
- model_max_budget : Optional [dict ] = (
658
- {}
659
- ) # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {}
658
+ model_max_budget : Optional [
659
+ dict
660
+ ] = {} # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {}
660
661
661
662
model_config = ConfigDict (protected_namespaces = ())
662
663
model_rpm_limit : Optional [dict ] = None
@@ -918,12 +919,12 @@ class NewCustomerRequest(BudgetNewRequest):
918
919
alias : Optional [str ] = None # human-friendly alias
919
920
blocked : bool = False # allow/disallow requests for this end-user
920
921
budget_id : Optional [str ] = None # give either a budget_id or max_budget
921
- allowed_model_region : Optional [AllowedModelRegion ] = (
922
- None # require all user requests to use models in this specific region
923
- )
924
- default_model : Optional [str ] = (
925
- None # if no equivalent model in allowed region - default all requests to this model
926
- )
922
+ allowed_model_region : Optional [
923
+ AllowedModelRegion
924
+ ] = None # require all user requests to use models in this specific region
925
+ default_model : Optional [
926
+ str
927
+ ] = None # if no equivalent model in allowed region - default all requests to this model
927
928
928
929
@model_validator (mode = "before" )
929
930
@classmethod
@@ -945,12 +946,12 @@ class UpdateCustomerRequest(LiteLLMPydanticObjectBase):
945
946
blocked : bool = False # allow/disallow requests for this end-user
946
947
max_budget : Optional [float ] = None
947
948
budget_id : Optional [str ] = None # give either a budget_id or max_budget
948
- allowed_model_region : Optional [AllowedModelRegion ] = (
949
- None # require all user requests to use models in this specific region
950
- )
951
- default_model : Optional [str ] = (
952
- None # if no equivalent model in allowed region - default all requests to this model
953
- )
949
+ allowed_model_region : Optional [
950
+ AllowedModelRegion
951
+ ] = None # require all user requests to use models in this specific region
952
+ default_model : Optional [
953
+ str
954
+ ] = None # if no equivalent model in allowed region - default all requests to this model
954
955
955
956
956
957
class DeleteCustomerRequest (LiteLLMPydanticObjectBase ):
@@ -1086,9 +1087,9 @@ class BlockKeyRequest(LiteLLMPydanticObjectBase):
1086
1087
1087
1088
class AddTeamCallback (LiteLLMPydanticObjectBase ):
1088
1089
callback_name : str
1089
- callback_type : Optional [Literal [ "success" , "failure" , "success_and_failure" ]] = (
1090
- " success_and_failure"
1091
- )
1090
+ callback_type : Optional [
1091
+ Literal [ "success" , "failure" , " success_and_failure"]
1092
+ ] = "success_and_failure"
1092
1093
callback_vars : Dict [str , str ]
1093
1094
1094
1095
@model_validator (mode = "before" )
@@ -1346,9 +1347,9 @@ class ConfigList(LiteLLMPydanticObjectBase):
1346
1347
stored_in_db : Optional [bool ]
1347
1348
field_default_value : Any
1348
1349
premium_field : bool = False
1349
- nested_fields : Optional [List [ FieldDetail ]] = (
1350
- None # For nested dictionary or Pydantic fields
1351
- )
1350
+ nested_fields : Optional [
1351
+ List [ FieldDetail ]
1352
+ ] = None # For nested dictionary or Pydantic fields
1352
1353
1353
1354
1354
1355
class ConfigGeneralSettings (LiteLLMPydanticObjectBase ):
@@ -1616,9 +1617,9 @@ class LiteLLM_OrganizationMembershipTable(LiteLLMPydanticObjectBase):
1616
1617
budget_id : Optional [str ] = None
1617
1618
created_at : datetime
1618
1619
updated_at : datetime
1619
- user : Optional [Any ] = (
1620
- None # You might want to replace ' Any' with a more specific type if available
1621
- )
1620
+ user : Optional [
1621
+ Any
1622
+ ] = None # You might want to replace 'Any' with a more specific type if available
1622
1623
litellm_budget_table : Optional [LiteLLM_BudgetTable ] = None
1623
1624
1624
1625
model_config = ConfigDict (protected_namespaces = ())
@@ -2368,9 +2369,9 @@ class TeamModelDeleteRequest(BaseModel):
2368
2369
# Organization Member Requests
2369
2370
class OrganizationMemberAddRequest (OrgMemberAddRequest ):
2370
2371
organization_id : str
2371
- max_budget_in_organization : Optional [float ] = (
2372
- None # Users max budget within the organization
2373
- )
2372
+ max_budget_in_organization : Optional [
2373
+ float
2374
+ ] = None # Users max budget within the organization
2374
2375
2375
2376
2376
2377
class OrganizationMemberDeleteRequest (MemberDeleteRequest ):
@@ -2451,6 +2452,7 @@ class SpecialHeaders(enum.Enum):
2451
2452
anthropic_authorization = "x-api-key"
2452
2453
google_ai_studio_authorization = "x-goog-api-key"
2453
2454
azure_apim_authorization = "Ocp-Apim-Subscription-Key"
2455
+ custom_litellm_api_key = "x-litellm-api-key"
2454
2456
2455
2457
2456
2458
class LitellmDataForBackendLLMCall (TypedDict , total = False ):
@@ -2559,9 +2561,9 @@ class ProviderBudgetResponse(LiteLLMPydanticObjectBase):
2559
2561
Maps provider names to their budget configs.
2560
2562
"""
2561
2563
2562
- providers : Dict [str , ProviderBudgetResponseObject ] = (
2563
- {}
2564
- ) # Dictionary mapping provider names to their budget configurations
2564
+ providers : Dict [
2565
+ str , ProviderBudgetResponseObject
2566
+ ] = {} # Dictionary mapping provider names to their budget configurations
2565
2567
2566
2568
2567
2569
class ProxyStateVariables (TypedDict ):
@@ -2689,9 +2691,9 @@ class LiteLLM_JWTAuth(LiteLLMPydanticObjectBase):
2689
2691
enforce_rbac : bool = False
2690
2692
roles_jwt_field : Optional [str ] = None # v2 on role mappings
2691
2693
role_mappings : Optional [List [RoleMapping ]] = None
2692
- object_id_jwt_field : Optional [str ] = (
2693
- None # can be either user / team, inferred from the role mapping
2694
- )
2694
+ object_id_jwt_field : Optional [
2695
+ str
2696
+ ] = None # can be either user / team, inferred from the role mapping
2695
2697
scope_mappings : Optional [List [ScopeMapping ]] = None
2696
2698
enforce_scope_based_access : bool = False
2697
2699
enforce_team_based_model_access : bool = False
0 commit comments