The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(ci): verify coverage uploads and normalize dependency inventories
Joshua Valluru21beb9b7b101
diff --git a/.github/workflows/test-dependency-installs.yml b/.github/workflows/test-dependency-installs.ymlindex 0a72e302ea8..4ac014a9ddd 100644--- a/.github/workflows/test-dependency-installs.yml+++ b/.github/workflows/test-dependency-installs.yml@@ -167,8 +167,9 @@ jobs:with:name: mcp-dependency-coveragepath: coverage-reports- - uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4+ - uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5with:+ version: v11.3.1use_oidc: truedirectory: coverage-reportsflags: mcp-dependenciesdiff --git a/tests/mcp_dependency_tests/check_environment.py b/tests/mcp_dependency_tests/check_environment.pyindex bdd1145c4ed..e8327ee9905 100644--- a/tests/mcp_dependency_tests/check_environment.py+++ b/tests/mcp_dependency_tests/check_environment.py@@ -1,3 +1,4 @@+from collections.abc import Iterableimport importlib.metadataimport importlib.utilimport json@@ -9,15 +10,19 @@ from typing import Finalimport unittest+from packaging.utils import canonicalize_name+++def installed_versions(distributions: Iterable[importlib.metadata.Distribution]) -> dict[str, str]:+ return {canonicalize_name(distribution.metadata["Name"]): distribution.version for distribution in distributions}++def main(profile: str, environment: Path) -> None:import litellmpackage: Final = Path(litellm.__file__).resolve()assert package.is_relative_to(environment.resolve()), f"wrong wheel import: {package}"- installed: Final = {- distribution.metadata["Name"].lower().replace("_", "-"): distribution.version- for distribution in importlib.metadata.distributions()- }+ installed: Final = installed_versions(importlib.metadata.distributions())if profile == "core":assert all(importlib.util.find_spec(name) is None for name in ("mcp", "mcp_types", "httpx2", "httpcore2"))else:diff --git a/tests/mcp_dependency_tests/test_runner.py b/tests/mcp_dependency_tests/test_runner.pyindex 4c8e062d2ff..518a672013c 100644--- a/tests/mcp_dependency_tests/test_runner.py+++ b/tests/mcp_dependency_tests/test_runner.py@@ -1,3 +1,4 @@+import importlib.metadatafrom pathlib import Pathimport subprocessimport sys@@ -6,7 +7,7 @@ import zipfileimport pytest-from tests.mcp_dependency_tests import runner+from tests.mcp_dependency_tests import check_environment, runnerdef wheel(tmp_path: Path, name: str = "litellm") -> Path:@@ -201,3 +202,13 @@ def test_proxy_rejects_missing_or_ambiguous_companions(tmp_path: Path, ambiguouscompanion.unlink()with pytest.raises(ValueError, match="exactly one enterprise"):runner.project_text(path, "proxy")++[email protected]("name", ["Foo.Bar", "Foo__BAR", "foo--bar", "foo-bar"])+def test_inventory_accepts_equivalent_distribution_names(tmp_path: Path, name: str) -> None:+ metadata = tmp_path / "foo_bar-1.dist-info"+ metadata.mkdir()+ (metadata / "METADATA").write_text(f"Metadata-Version: 2.1\nName: {name}\nVersion: 1\n")+ installed = check_environment.installed_versions(importlib.metadata.distributions(path=[str(tmp_path)]))+ runner.verify_inventory("foo-bar==1\n", {"environment": {}, "installed": installed}, {})+ assert installed == {"foo-bar": "1"}