This commit is contained in:
Fede Kamelhar 2026-11-06 15:54:14 -05:00 • committed by GitHub
commit e1bf05aeba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -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``.

View file

@ -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) == ""