mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
feat(proxy_server.py): expose new /model_group/info
endpoint
returns model-group level info on supported params, max tokens, pricing, etc.
This commit is contained in:
parent
bec13d465a
commit
22b6b99b34
6 changed files with 191 additions and 16 deletions
|
@ -411,3 +411,18 @@ class AlertingConfig(BaseModel):
|
|||
|
||||
webhook_url: str
|
||||
alerting_threshold: Optional[float] = 300
|
||||
|
||||
|
||||
class ModelGroupInfo(BaseModel):
|
||||
model_group: str
|
||||
providers: List[str]
|
||||
max_input_tokens: Optional[float] = None
|
||||
max_output_tokens: Optional[float] = None
|
||||
input_cost_per_token: Optional[float] = None
|
||||
output_cost_per_token: Optional[float] = None
|
||||
mode: Literal[
|
||||
"chat", "embedding", "completion", "image_generation", "audio_transcription"
|
||||
]
|
||||
supports_parallel_function_calling: bool = Field(default=False)
|
||||
supports_vision: bool = Field(default=False)
|
||||
supports_function_calling: bool = Field(default=False)
|
||||
|
|
|
@ -12,3 +12,13 @@ class ProviderField(TypedDict):
|
|||
field_type: Literal["string"]
|
||||
field_description: str
|
||||
field_value: str
|
||||
|
||||
|
||||
class ModelInfo(TypedDict):
|
||||
max_tokens: int
|
||||
max_input_tokens: int
|
||||
max_output_tokens: int
|
||||
input_cost_per_token: float
|
||||
output_cost_per_token: float
|
||||
litellm_provider: str
|
||||
mode: str
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue