[GH-ISSUE #4289] [GUI] Monitor: /v1 proxy requests show no VRAM hit rate, and native engine metrics are not shown #1892

Closed
opened 2026-11-04 01:55:05 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Songokou1983 on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4289

Environment

  • Strata desktop 0.2.6 (Linux AppImage), Control 0.1.51, engine 0.1.50 (CUDA 13)
  • Model: Qwen3.8-Flash-Next IQ3_S, layer split over 2x RTX 3080 + RTX 2000 Ada
  • --kv-resident 32768, --conversation-cache-mib 24576 --conversation-cache-slots 6
  • Clients using the app's /v1 proxy: Hermes (OpenAI Python SDK), Qoder (undici), and Codex Desktop
    on another PC through Tailscale.

What I see

In Monitor, requests that arrive through the app's /v1 proxy show — in the VRAM hit rate
and Reused columns. Several other Monitor values are clearly not the loaded native instance:

Monitor field Shown Actual engine/native value
VRAM hit rate — hit_rate 0.94–0.98 in /api/native
Reused — prompt reuse, e.g. 40915 / 41231
Engine stopped, port 8080 ready, native instance port 18500
Context max 32768 262144
Expert cache 0 / 64 17921 / 21557 (34.9 GB)
Conversation cache unavailable enabled, 6 slots, 6 parked, 13.35 GB
Totals / speed history 0 requests have completed

The GPU temperature, power, VRAM and RAM cards do show real values.

Evidence

Engine request records (GET /api/native) contain the figures:

{"id": "06581577bf4c", "prompt_tokens": 41231, "reused": 40915,
 "hit_rate": 0.984, "pcie_share": 0,
 "drafts_offered": 214, "drafts_accepted": 153,
 "first_engine_token_s": 2.113, "prompt_ms": 2070, "decode_ms": 2746.4}

The Monitor request record (GET /api/monitor) for the same kind of request has only:

{"id":"req_...","at":"...","client":"OpenAI/Python 2.54.0","endpoint":"/chat/completions",
 "state":"done","tokensIn":41231,"tokensOut":234,"durationMs":4861,
 "model":"iq3_s","tps":85.2,"promptTps":152.7}

GET /api/monitor also reports:

"engine":{"status":"stopped","running":false,"port":8080,"modelId":null,"metricsSource":"none"}
"context":{"usedTokens":0,"maxTokens":32768}
"expertCache":{"used":0,"total":64}
"conversationCache":{"source":"unavailable"}
"totals":{"tokensIn":0,"tokensOut":0,"requests":0}

while /api/native has status:"ready", port:18500, context:262144 and
metrics.engine.expert_slots:17921, metrics.conversation_cache.enabled:true.

Why (static analysis, unconfirmed at runtime)

  1. /v1 request records lose the timing fields. apps/host/server/native-gateway.mjs's
    observe() keeps only predicted_per_second and prompt_per_second; serving.mark() stores only
    tokens/tps/promptTps. hit_rate, pcie_share, cache_n, draft_n, draft_n_accepted,
    prompt_ms and predicted_ms are dropped.
  2. The response timings do not carry the cache figures. serve/server.py's request_timings()
    returns cache_n, prompt_*, predicted_* and draft_*, but not hit_rate / pcie_share,
    although /metrics already computes both per request (hits / lookups, offloaded / routed).
  3. Monitor reads a different engine source. apps/host/server/monitor.mjs's snapshot() uses
    supervisor.status() and state.expertCache / context, not the loaded native instance's
    metrics from /api/native. That is why engine, context, expert cache and conversation cache are
    the old defaults, and totals stays at zero for /v1 proxy traffic (monitor.record() is only
    called on the app's own chat path).
  4. /v1/responses (Codex) does not emit timings at all yet, so even a fixed gateway has nothing to
    read for Responses traffic.

Suggested fix

  • serve/server.py: include hit_rate and pcie_share in request_timings() (same arithmetic as
    /metrics; omit when the engine did not report the counters).
  • apps/host/server/native-gateway.mjs: read hit_rate, pcie_share, cache_n, draft_n,
    draft_n_accepted, prompt_ms, predicted_ms from value.timings and value.response.timings;
    pass them to serving.mark().
  • monitor.mjs / native-control: when a native instance is ready, use its metrics.engine
    (max_context, expert_slots, expert_cache_mib), metrics.conversation_cache and the instance
    status/port instead of the old supervisor state; call monitor.record() from the proxy path so
    totals/history include proxied requests.
  • Later: add timings to /v1/responses for Codex.

Notes

  • The VRAM hit rate figure itself is real and healthy (94–98%); this is a reporting gap, not a cache
    problem.
  • This report is from reading the 0.2.6 source and observing the two HTTP APIs; I did not rebuild the
    app or change the running instance.
  • The app's packaged Control must be rebuilt to pick up a serve/server.py change.
Originally created by @Songokou1983 on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4289 ## Environment - Strata desktop 0.2.6 (Linux AppImage), Control 0.1.51, engine 0.1.50 (CUDA 13) - Model: Qwen3.8-Flash-Next IQ3_S, layer split over 2x RTX 3080 + RTX 2000 Ada - `--kv-resident 32768`, `--conversation-cache-mib 24576 --conversation-cache-slots 6` - Clients using the app's `/v1` proxy: Hermes (OpenAI Python SDK), Qoder (undici), and Codex Desktop on another PC through Tailscale. ## What I see In **Monitor**, requests that arrive through the app's `/v1` proxy show `—` in the **VRAM hit rate** and **Reused** columns. Several other Monitor values are clearly not the loaded native instance: | Monitor field | Shown | Actual engine/native value | |---|---|---| | VRAM hit rate | `—` | `hit_rate` 0.94–0.98 in `/api/native` | | Reused | `—` | prompt reuse, e.g. 40915 / 41231 | | Engine | `stopped`, port 8080 | `ready`, native instance port 18500 | | Context max | 32768 | 262144 | | Expert cache | 0 / 64 | 17921 / 21557 (34.9 GB) | | Conversation cache | `unavailable` | enabled, 6 slots, 6 parked, 13.35 GB | | Totals / speed history | 0 | requests have completed | The GPU temperature, power, VRAM and RAM cards do show real values. ## Evidence Engine request records (`GET /api/native`) contain the figures: ```json {"id": "06581577bf4c", "prompt_tokens": 41231, "reused": 40915, "hit_rate": 0.984, "pcie_share": 0, "drafts_offered": 214, "drafts_accepted": 153, "first_engine_token_s": 2.113, "prompt_ms": 2070, "decode_ms": 2746.4} ``` The Monitor request record (`GET /api/monitor`) for the same kind of request has only: ```json {"id":"req_...","at":"...","client":"OpenAI/Python 2.54.0","endpoint":"/chat/completions", "state":"done","tokensIn":41231,"tokensOut":234,"durationMs":4861, "model":"iq3_s","tps":85.2,"promptTps":152.7} ``` `GET /api/monitor` also reports: ```json "engine":{"status":"stopped","running":false,"port":8080,"modelId":null,"metricsSource":"none"} "context":{"usedTokens":0,"maxTokens":32768} "expertCache":{"used":0,"total":64} "conversationCache":{"source":"unavailable"} "totals":{"tokensIn":0,"tokensOut":0,"requests":0} ``` while `/api/native` has `status:"ready"`, `port:18500`, `context:262144` and `metrics.engine.expert_slots:17921`, `metrics.conversation_cache.enabled:true`. ## Why (static analysis, unconfirmed at runtime) 1. **`/v1` request records lose the timing fields.** `apps/host/server/native-gateway.mjs`'s `observe()` keeps only `predicted_per_second` and `prompt_per_second`; `serving.mark()` stores only tokens/tps/promptTps. `hit_rate`, `pcie_share`, `cache_n`, `draft_n`, `draft_n_accepted`, `prompt_ms` and `predicted_ms` are dropped. 2. **The response timings do not carry the cache figures.** `serve/server.py`'s `request_timings()` returns `cache_n`, `prompt_*`, `predicted_*` and `draft_*`, but not `hit_rate` / `pcie_share`, although `/metrics` already computes both per request (`hits / lookups`, `offloaded / routed`). 3. **Monitor reads a different engine source.** `apps/host/server/monitor.mjs`'s `snapshot()` uses `supervisor.status()` and `state.expertCache` / `context`, not the loaded native instance's `metrics` from `/api/native`. That is why engine, context, expert cache and conversation cache are the old defaults, and `totals` stays at zero for `/v1` proxy traffic (`monitor.record()` is only called on the app's own chat path). 4. `/v1/responses` (Codex) does not emit `timings` at all yet, so even a fixed gateway has nothing to read for Responses traffic. ## Suggested fix - `serve/server.py`: include `hit_rate` and `pcie_share` in `request_timings()` (same arithmetic as `/metrics`; omit when the engine did not report the counters). - `apps/host/server/native-gateway.mjs`: read `hit_rate`, `pcie_share`, `cache_n`, `draft_n`, `draft_n_accepted`, `prompt_ms`, `predicted_ms` from `value.timings` and `value.response.timings`; pass them to `serving.mark()`. - `monitor.mjs` / `native-control`: when a native instance is ready, use its `metrics.engine` (`max_context`, `expert_slots`, `expert_cache_mib`), `metrics.conversation_cache` and the instance status/port instead of the old supervisor state; call `monitor.record()` from the proxy path so totals/history include proxied requests. - Later: add `timings` to `/v1/responses` for Codex. ## Notes - The VRAM hit rate figure itself is real and healthy (94–98%); this is a reporting gap, not a cache problem. - This report is from reading the 0.2.6 source and observing the two HTTP APIs; I did not rebuild the app or change the running instance. - The app's packaged Control must be rebuilt to pick up a `serve/server.py` change.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660210537 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1892
No description provided.