# plugin_sglang — SGLang Server Monitor for SCORPIOX BOT Zero-dependency pure C99 dynamic plugin for **SCORPIOX BOT** showing live SGLang inference telemetry for the active session or any custom SGLang server URL. ## Features - **Auto-tracks active `/chat` session**: reads `OPENAI_BASE_URL` from the session's `config-snapshot.txt` and polls `scorpiox-sglang-metrics` (cached 4 s per session). - **Works from Hub, Session Cards & Chat**: includes a live session picker and custom SGLang URL override bar. - **Full telemetry**: model name, running/queued/max requests, `tg` / `pp` / `gen` tok/s, KV cache fill bar (`used / total`, `%`, `ctx`), prefix cache hit rate (current & lifetime), speculative decoding (`method`, `len`, `acc %`), latencies (`ITL`, `TTFT`, `queue`), and cumulative token counters. - **Native dual theme**: honors SCORPIOX BOT dark/light theme handoff (`?theme=`, `postMessage('sx-theme')`, `?embed=1`). ## Build & Test ```sh make make test ``` ## Install Install from **Settings → Plugins → Marketplace** in SCORPIOX BOT, or copy `plugin_sglang` into `~/.scorpiox/plugins/`. ## License MIT License — Copyright (c) 2026 SCORPIOX INC