Open Source AI Gateway for LLM Routing
An open source AI gateway provides a self-hosted, scalable solution for managing large language model (LLM) routing and inference. It supports multiple providers and frameworks, offering flexibility and control for enterprise AI deployments.
What is an AI Gateway Open Source?
An AI gateway open source is a software platform that enables organizations to host, manage, and route requests to various LLM providers and models. It allows self-hosting, reducing dependency on external vendors and avoiding vendor lock-in.
Key Features of an Open Source AI Gateway
Compatibility with Multiple Providers
The platform connects with various LLM providers, including OpenAI, Anthropic, Mistral, and others, through compatible APIs. It supports provider presets that map endpoints and credentials.
Self-Hosting and Scalability
The open source nature allows deployment on private infrastructure, supporting horizontal scaling and custom configurations. It integrates with existing systems via SDKs and APIs.
Flexible Routing and Management
Routing decisions can be based on policies, cost, latency, or other criteria. The platform supports advanced routing strategies like bandit algorithms, reinforcement learning, and rule-based policies.
Model Serving and Inference Gateway
It includes a model hosting server and inference gateway built on open inference engines. This setup manages model lifecycle, resource allocation, and flow control.
Security and Governance
Supports security features such as quotas, budgets, and access controls, ensuring compliance and governance in enterprise environments.
How to Use an Open Source AI Gateway
SDK Integration
Connect your application or framework via SDKs that support OpenAI, Anthropic, MCP, or function calls. The SDK abstracts provider differences and simplifies integration.
from osr.sdk import RouterSDK
router = RouterSDK()
response = router.chat(prompt="Hello, world")
Deployment Options
Deploy the gateway as a Python SDK, a Docker image (osr serve), or on a hosted platform. Choose based on your infrastructure and scalability needs.



