8 Best Open Source Cloudflare AI Gateway Alternatives
A curated collection of the 8 best open source and self-hosted alternatives to Cloudflare AI Gateway in 2026.
Looking for a free, privacy-friendly, or self-hosted replacement for Cloudflare AI Gateway in 2026? The top open-source alternative is LiteLLM — Acts as a unified proxy across 100+ LLMs, normalizing them to the OpenAI format while handling virtual keys, budgets, rate limits, fallbacks, and cost tracking..
Other highly rated open-source Cloudflare AI Gateway alternatives include Portkey AI Gateway, Bifrost and Envoy AI Gateway.
Acts as a unified proxy across 100+ LLMs, normalizing them to the OpenAI format while handling virtual keys, budgets, rate limits, fallbacks, and cost tracking.
Acts as a unified proxy across 100+ LLMs, normalizing them to the OpenAI format while handling virtual keys, budgets, rate limits, fallbacks, and cost tracking.
Unified AI gateway for 1,600+ LLMs and observability
Portkey AI Gateway is a production stack for Gen AI builders, offering a unified solution for AI gateway, observability, guardrails, governance, and prompt management. Designed to help AI teams go to production efficiently, it eliminates the complexity of integrating multiple LLMs while providing real-time monitoring and governance capabilities. - Unified AI Gateway: Access 1,600+ LLMs via a single API, eliminating the need for multiple integrations. - Real-time Observability: Monitor LLM behavior, catch anomalies early, and manage usage proactively with a comprehensive dashboard. - Guardrails & Governance: Implement usage policies, rate limiting, and compliance controls to ensure safe and responsible AI usage. - Prompt Management: Centralize prompt management to streamline AI workflows and reduce redundancy. - Caching & Cost Optimization: Reduce costs by caching repeated API calls and optimizing token usage. - Production-ready Workflows: Deploy agent workflows with built-in support for caching, retries, and fallbacks. - Multi-Model Support: Seamlessly switch between different LLMs without changing your codebase. - Enterprise Scalability: Designed for enterprise-scale deployments with high availability and reliability. Portkey AI Gateway is available as a cloud service with enterprise-grade features. While the core gateway functionality is cloud-hosted, Portkey provides tools and integrations for self-hosting components like caching and observability dashboards. The open-source repository (https://github.com/portkey-ai/gateway) offers foundational tools for building custom integrations and extensions.
Enterprise-grade AI gateway for LLM routing & governance
Bifrost is the fastest, most resilient enterprise-grade AI gateway designed for routing, governance, guardrails, and observability. Built for real-world scale, it provides a unified control plane to manage budgets, track audit logs, enforce access control via SSO, and protect models with real-time guardrails. - Ultra-low latency routing: 20 microseconds added latency and 5,000 requests/second throughput - Multi-provider support: Access 8+ providers and 1000+ AI models through a unified interface - Budgeting & cost control: Set spending limits and track costs across teams, projects, and models - Provider fallback: Automatic fallback to ensure high availability and reliability - MCP gateway: Built-in support for Model Context Protocol (MCP) to use tools within agents - Real-time guardrails: Blocks unsafe outputs, enforces compliance, and keeps agents secure - Audit & governance: Track audit logs and maintain access control via SSO - Drop-in replacement: Change just one line of code to work with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more Bifrost is open-source and can be self-hosted. It supports deployment on any infrastructure and is compatible with all major AI SDKs. The project is available on GitHub and can be installed via npx @maximhq/bifrost.
Open source AI gateway for GenAI traffic management
Envoy AI Gateway is an open-source project built on CNCF Envoy Gateway to handle request traffic from application clients to GenAI services. It provides a stable, production-ready control plane API, supports 16+ AI providers, multimodal capabilities, and enterprise observability. - CNCF Envoy Gateway Foundation: Leverages the proven Envoy proxy for high-performance traffic routing - Multi-Provider Support: Native integration with 16+ LLM providers including OpenAI, Anthropic, AWS Bedrock, Azure OpenAI, and Mistral - Stable Control Plane API: Committed-stable API for production deployments - MCP Gateway: Enables Model Context Protocol (MCP) tool calls with per-user identity management - Multimodal Support: Handles text, image, and other multimodal AI requests - Enterprise Observability: Built-in monitoring and metrics for AI service performance - Header Forwarding: Per-user identity management without requiring OAuth infrastructure - Scalability: Benchmarked to handle 2,000+ routes with low latency - Community-Driven: Open development with weekly meetings and active GitHub discussions - Open Source: Fully open-source under the Apache License - Self-Hostable: Can be deployed on any Kubernetes cluster - CNCF Project: Part of the Cloud Native Computing Foundation ecosystem - Documentation: Comprehensive docs available at https://aigateway.envoyproxy.io/docs - Community Support: Active Slack channel and weekly community meetings
Unified API for 40+ LLM providers
LLM Gateway simplifies working with multiple LLM providers by offering a single, OpenAI-compatible API interface. Whether you're using OpenAI, Anthropic, Google, or 40+ other providers, LLM Gateway handles routing, cost tracking, and performance monitoring—all in one place. - Unified API Interface: Keep your existing OpenAI SDK code; just change the base URL to switch providers. - Multi-provider Support: Access 40+ providers through one integration with no vendor lock-in. - Performance Monitoring: Compare latency, cost, and quality across models to optimize your use case. - Secure Key Management: Centralize all provider keys in one dashboard to avoid scattered credentials. - Self-hosted or Cloud: Deploy on your own infrastructure or use the managed cloud service. - Cost-aware Analytics: Track requests, tokens, total spend, and average cost per 1K tokens. - Per-model/provider Breakdown: Analyze usage and spend by provider and model to identify outliers. - Errors & Reliability Monitoring: Monitor error rates, cache hit rates, and reliability trends. - Project-level Usage Explorer: Drill into each project's requests, models, errors, cache, and costs. - Enterprise Audit Logs: Maintain compliance with comprehensive audit trails. - LLM Guardrails: Prevent prompt injection, detect PII, and block malicious requests. LLM Gateway is open source and can be self-hosted for full control over your infrastructure. Alternatively, use the managed cloud service for a hassle-free experience. The project is SOC 2 Type II certified, ensuring enterprise-grade security and compliance.
Open-source AI gateway with tracing and PII protection
Grepture is a privacy-focused AI gateway that sits directly on the request path to trace, evaluate, and protect every LLM call your application makes. Designed for teams shipping AI features, it provides full observability, built-in evals, and advanced PII redaction without storing your data. - Hot-path proxy: Processes every request in-flight for PII redaction, threat blocking, and rule enforcement before data leaves your network - Full observability: Detailed request logs, multi-step traces with waterfall views, and full-text search across prompts and responses - Built-in evals: LLM-as-judge scoring runs on live traffic with six templates out of the box - Cost tracking: Real-time token cost tracking with per-model breakdowns - Multi-model gateway: Works with OpenAI, Anthropic, Gemini, Cohere, Mistral, AWS Bedrock, Hugging Face, Groq, Replicate, and more - PII redaction: 80+ detection patterns with reversible tokenized redaction (mask & restore with TTL) - Prompt injection protection: Detects and blocks adversarial inputs - Zero-data mode: Processes requests without writing content to disk; only operational metadata is logged - EU-hosted infrastructure: All services run in Frankfurt & Nuremberg with GDPR compliance - Developer-first SDK: Drop-in TypeScript SDK with zero dependencies, CLI for local dev, and pre-commit scanning Grepture is open-source and can be self-hosted. The official repository provides the proxy implementation, SDK, and documentation for deployment. The cloud version is hosted in EU data centers (Germany & Ireland) with zero US data transfers. The system is designed for high availability with 77.93% uptime over 30 days.
Open-source LLM observability and monitoring platform
Helicone is the LLMOps platform powering the fastest-growing AI companies. It enables developers to route, debug, and analyze their AI applications with real-time observability, monitoring, and analytics. - LLM Observability: Real-time monitoring and debugging of LLM interactions. - AI Gateway: Route requests to multiple LLM providers seamlessly. - Analytics Dashboard: Track performance, usage, and costs across models. - Prompt Management: Store, version, and optimize AI prompts. - Rate Limiting & Alerts: Prevent abuse and get notified of anomalies. - Multi-Provider Support: Integrate with OpenAI, Anthropic, Azure, and more. - HQL (Helicone Query Language): Query and analyze AI interactions efficiently. - Datasets & Playground: Test and refine AI models with interactive tools. Helicone is open-source and can be self-hosted. It supports integration with major LLM providers and offers a cloud-based solution for ease of use. The platform is designed for scalability and reliability, making it suitable for both small projects and enterprise-level AI applications.
AI agent observability and evaluation platform
Arize AI provides a comprehensive platform for observing, evaluating, and improving AI agents in production. The platform helps teams trace agent workflows, assess performance, and implement continuous learning cycles to enhance agent capabilities. - Agent Observability: Real-time monitoring of agent workflows, inputs, and outputs - Evaluation & Scoring: Automated evaluation of agent responses and performance metrics - Tracing & Debugging: Detailed trace logs for troubleshooting and optimization - Continuous Learning: Feedback loops to improve agent decision-making over time - Multi-Agent Support: Tools for managing and coordinating multiple AI agents - Integration Hub: Connects with popular AI tools like Claude Code, Codex, Cursor, GitHub Copilot, and Gemini - Open-Source Option: Phoenix OSS for self-hosted observability and evaluations - Managed Platform: Arize AX available as a cloud service - Open-Source Core: Phoenix OSS available on GitHub for self-hosting - CLI Tools: Easy setup via npx for quick deployment - Multi-Platform Support: Works across Linux, Windows, and macOS
About Cloudflare AI Gateway
Cloudflare AI Gateway is a unified observability platform designed to monitor, control, and optimize AI applications across multiple vendors. It provides developers with the tools needed to track performance, manage costs, and ensure reliability for AI-powered services.
Key Features of Cloudflare AI Gateway
- Multivendor AI Observability: Monitor AI applications from different providers in a single dashboard
- Performance Optimization: Identify bottlenecks and optimize AI workloads for better efficiency
- Cost Control: Track and manage AI usage costs across different vendors
- Real-time Monitoring: Get instant insights into AI application performance and health
- Security & Compliance: Ensure AI applications meet security and compliance requirements
- Scalability: Handle increasing AI workloads with Cloudflare's global network
Tech / Self-Hosting
Cloudflare AI Gateway is a fully managed cloud service provided by Cloudflare. It does not require self-hosting or infrastructure management. The service runs on Cloudflare's global network, ensuring low latency and high availability for AI applications worldwide.





