WikifitaGitHub live67e8de5
projeto · infraestrutura/fitalabs-infra

FitaLabs Infra — Complete Stack

Documentation: FitaLabs Infra — Complete Stack

Baixar raw

FitaLabs Infra — Complete Stack

Location: ~/Claude/fitalabs/infra/ (git versioned) Compose: 8+ Docker containers Gateway: FastAPI in Python, Anthropic Messages API compatible

Services

ContainerFunctionPort
CaddyHTTPS reverse proxy + Let's Encrypt80, 8443
CPMCaddy Proxy Manager (Web UI)8501
Technitium DNSLocal split-DNS5380, 53530/udp
LiteLLM GatewayCore — multi-provider proxy4000
SearXNGMeta-search engine8888
Crawl4AIWeb crawler11235
Open WebUIChat interface3000
Uptime KumaHealth monitoring3001
Open TerminalEmbedded terminal8000

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

EndpointHandlerFunction
POST /v1/messagesmessages.pyAnthropic Messages API
POST /v1/messages/count_tokens(inline)Token counting
POST /v1/chat/completionschat.pyOpenAI Chat Completions
POST /v1/audio/speechaudio.pyTTS
POST /v1/audio/transcriptionsaudio.pySTT
POST /mcpmcp.pyMCP JSON-RPC (tools/list, tools/call)
WS /v1/voicevoice.pyVoice mode WebSocket
GET /searchsearch.pySearXNG-compatible
POST /loadloader.pyURL loader
GET /healthadmin.pyHealth check

Services

  • forwarding.py — Forward to backends with protocol translation
  • tool_executor.py — Tool execution
  • web_fetch.py — Fetch via Crawl4AI
  • fallback.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)

  1. Dynamic provider registry (~/.relay-ai/providers.json + OS Keychain)
  2. Model favorites + /model switching mid-session (20 favorites)
  3. Multi-launcher: relay-ai claude-app, codex-app, gemini
  4. Server wizard: provider filtering, model id masking, local vs network
  5. Environment isolation: strips 17 conflicting env vars
  6. Vertex AI gateway: --vertex with gcloud ADC
  7. NDJSON/JSONL streaming for headless agents

Capabilities we have (that relay-ai doesn't)

  1. Tool injection + filtering
  2. Web search via SearXNG
  3. Voice mode WebSocket
  4. MCP with web_fetch (Crawl4AI)
  5. Anthropic to OpenAI translation
  6. Multimodal routing
  7. CPM, Technitium DNS, Uptime Kuma
  8. Crawl4AI with proxy

Gap Analysis — What's Missing

Priority 1 (For Kaggle + daily operations)

  • Dynamic provider registry (reference: relay-ai)
  • Model favorites + /model switching
  • 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