• Stefy Lanza (nextime / spora )'s avatar
    front: always serve status/stats natively (no engine); track activity on front · b821f87c
    Stefy Lanza (nextime / spora ) authored
    Per "always use the front when it can serve it; the engine only generates and
    gets stats from the front": /admin/api/status no longer calls the engine at all.
    It's built entirely from front state — registry (loaded models, in-flight),
    config (backend/load_mode), models.json (enabled models/aliases), live torch-free
    GPU stats (VRAM) and psutil (system RAM). Recent activity is now tracked on the
    front (it relays every request) via a ring buffer recorded in both the direct
    proxy and broker dispatch paths, so the Overview activity table is front-native
    too. Removed the now-dead _overlay_engine_totals/_cached_status/_status_cache.
    
    Engine-side removal of the now-unused handlers (api_status, tokens/users CRUD,
    api_get_settings) is pending a decision on the legacy --single-process mode,
    which still serves the UI from the engine app.
    
    Verified: _native_status() returns vram+ram+recent_activity via standalone test.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_011DDv7BchtZQWsnPG6Jm49m
    b821f87c
app.py 66.8 KB