One API surface for many model providers
Applications call justfastllm once, while the gateway handles provider selection, routing, request shaping, error normalization, response caching, and model discovery.
justfastllm is a self-hosted Python LLM gateway and proxy server built by Suhas Bhairav for teams that need one fast, low-footprint control plane for OpenAI, Anthropic, DeepSeek, Grok, Qwen, Kimi, Ollama, and custom OpenAI-compatible providers.
Applications call justfastllm once, while the gateway handles provider selection, routing, request shaping, error normalization, response caching, and model discovery.
Provider clients are isolated behind a common contract and created through ProviderFactory, making the gateway easier to extend without scattering provider logic across the codebase.
The gateway uses a raw ASGI app, dataclasses, stdlib configuration parsing, direct HTTP transport, and Uvicorn instead of heavy web and provider SDK layers.
Redis-backed response caching and user memory support multi-instance deployments, while structured logging, request IDs, /health, and OpenAPI improve operational visibility.
Guardrails can validate payloads, enforce message limits, block configured patterns, and be inspected or updated through the gateway API.
The project includes Docker, Docker Compose, Render, Railway, AWS App Runner, and GCP Cloud Run descriptors so teams can own the deployment surface.
justfastllm now supports saved agent workflows, document ingestion for Agent 1, sequential handoffs, run traces, and final answers returned to the chat window.
A client sends an OpenAI-style chat completion request, Anthropic-style messages request, agent run, or skill invocation to justfastllm.
The gateway validates the payload, applies configured guardrails, resolves the target provider through ProviderFactory, and optionally injects user memory context.
The provider client sends a direct HTTP request to the configured model provider without using provider SDKs.
Responses are normalized, cached when eligible, logged with request metadata, and returned through the centralized gateway contract.
Operators can inspect health, models, guardrail state, user preferences, feedback records, and OpenAPI documentation from the same service.
Provider traffic is explicit HTTP traffic. The gateway does not hide behavior behind vendor SDK abstractions.
OpenAI-compatible providers can be added through environment configuration, while dedicated adapters handle non-compatible APIs such as Anthropic Messages.
The project is designed for teams that want to host their own gateway and keep routing, caching, memory, and observability under their control.
justfastllm is an enterprise LLM gateway server and proxy built in Python. Its purpose is simple: give teams one fast, self-hosted control plane for calling many LLM providers without embedding provider-specific SDKs across every application.
The gateway supports OpenAI-style chat completions, Anthropic-style messages, model listing, provider routing, Redis caching, guardrails, user preferences, user feedback, agents, skills, OpenAPI, Docker, and cloud deployment descriptors. It was created by Suhas Bhairav as an AI Lab project focused on practical, production-oriented AI infrastructure.
Most companies begin with one model provider and one application. Very quickly, the system becomes harder to govern: teams add OpenAI in one service, Anthropic in another, local Ollama models for experiments, OpenRouter-style gateways for breadth, and custom internal endpoints for private models. Each integration brings its own keys, headers, payload formats, logging, retries, guardrails, and operational assumptions.
justfastllm consolidates that model sprawl behind one gateway. Applications call the gateway, and the gateway decides how to route the request to OpenAI, Anthropic, DeepSeek, Grok, Qwen, Kimi, Ollama, or any configured OpenAI-compatible provider.
The initial provider set is deliberately broad. justfastllm supports mainstream hosted providers, local Ollama models, and custom OpenAI-compatible endpoints so a team can combine public APIs, private models, and local development workflows.
justfastllm is organized around provider contracts instead of random provider-specific functions. Provider clients implement a shared interface, and ProviderFactory constructs the correct client based on gateway settings and request routing.
This design keeps each provider adapter small and explicit. OpenAI-compatible providers share a reusable adapter. Anthropic uses a dedicated adapter because its Messages API has a different contract. Custom providers can be added with environment variables when they follow the OpenAI-compatible shape.
The runtime path intentionally avoids OpenAI, Anthropic, and other provider SDKs. justfastllm uses direct HTTP calls so the gateway controls exactly what is sent, what headers are used, how responses are handled, and how upstream errors are normalized.
This matters for enterprise teams because SDKs can add dependency weight, hidden behavior, upgrade churn, and provider-specific abstractions. A gateway that is meant to route many providers benefits from keeping the transport explicit.
justfastllm includes Redis-backed caching and Redis-backed user memory so multiple gateway instances can share operational state. Response caching can reduce repeated provider calls for eligible requests. User memory can store preferences and feedback so the gateway can preserve lightweight personalization across sessions.
The gateway includes configurable guardrails for request validation and runtime control. Operators can inspect guardrail state and update settings through API endpoints instead of hardcoding every safety decision into application clients.
GET /v1/guardrails and PATCH /v1/guardrails expose guardrail state and updates.justfastllm includes lightweight endpoints for agents and skills. This gives the gateway a foundation for repeatable AI workflows without turning the project into a large orchestration framework.
justfastllm is built to be self-hosted. The repository includes Docker support, Docker Compose for local Redis-backed deployment, and platform descriptors for Render, Railway, AWS App Runner, and GCP Cloud Run.
The gateway exposes operational endpoints and headers that make it easier to run as an internal platform service. It includes /health, /openapi.json, provider model discovery, structured request logs, request IDs, provider headers, and cache hit/miss headers.
GET /health for load balancers and deployment platforms.GET /openapi.json for client generation and contract review.GET /v1/models and GET /v1/providers/{provider}/models for discovery.The project includes standard-library unit tests, compile checks, Docker build verification, Docker Compose config validation, and a real Ollama integration test. For major gateway changes, the Ollama test can run against a local model such as qwen3:8b to confirm that the gateway can call a real model through the OpenAI-compatible Ollama surface.
LLM infrastructure is becoming a control-plane problem. Teams need model choice, provider independence, internal governance, cost controls, memory, safety, local-model evaluation, and deployment ownership. justfastllm demonstrates how much of that can be achieved with a small Python gateway that uses clear contracts and direct HTTP rather than heavy framework layers.
The project is not positioned as a giant AI platform. It is a focused gateway: small enough to understand, structured enough to extend, and self-hosted enough for teams that want control over how model traffic moves through their systems.
justfastllm is a Python LLM gateway and proxy server that lets applications access multiple LLM providers through one self-hosted API surface.
No. The runtime path uses direct HTTP calls to provider APIs instead of OpenAI, Anthropic, or other provider SDKs.
The initial provider set includes OpenAI, Anthropic, DeepSeek, xAI Grok, Qwen, Kimi / Moonshot, Ollama, and custom OpenAI-compatible providers.
Yes. Redis can be used for response caching and user memory across multiple gateway instances.
Yes. The project includes Docker, Docker Compose, Render, Railway, AWS App Runner, and GCP Cloud Run deployment assets.
Yes. Ollama is supported through its OpenAI-compatible API surface, and the project includes a live Ollama integration test for real model verification.