Files
club-3090/tools
noonghunna d3836ecd87 c3+switch: show/copy the serving API URL; fast-flip booting→ready (F3/F3b)
The T1 audit's top adoption gap: even while a model SERVES, the best
endpoint info anywhere was a bare port — no scheme/host/path, no auth
note, no copy. "Point your agent at this URL" is the whole reason the
stack exists, and the URL was underivable from the UI.

One shared derivation (layer rule; #512 precedence env/.env ->
c3_lan_ip subshell -> localhost), four surfaces:
- switch.sh: ready-line on successful boot —
  "▶ API: http://<lan>:<port>/v1 (model: <served-id> · OpenAI-compatible
  · no auth)" — CLI parity; served id probed from /v1/models.
- services.lan_ip(): c3 consumes the SAME derivation, session-cached.
- Orchestration serving card: bare ":8020" -> full URL + "no auth ·
  [u] copy".
- Estate rail: compact "api :8020/v1 · [u] copy" (rail is ~30 cols; the
  full URL lives on the card).
- NEW [u] copy-API-URL key on every Run & Operate tab (kept separate
  from [Y] so row-copy semantics are untouched); honest notify no-op
  when nothing serves.

F3b (readiness lag): api_booting only cleared when the HEAVY docker+
health batch re-ran, so " booting" outlived actual readiness by a poll
cycle (audit: >=25s stale across three surfaces). While booting, the
fast GPU tick now piggybacks a 1.5s /v1/models probe; on 200 it pulls
the next heavy poll forward (burst regime) — every booting surface
flips within a tick or two of the API answering. Bounded: fires only in
the booting state.

Verified: c3 pytest suite 516 passed; live serve via switch.sh prints
the ready-line with the real LAN IP + the neutral served name
(http://192.168.86.33:8020/v1 · qwen3.6-27b · no auth).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EfF565T9eSLaqGzidyJ1Pm
2026-07-04 09:09:12 +00:00
..