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
test(build): keep wheel checks outside package
Yujong Lee90eadac40927
diff --git a/litellm/rust_bridge/smoke_test_native_wheel.py b/.github/scripts/smoke_test_native_wheel.pysimilarity index 100%rename from litellm/rust_bridge/smoke_test_native_wheel.pyrename to .github/scripts/smoke_test_native_wheel.pydiff --git a/litellm/rust_bridge/verify_linux_native_wheel.py b/.github/scripts/verify_linux_native_wheel.pysimilarity index 100%rename from litellm/rust_bridge/verify_linux_native_wheel.pyrename to .github/scripts/verify_linux_native_wheel.pydiff --git a/.github/workflows/test-rust.yml b/.github/workflows/test-rust.ymlindex 271c73733a3..aada0fcf239 100644--- a/.github/workflows/test-rust.yml+++ b/.github/workflows/test-rust.yml@@ -7,8 +7,8 @@ on:- ".cargo/**"- "pyproject.toml"- "rust-toolchain.toml"- - "litellm/rust_bridge/smoke_test_native_wheel.py"- - "litellm/rust_bridge/verify_linux_native_wheel.py"+ - ".github/scripts/smoke_test_native_wheel.py"+ - ".github/scripts/verify_linux_native_wheel.py"- ".github/workflows/test-rust.yml"pull_request:branches:@@ -21,8 +21,8 @@ on:- ".cargo/**"- "pyproject.toml"- "rust-toolchain.toml"- - "litellm/rust_bridge/smoke_test_native_wheel.py"- - "litellm/rust_bridge/verify_linux_native_wheel.py"+ - ".github/scripts/smoke_test_native_wheel.py"+ - ".github/scripts/verify_linux_native_wheel.py"- ".github/workflows/test-rust.yml"permissions:@@ -115,9 +115,9 @@ jobs:--config-setting "maturin.build-args=--features panic-test,extension-module"- name: Smoke-test native panic unwinding- run: python litellm/rust_bridge/smoke_test_native_wheel.py panic-dist/*.whl+ run: python .github/scripts/smoke_test_native_wheel.py panic-dist/*.whl- name: Verify stripped native extensionenv:RELEASE_WHEEL_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}- run: python litellm/rust_bridge/verify_linux_native_wheel.py dist/*.whl+ run: python .github/scripts/verify_linux_native_wheel.py dist/*.whldiff --git a/tests/test_litellm/rust_bridge/test_verify_linux_native_wheel.py b/tests/test_litellm/rust_bridge/test_verify_linux_native_wheel.pyindex 8d0082dddc1..e449d4392d8 100644--- a/tests/test_litellm/rust_bridge/test_verify_linux_native_wheel.py+++ b/tests/test_litellm/rust_bridge/test_verify_linux_native_wheel.py@@ -1,16 +1,48 @@from __future__ import annotations+import importlib.utilimport subprocess+import sysimport zipfile+from collections.abc import Callable, Mapping, Sequencefrom pathlib import Pathfrom types import MappingProxyType, ModuleType-from typing import Final+from typing import Final, Protocol, castimport pytest-from litellm.rust_bridge import verify_linux_native_wheel as verifier-_MODULE_PATH: Final = Path(verifier.__file__)+class _CommandRunner(Protocol):+ def __call__(+ self,+ command: tuple[str, ...],+ *,+ check: bool,+ capture_output: bool,+ text: bool,+ ) -> subprocess.CompletedProcess[str]: ...+++class _VerifierModule(Protocol):+ main: Callable[+ [+ Sequence[str] | None,+ Mapping[str, str] | None,+ Callable[[Path], ModuleType | None],+ _CommandRunner,+ ],+ int,+ ]+++_REPO_ROOT: Final = Path(__file__).resolve().parents[3]+_MODULE_PATH: Final = _REPO_ROOT / ".github" / "scripts" / "verify_linux_native_wheel.py"+_SPEC: Final = importlib.util.spec_from_file_location("verify_linux_native_wheel", _MODULE_PATH)+assert _SPEC is not None and _SPEC.loader is not None+_LOADED_VERIFIER: Final = importlib.util.module_from_spec(_SPEC)+sys.modules[_SPEC.name] = _LOADED_VERIFIER+_SPEC.loader.exec_module(_LOADED_VERIFIER)+verifier: Final = cast(_VerifierModule, _LOADED_VERIFIER)_EXPECTED_TAG: Final = "cp310-abi3-linux_x86_64"_NATIVE_MEMBER: Final = "litellm/rust_bridge/_native.abi3.so"