Merge pull request #4789 from BerriAI/litellm_router_refactor

[Feat-Router] - Tag based routing
This commit is contained in:
Ishaan Jaff 2024-07-18 22:19:18 -07:00 committed by GitHub
commit f04397e19a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 256 additions and 258 deletions

View file

@ -735,6 +735,7 @@ def completion(
]
litellm_params = [
"metadata",
"tags",
"acompletion",
"atext_completion",
"text_completion",
@ -3155,6 +3156,7 @@ def embedding(
"allowed_model_region",
"model_config",
"cooldown_time",
"tags",
]
default_params = openai_params + litellm_params
non_default_params = {
@ -4384,6 +4386,8 @@ def transcription(
proxy_server_request = kwargs.get("proxy_server_request", None)
model_info = kwargs.get("model_info", None)
metadata = kwargs.get("metadata", {})
tags = kwargs.pop("tags", [])
drop_params = kwargs.get("drop_params", None)
client: Optional[
Union[
@ -4556,6 +4560,7 @@ def speech(
) -> HttpxBinaryResponseContent:
model, custom_llm_provider, dynamic_api_key, api_base = get_llm_provider(model=model, custom_llm_provider=custom_llm_provider, api_base=api_base) # type: ignore
tags = kwargs.pop("tags", [])
optional_params = {}
if response_format is not None: