Skip to content

Gateway Health data for MCP + LLM Gateway#28

Open
aryasuneesh-quilr wants to merge 8 commits into
mainfrom
health-check
Open

Gateway Health data for MCP + LLM Gateway#28
aryasuneesh-quilr wants to merge 8 commits into
mainfrom
health-check

Conversation

@aryasuneesh-quilr

@aryasuneesh-quilr aryasuneesh-quilr commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator
screencapture-localhost-3009-health-2026-07-13-09_59_02

Replaces the mocked Gateway Health tab with live zero-cost synthetic checks against the actual MCP Gateway and LLM Gateway plus real reachability against production LLM Gateway regions.

Gateway Health: split into two grouped sections, MCP Gateway and LLM Gateway, each row backed by one specific check:

  1. MCP Gateway - direct backend connection call
  2. OneMCP Router - call routed through the OneMCP aggregation router
  3. US Central West / US East / India · Mumbai / Global Router - plain reachability against each real production LLM Gateway region host
  4. Chat Completions / Streaming / Model Listing - deep functional checks through the full request pipeline (auth, routing, guardrails/DLP)

The backend that produces this data (synthetic LLM/MCP test doubles, probe worker, public rollup API) does not live in this repo - docs is a public, static site with no backend, so it now lives in macrodata-refinement under OTHER_APPS/gateway_health/. See macrodata-refinement#218 for that implementation, including systemd units for production, dynamic port allocation for the two synthetic services, and pinned dependencies.


Files changed:

src/components/GatewayHealth/GatewayTimeline.js:

  • Removed the deterministic mock data generator entirely (fixed seed PRNG, fake per-region numbers, hardcoded component list). Now fetches rollup_server.py's endpoint once and partitions the response into MCP Gateway / LLM Gateway sections using a group field the server provides.
  • Each section has its own loading/error state, so a rollup outage degrades gracefully instead of breaking the page. Row hosts now come from the server response instead of a hardcoded per-group constant, since each LLM region needs its own distinct host label.

src/components/GatewayHealth/timeline.module.css:

  • Added .groupHead/.groupLabel/.groupNote/.groupError styles to visually separate the MCP Gateway and LLM Gateway sections within the same tab.

Setting this up on production:

  1. src/components/GatewayHealth/GatewayTimeline.js: GATEWAY_ROLLUP_URL needs to change from 127.0.0.1:8099 to wherever the rollup server ends up publicly hosted, over HTTPS (browsers block plain HTTP fetches from an HTTPS page). See macrodata-refinement#218 for the open decision on where that public route lives and how it gets there.

  2. A cross-repo dependency: the /internal/gateway-health/bootstrap and /internal/gateway-health/probe-results routes the worker depends on live in quilr-llm-gateway, on the health-check-dashboard branch. There's a parallel PR against quilr-llm-gateway's health-check-dashboard branch to land that side - it also carries two fixes found while diffing that repo's worker against this one line by line:

    • _ensure_llm_key() read an already-existing key back as key.get("api_key"), but GET /api-keys/list returns it under quilr_api_key (confirmed against handlers/api_key_handler.py). The very first run worked, because the create response really does use api_key - but every run after that found the key already existed, read back None, and sent Authorization: Bearer None, failing every chat/streaming/models probe from the second cycle onward. Fixed to read quilr_api_key.
    • The region probes (_probe_region / LLM_REGIONS) never existed in quilr-llm-gateway's copy of the worker at all. Without them, the check itself is a harmless plain GET, but nothing ever POSTs its result to /internal/gateway-health/probe-results, so the Region rows would have sat at nodata forever regardless of anything in this repo. Ported over.
  3. Network reachability, for both synthetic services: if you want the deep completion checks (Chat Completions/Streaming/Model Listing) and the direct/OneMCP checks running against real production, the real LLM Gateway needs to reach the synthetic LLM provider and the real MCP Gateway needs to reach the synthetic MCP backend, both over the network from wherever they actually run (now macrodata-refinement, see macrodata-refinement#218). Practically that means both fake services need to sit inside the same private network/VPC as production or be given public addresses (with the exposure tradeoff that implies) - there's no way around this being a real network dependency in both directions.

Replaces the fully-mocked LLM Gateway section (fake per-region
breakdown) with real synthetic canary data - chat completions,
streaming, and model listing - fetched from the same rollup server
used for MCP Gateway. Every LLM probe is routed to a zero-cost fake
provider (health-check/synthetic_llm_provider.py) via a synthetic API
key, so this never touches or bills a real model.

Also fixes two bugs in the probe worker that were silently failing
every LLM probe cycle since it started: the key-name constant pointed
at a stale key created before selected_models was required, and the
key-reuse path read the wrong response field (api_key instead of
quilr_api_key), so even the correct key was never actually returned.
Adds a plain HTTPS reachability probe (health-check/worker.py's
_probe_region) against the real production LLM Gateway regions -
guardrails-usa-1/usa-2/india-1.quilr.ai - matching the same host set
and the same "skip the global auto-router, it's not meaningful to
probe directly" choice already used by the QuilrAI Infrastructure
tab's browser-side ping. Unlike that tab, this runs server-side on a
schedule and persists results, so Gateway Health gets real hourly
history instead of an ephemeral per-visit check.

No API key or synthetic provider needed for this - it's an outbound
HTTPS request to a public host, same as any browser hitting the site,
so no production writes and nothing new to expose publicly.

The rollup server and frontend now surface these three regions under
Gateway Health's LLM Gateway section instead of the chat/streaming/
models scenario rows (worker still records those separately).
Adds chat completions, streaming, and model listing back to the
public rollup allowlist so they render in the Gateway Health tab
alongside the region reachability rows, instead of only recording
silently. These are a genuinely different, deeper signal than the
region pings: confirmed the synthetic key carries the default enabled
risk categories, so every chat/streaming probe actually exercises the
real guardrails/DLP detection pass, not a bypass - all through a
zero-cost synthetic provider, never a real, billable model.
The MCP/LLM Gateway row descriptions and group labels referenced
internal implementation details (synthetic canary, zero-cost, fake
provider) that don't belong on a public-facing status page. Reworded
every user-visible note to describe what each check verifies without
naming the mechanism behind it.
Fake LLM/MCP test doubles and the probe worker/rollup server never
belonged in this public, backend-less static site. They now live at
OTHER_APPS/gateway_health/ in macrodata-refinement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant