@@ -123,12 +123,18 @@ class ModelInfoBase(ProviderSpecificModelInfo, total=False):
123
123
max_output_tokens : Required [Optional [int ]]
124
124
input_cost_per_token : Required [float ]
125
125
input_cost_per_token_flex : Optional [float ] # OpenAI flex service tier pricing
126
- input_cost_per_token_priority : Optional [float ] # OpenAI priority service tier pricing
126
+ input_cost_per_token_priority : Optional [
127
+ float
128
+ ] # OpenAI priority service tier pricing
127
129
cache_creation_input_token_cost : Optional [float ]
128
130
cache_creation_input_token_cost_above_1hr : Optional [float ]
129
131
cache_read_input_token_cost : Optional [float ]
130
- cache_read_input_token_cost_flex : Optional [float ] # OpenAI flex service tier pricing
131
- cache_read_input_token_cost_priority : Optional [float ] # OpenAI priority service tier pricing
132
+ cache_read_input_token_cost_flex : Optional [
133
+ float
134
+ ] # OpenAI flex service tier pricing
135
+ cache_read_input_token_cost_priority : Optional [
136
+ float
137
+ ] # OpenAI priority service tier pricing
132
138
input_cost_per_character : Optional [float ] # only for vertex ai models
133
139
input_cost_per_audio_token : Optional [float ]
134
140
input_cost_per_token_above_128k_tokens : Optional [float ] # only for vertex ai models
@@ -147,7 +153,9 @@ class ModelInfoBase(ProviderSpecificModelInfo, total=False):
147
153
output_cost_per_token_batches : Optional [float ]
148
154
output_cost_per_token : Required [float ]
149
155
output_cost_per_token_flex : Optional [float ] # OpenAI flex service tier pricing
150
- output_cost_per_token_priority : Optional [float ] # OpenAI priority service tier pricing
156
+ output_cost_per_token_priority : Optional [
157
+ float
158
+ ] # OpenAI priority service tier pricing
151
159
output_cost_per_character : Optional [float ] # only for vertex ai models
152
160
output_cost_per_audio_token : Optional [float ]
153
161
output_cost_per_token_above_128k_tokens : Optional [
@@ -1856,6 +1864,7 @@ class StandardLoggingUserAPIKeyMetadata(TypedDict):
1856
1864
user_api_key_team_alias : Optional [str ]
1857
1865
user_api_key_end_user_id : Optional [str ]
1858
1866
user_api_key_request_route : Optional [str ]
1867
+ user_api_key_auth_metadata : Optional [Dict [str , str ]]
1859
1868
1860
1869
1861
1870
class StandardLoggingMCPToolCall (TypedDict , total = False ):
@@ -2059,10 +2068,12 @@ class StandardLoggingGuardrailInformation(TypedDict, total=False):
2059
2068
2060
2069
StandardLoggingPayloadStatus = Literal ["success" , "failure" ]
2061
2070
2071
+
2062
2072
class CachingDetails (TypedDict ):
2063
2073
"""
2064
2074
Track all caching related metrics, fields for a given request
2065
2075
"""
2076
+
2066
2077
cache_hit : Optional [bool ]
2067
2078
"""
2068
2079
Whether the request hit the cache
@@ -2072,12 +2083,16 @@ class CachingDetails(TypedDict):
2072
2083
Duration for reading from cache
2073
2084
"""
2074
2085
2086
+
2075
2087
class CostBreakdown (TypedDict ):
2076
2088
"""
2077
2089
Detailed cost breakdown for a request
2078
2090
"""
2091
+
2079
2092
input_cost : float # Cost of input/prompt tokens
2080
- output_cost : float # Cost of output/completion tokens (includes reasoning if applicable)
2093
+ output_cost : (
2094
+ float # Cost of output/completion tokens (includes reasoning if applicable)
2095
+ )
2081
2096
total_cost : float # Total cost (input + output + tool usage)
2082
2097
tool_usage_cost : float # Cost of usage of built-in tools
2083
2098
@@ -2616,6 +2631,7 @@ class SpecialEnums(Enum):
2616
2631
2617
2632
class ServiceTier (Enum ):
2618
2633
"""Enum for service tier types used in cost calculations."""
2634
+
2619
2635
FLEX = "flex"
2620
2636
PRIORITY = "priority"
2621
2637
@@ -2662,13 +2678,14 @@ class CallbacksByType(TypedDict):
2662
2678
class PriorityReservationSettings (BaseModel ):
2663
2679
"""
2664
2680
Settings for priority-based rate limiting reservation.
2665
-
2681
+
2666
2682
Defines what priority to assign to keys without explicit priority metadata.
2667
2683
The priority_reservation mapping is configured separately via litellm.priority_reservation.
2668
2684
"""
2685
+
2669
2686
default_priority : float = Field (
2670
2687
default = 0.5 ,
2671
- description = "Priority level to assign to API keys without explicit priority metadata. Should match a key in litellm.priority_reservation."
2688
+ description = "Priority level to assign to API keys without explicit priority metadata. Should match a key in litellm.priority_reservation." ,
2672
2689
)
2673
2690
2674
2691
model_config = ConfigDict (protected_namespaces = ())
0 commit comments