id | uuid | Request id. |
majordomo_api_key_id | uuid | Owning Majordomo API key. |
provider_api_key_hash | varchar(64) | Hash of upstream provider Authorization header. |
provider_api_key_alias | varchar(255) | Optional alias from X-Majordomo-Provider-Alias. |
provider | varchar(100) | openai, anthropic, or gemini. |
model | varchar(100) | Model name as reported (or translated). |
request_path | text | Upstream path (e.g., /v1/chat/completions). |
request_method | text | HTTP method. |
requested_at | timestamptz | Timestamp when request was received. |
responded_at | timestamptz | Timestamp when response was fully sent. |
response_time_ms | int | Wall-clock response time. |
input_tokens | int | Count parsed from provider response. |
output_tokens | int | Count parsed from provider response. |
cached_tokens | int | Prompt caching read tokens (if applicable). |
cache_creation_tokens | int | Tokens charged to create cache entries. |
input_cost | numeric(12,8) | Calculated cost for input tokens. |
output_cost | numeric(12,8) | Calculated cost for output tokens. |
total_cost | numeric(12,8) | Sum of input/output (and cache) costs. |
status_code | int | Upstream HTTP status. |
error_message | text | Truncated error body when status ≥ 400. |
raw_metadata | jsonb | All custom headers (X-Majordomo-*, minus reserved) without indexing. |
indexed_metadata | jsonb | Subset of active keys copied for fast @> queries (GIN index). |
request_body | text | Optional local body copy when Postgres body storage is enabled. |
response_body | text | Optional local body copy when Postgres body storage is enabled. |
body_s3_key | text | Object key when uploaded to S3/GCS via personal/org config. |
model_alias_found | bool | True if pricing alias resolved for the model. |
org_id | uuid | Owning org (shadow for filtering/joins). |
created_at | timestamptz | Row creation timestamp. |
synced_to_butler | bool | Steward-only: batched to Butler yet. |