fix(get_supported_openai_params.py): default to openai-like spec

This commit is contained in:
Krrish Dholakia 2025-02-11 19:30:28 -08:00
parent e5ed711d55
commit f93d577967

View file

@ -121,23 +121,26 @@ def get_supported_openai_params( # noqa: PLR0915
) )
elif custom_llm_provider == "vertex_ai" or custom_llm_provider == "vertex_ai_beta": elif custom_llm_provider == "vertex_ai" or custom_llm_provider == "vertex_ai_beta":
if request_type == "chat_completion": if request_type == "chat_completion":
if model.startswith("meta/"):
return litellm.VertexAILlama3Config().get_supported_openai_params(
model=model
)
if model.startswith("mistral"): if model.startswith("mistral"):
return litellm.MistralConfig().get_supported_openai_params(model=model) return litellm.MistralConfig().get_supported_openai_params(model=model)
if model.startswith("codestral"): elif model.startswith("codestral"):
return ( return (
litellm.CodestralTextCompletionConfig().get_supported_openai_params( litellm.CodestralTextCompletionConfig().get_supported_openai_params(
model=model model=model
) )
) )
if model.startswith("claude"): elif model.startswith("claude"):
return litellm.VertexAIAnthropicConfig().get_supported_openai_params( return litellm.VertexAIAnthropicConfig().get_supported_openai_params(
model=model model=model
) )
return litellm.VertexGeminiConfig().get_supported_openai_params(model=model) elif model.startswith("gemini"):
return litellm.VertexGeminiConfig().get_supported_openai_params(
model=model
)
else:
return litellm.VertexAILlama3Config().get_supported_openai_params(
model=model
)
elif request_type == "embeddings": elif request_type == "embeddings":
return litellm.VertexAITextEmbeddingConfig().get_supported_openai_params() return litellm.VertexAITextEmbeddingConfig().get_supported_openai_params()
elif custom_llm_provider == "sagemaker": elif custom_llm_provider == "sagemaker":