GET /healthz¶
Liveness probe. The gateway returns 200 as long as the FastAPI process is alive and the application object is loaded. It does not check upstream OpenRouter or the database; use the right probe for each layer.
Request¶
No parameters, no body.
Response¶
200 OK:
| Field | Value | Notes |
|---|---|---|
status |
ok |
Always ok if the response is 200. |
phase |
blueprint |
Literal. Preserved for backward compatibility with earlier probes. |
Status codes¶
| Status | When |
|---|---|
200 |
Process is alive and accepting requests. |
| Any other | The FastAPI process is failing or unreachable. Treat as down. |
Production probes¶
The production nginx vhost exposes this endpoint at:
A loopback probe is also possible:
Both return identical bodies. Use the loopback probe for host-local health checks (does not depend on TLS); use the public probe from outside the host to validate the full chain.
Layered checks¶
/healthz does not cover:
- Upstream OpenRouter reachability.
- PostgreSQL connection.
- Model health registry state.
- Budget ledger state.
For those, see:
/metrics— Prometheus counters.- Structured logs — look for
Routing decision made. artifacts/WAVE-I/— Post-production validation evidence.
When /healthz is the right probe¶
- Container restart policy.
- Load balancer member health.
When /healthz is the wrong probe¶
- Alerting on OpenRouter outages — use
sgw_requests_total{status="500"}. - Budget exhaustion alerts — use application logs and the budget metric (currently exposed only via application state).
- Deep health (e.g. database is degraded) — use the
SAFE_DEGRADEDpattern in application logs.