Skip to main content
This page documents the columns you’ll see when querying usage directly. Steward writes locally first and batches metadata to Butler; the dashboard reads from Butler’s database.
  • Steward (gateway) writes request rows immediately to its local DB and uploads bodies to your S3/GCS when configured.
  • Butler (control plane) ingests usage/metadata in batches from Steward and serves the dashboard/API.
  • The Web dashboard queries Butler. If you query directly, prefer Butler’s DB for analytics consistency.

llm_requests

One row per proxied request. Indexes: by (majordomo_api_key_id, requested_at DESC), a GIN index on indexed_metadata, and a partial index on trace_id (where not null) for run lookups.

llm_requests_metadata_keys

Per-API-key registry of discovered metadata keys and their indexing state. Index: is_active per API key for fast lookups.

Notes

  • Reserved headers that do not enter raw_metadata: X-Majordomo-Key, X-Majordomo-Provider, X-Majordomo-Provider-Alias, X-Majordomo-Client, X-Majordomo-Trace-Id, X-Majordomo-Span-Path, X-Majordomo-Span-Name.
  • Bodies in Postgres are off by default; prefer S3/GCS via Cloud Body Storage.

SQL primer

For end‑to‑end examples, see Cost Attribution. A few quick patterns: