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
import hashlib
import os
import secrets
from typing import Final
_xdist_test_run_uid: Final = os.environ.get("PYTEST_XDIST_TESTRUNUID")
MASTER_KEY: Final = (
f"sk-{hashlib.sha256(_xdist_test_run_uid.encode()).hexdigest()[:32]}"
if _xdist_test_run_uid is not None
else f"sk-{secrets.token_hex(16)}"
)