Reverse Proxy
FastAPI reverse proxy on port 5001 — hot-reload routes.yaml
The AI Platform Proxy (platform/proxy/) is a pure routing layer on port 5001. It has no UI — the admin UI lives in the Hub.
Starting
cd ~/ai-mac-studio/platform/proxy
PYTHONPATH=src python3.14 -m ai_platform_proxyEndpoints
| Endpoint | Description |
|---|---|
ANY /{path} |
Forward to registered backend |
GET /_proxy/state |
JSON state — all routes + live/dead status |
GET /_proxy/health |
Liveness |
GET /_proxy/reload |
Force config reload |
Hot-reload
The proxy watches platform/config/routes.yaml with watchfiles and reloads routes without restarting. Edit routes.yaml and the change is live within 1 second.
Logging
502 errors are logged to platform/logs/proxy.jsonl:
{"ts": 1745123456.78, "route": "/viewer", "port": 5100, "name": "AI Viewer", "path": "/viewer/doc/123", "status": 502}View live in the Hub: /admin/logs.