Declarative GPU roster replaces hardcoded router.py model configs. Operations: add-model, remove-model, heal, sync-keys, list. Documents agent key architecture with LITELLM_API_KEY env var. Covers all 3 GPU hosts (RTX 5070, RTX 3090, Strix Halo).
4.5 KiB
4.5 KiB
kind, name, description, agent, triggers
| kind | name | description | agent | triggers | |||
|---|---|---|---|---|---|---|---|
| responsibility | gpu-fleet | Manages the GPU inference fleet across all hosts. Handles model deployment, registration, hot-reload, health checks, LiteLLM sync, agent key management, and stale model cleanup. Replaces hardcoded router.py config with declarative gpu_roster.yaml. | abiba |
|
Maintains
- gpu_roster: { models: map, hosts: map } — Single source of truth for all GPU models
- router: { status: "healthy", models: array }
- litellm: { status: "healthy", models: array }
- agent_keys: { agent: api_key } — All agent API keys registered in LiteLLM DB
- health: { gpus: array, circuit_breakers: array }
Operations
add-model
- Download model file from Hugging Face or source
- Check disk space + GPU VRAM compatibility
- Build/update llama.cpp if needed (cmake, Vulkan/CUDA flags)
- Start llama-server via systemd service
- Add to
gpu_roster.yaml - Hot-reload router:
POST /admin/roster/reload - Sync LiteLLM config: add model to model_list + fallbacks
- Generate/update agent keys for new model access
- Verify end-to-end: LiteLLM → Router → Model
remove-model
- Drain active requests (wait for active=0)
- Update
gpu_roster.yaml— remove entry - Hot-reload router
- Remove from LiteLLM config
- Stop llama-server (systemd)
- Cleanup model files (optional — keep if model might return)
heal
- Check all GPUs via router
/health/unified - Reset stuck circuit breakers if idle
- Restart dead llama-server instances
- Flush Redis counters if stale
- Sync LiteLLM if configs diverge
sync-keys
- List all agent keys in LiteLLM DB via
/key/list - Compare against expected agent list
- Generate missing keys via
/key/generate - Update agent configs to use
api_key_env: LITELLM_API_KEY - Set
LITELLM_API_KEYin system-wide env + startup wrapper - Restart gateways
list
Show full fleet status: GPUs, models, VRAM, active requests, circuit breakers
Configuration Files
| File | Host | Purpose |
|---|---|---|
gpu_roster.yaml |
CT 116 (/opt/inference-harness/) |
Model-to-GPU mapping |
litellm_config.yaml |
CT 116 | LiteLLM proxy config |
roster_loader.py |
CT 116 (router container) | Hot-reloadable roster parser |
/etc/systemd/system/moe-server.service |
.15 | Ornith-1.0-35B server |
| Agent configs | .122, .123, .114 | api_key_env: LITELLM_API_KEY |
GPU Fleet Topology
┌──────────────────────────────────────────────────┐
│ LiteLLM (:4001) │
│ Config: /opt/inference-harness/litellm_config.yaml │
└──────────────┬───────────────────────────────────┘
│
┌──────────────▼───────────────────────────────────┐
│ Router (:9000) │
│ Roster: /app/gpu_roster.yaml (hot-reload) │
│ Redis: slot booking + circuit breakers │
└──────┬──────────┬──────────┬─────────────────────┘
│ │ │
┌────▼───┐ ┌───▼────┐ ┌──▼──────┐
│ gemma │ │ qwen │ │ ornith │
│ 4-12b │ │ 27B │ │ 1.0-35B │
│ .110 │ │ .8 │ │ .15 │
│ 5070 │ │ 3090 │ │ Strix │
└────────┘ └────────┘ └─────────┘
Agent Key Architecture
All agents use api_key_env: LITELLM_API_KEY in Hermes configs:
| Agent | Host | Config | Env Source |
|---|---|---|---|
| Mumuni | .123 | 7 refs + 6 subagent profiles | /etc/environment + wrapper |
| Tanko | .122 | 4 refs | /etc/environment + wrapper |
| Koonimo | .114 | 5 refs | /etc/environment + wrapper |
To rotate all keys: update LITELLM_API_KEY value, restart gateways.
Sync Protocol
- Edit
gpu_roster.yaml→POST /admin/roster/reload(hot, no restart) - Edit
litellm_config.yaml→docker restart harness-litellm - Agent key changes → generate via
POST /key/generatewith master key