forked from phoenix/litellm-mirror
Allowing inferring custom LLM provider from model inside get_supported_openai_params
This commit is contained in:
parent
f5b10a47e3
commit
cb5456c9f5
1 changed files with 3 additions and 1 deletions
|
@ -6226,7 +6226,7 @@ def get_first_chars_messages(kwargs: dict) -> str:
|
||||||
|
|
||||||
def get_supported_openai_params(
|
def get_supported_openai_params(
|
||||||
model: str,
|
model: str,
|
||||||
custom_llm_provider: str,
|
custom_llm_provider: Optional[str] = None,
|
||||||
request_type: Literal["chat_completion", "embeddings"] = "chat_completion",
|
request_type: Literal["chat_completion", "embeddings"] = "chat_completion",
|
||||||
) -> Optional[list]:
|
) -> Optional[list]:
|
||||||
"""
|
"""
|
||||||
|
@ -6241,6 +6241,8 @@ def get_supported_openai_params(
|
||||||
- List if custom_llm_provider is mapped
|
- List if custom_llm_provider is mapped
|
||||||
- None if unmapped
|
- None if unmapped
|
||||||
"""
|
"""
|
||||||
|
if not custom_llm_provider:
|
||||||
|
custom_llm_provider = litellm.get_llm_provider(model=model)[1]
|
||||||
if custom_llm_provider == "bedrock":
|
if custom_llm_provider == "bedrock":
|
||||||
return litellm.AmazonConverseConfig().get_supported_openai_params(model=model)
|
return litellm.AmazonConverseConfig().get_supported_openai_params(model=model)
|
||||||
elif custom_llm_provider == "ollama":
|
elif custom_llm_provider == "ollama":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue