mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
Merge ca3addacc5 into aeede53112
This commit is contained in:
commit
e1bf05aeba
2 changed files with 3 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ class GenAIProvider(str, Enum):
|
|||
PERPLEXITY = "perplexity"
|
||||
X_AI = "x_ai"
|
||||
IBM_WATSONX_AI = "ibm.watsonx.ai"
|
||||
ORACLE_CLOUD_GENERATIVE_AI = "oracle_cloud.generative_ai"
|
||||
|
||||
|
||||
class MCPMethod(str, Enum):
|
||||
|
|
@ -390,6 +391,7 @@ _PROVIDER_BY_LITELLM: Final[dict[str, GenAIProvider]] = {
|
|||
"perplexity": GenAIProvider.PERPLEXITY,
|
||||
"xai": GenAIProvider.X_AI,
|
||||
"watsonx": GenAIProvider.IBM_WATSONX_AI,
|
||||
"oci": GenAIProvider.ORACLE_CLOUD_GENERATIVE_AI,
|
||||
}
|
||||
|
||||
# litellm ``call_type`` -> ``gen_ai.operation.name``.
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ def test_provider_resolution():
|
|||
assert resolve_provider("openai") == "openai"
|
||||
assert resolve_provider("bedrock") == "aws.bedrock"
|
||||
assert resolve_provider("vertex_ai") == "gcp.vertex_ai"
|
||||
assert resolve_provider("oci") == "oracle_cloud.generative_ai"
|
||||
# unknown providers pass through verbatim (semconv allows provider-specific)
|
||||
assert resolve_provider("my_custom_llm") == "my_custom_llm"
|
||||
assert resolve_provider(None) == ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue