How z33mscessex/offline-llm-gateway works
Offline LLM Gateway packages local model serving behind an access-controlled LiteLLM API. The main workflow is a client request through the gateway to a local model, with Prometheus monitoring the services; offline networking and preloaded weights keep the stack self-hosted. The repository also provides direct Ollama calling, GPU/vLLM evaluation, load testing, and a local Kubernetes deployment. Relationships for unsampled runtime configuration are based on README statements; the excerpts do not expose the full Compose or service configuration.
Main entry points: config.yaml LiteLLM gateway · gateway_gpu.py GPU gateway evaluation · prometheus.yml Prometheus · docker-compose.yml Compose stack
Components 14
Deployment and offline
- Compose stack
docker-compose.yml - Offline check
scripts/check_offline.sh
Gateway and models
- LiteLLM gateway
litellm/config.yaml - Ollama model server
- vLLM GPU server
colab/gateway_gpu.py - Gateway database
- Direct Ollama caller
scripts/call_model.py
Monitoring and evaluation
- Prometheus
prometheus/prometheus.yml - Load test
scripts/load_test.py - GPU gateway evaluation
colab/gateway_gpu.py
Kubernetes deployment
- Kubernetes stack
k8s/stack.yaml - Cluster launcher
scripts/k8s_up.sh - Kubernetes tests job
k8s/tests-job.yaml
Other components
- API client
Connections 18
- API client → LiteLLM gateway: sends requests
README.md - LiteLLM gateway → Ollama model server: routes requests
README.md - LiteLLM gateway → vLLM GPU server: routes GPU requests
README.md - LiteLLM gateway → Gateway database: looks up keys
README.md - Direct Ollama caller → Ollama model server: calls API
scripts/call_model.py - Compose stack → LiteLLM gateway: configures service
README.md - Compose stack → Ollama model server: packages service
README.md - Prometheus → LiteLLM gateway: scrapes metrics
README.md - Prometheus → Ollama model server: scrapes metrics
README.md - Prometheus → vLLM GPU server: scrapes metrics
README.md - Load test → LiteLLM gateway: measures load
- GPU gateway evaluation → vLLM GPU server: starts server
colab/gateway_gpu.py - GPU gateway evaluation → LiteLLM gateway: starts gateway
colab/gateway_gpu.py - GPU gateway evaluation → vLLM GPU server: sends direct requests
colab/gateway_gpu.py - GPU gateway evaluation → LiteLLM gateway: sends test requests
colab/gateway_gpu.py - Offline check → Compose stack: checks isolation
README.md - Cluster launcher → Kubernetes stack: deploys stack
README.md - Cluster launcher → Kubernetes tests job: runs tests
README.md