FitaLabs Infra — Complete Stack
Documentation: FitaLabs Infra — Complete Stack
FitaLabs Infra — Complete Stack
Location: ~/Claude/fitalabs/infra/ (git versioned)
Compose: 8+ Docker containers
Gateway: FastAPI in Python, Anthropic Messages API compatible
Services
| Container | Function | Port |
|---|---|---|
| Caddy | HTTPS reverse proxy + Let's Encrypt | 80, 8443 |
| CPM | Caddy Proxy Manager (Web UI) | 8501 |
| Technitium DNS | Local split-DNS | 5380, 53530/udp |
| LiteLLM Gateway | Core — multi-provider proxy | 4000 |
| SearXNG | Meta-search engine | 8888 |
| Crawl4AI | Web crawler | 11235 |
| Open WebUI | Chat interface | 3000 |
| Uptime Kuma | Health monitoring | 3001 |
| Open Terminal | Embedded terminal | 8000 |
LiteLLM Gateway — Architecture
Router (router.py)
- Detects tier (haiku/sonnet/opus) from model name
- Detects effort (low/medium/high) via
thinking.budget_tokens - Detects multimodality (image/audio/video/pdf) → route to MiMo omni
- Routing table: (Tier, Effort) → Backend
- Backends: MiMo v2.5, MiMo v2.5 Pro, DeepSeek V4 Flash, DeepSeek V4 Pro
Handlers
| Endpoint | Handler | Function |
|---|---|---|
POST /v1/messages | messages.py | Anthropic Messages API |
POST /v1/messages/count_tokens | (inline) | Token counting |
POST /v1/chat/completions | chat.py | OpenAI Chat Completions |
POST /v1/audio/speech | audio.py | TTS |
POST /v1/audio/transcriptions | audio.py | STT |
POST /mcp | mcp.py | MCP JSON-RPC (tools/list, tools/call) |
WS /v1/voice | voice.py | Voice mode WebSocket |
GET /search | search.py | SearXNG-compatible |
POST /load | loader.py | URL loader |
GET /health | admin.py | Health check |
Services
forwarding.py— Forward to backends with protocol translationtool_executor.py— Tool executionweb_fetch.py— Fetch via Crawl4AIfallback.py— Fallback chain
MCP Endpoint
Currently only exposes web_fetch via Crawl4AI. Foundation for extension with notes, whiteboard, etc. tools.
relay-ai — External Reference
CLI for launching Claude Code, Claude Desktop, Codex, Gemini CLI with provider registry. GitHub: https://github.com/jacob-bd/relay-ai Stars: 84 | Commits: 53
Capabilities relay-ai has (that we don't)
- Dynamic provider registry (
~/.relay-ai/providers.json+ OS Keychain) - Model favorites +
/modelswitching mid-session (20 favorites) - Multi-launcher:
relay-ai claude-app,codex-app,gemini - Server wizard: provider filtering, model id masking, local vs network
- Environment isolation: strips 17 conflicting env vars
- Vertex AI gateway:
--vertexwith gcloud ADC - NDJSON/JSONL streaming for headless agents
Capabilities we have (that relay-ai doesn't)
- Tool injection + filtering
- Web search via SearXNG
- Voice mode WebSocket
- MCP with web_fetch (Crawl4AI)
- Anthropic to OpenAI translation
- Multimodal routing
- CPM, Technitium DNS, Uptime Kuma
- Crawl4AI with proxy
Gap Analysis — What's Missing
Priority 1 (For Kaggle + daily operations)
- Dynamic provider registry (reference: relay-ai)
- Model favorites +
/modelswitching - Environment isolation in gateway
- Notes MCP server (extract selection, inline comments)
Priority 2 (For PCR Protocol)
- Multi-launcher for Claude Desktop, Claude Code, Codex
- Dynamic dispatch between instances
- Slack integration (MCP server for Slack)
- Whiteboard MCP App
Priority 3 (For ground zero)
- Harness reconstruction via leaked source
- Bare metal inference (PS3 Cell BE)
- Apple Container Machine bridge
Connections
- mcp-ecosystem — MCP Apps, protocol, specs
- fitalabs-gateway-modelos — Gateway details (if dedicated page exists)
- claude-desktop-bundles — Harness where MCP servers run
- pcr-protocol — Harness reconstruction via local models