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 signal
import sys
from types import FrameType
def _exit_on_reraised_term(signum: int, frame: FrameType | None) -> None:
sys.exit(0)
def main() -> None:
from litellm import run_server
signal.signal(signal.SIGTERM, _exit_on_reraised_term)
run_server()
if __name__ == "__main__":
main()