|
94 | 94 | "type": "integer", |
95 | 95 | "minimum": 0, |
96 | 96 | "description": "Total number of bytes in the response body (optional, omitted for WebSocket upgrades)." |
| 97 | + }, |
| 98 | + "x_initiator": { |
| 99 | + "type": "string", |
| 100 | + "enum": ["agent", "user"], |
| 101 | + "description": "The X-Initiator header value sent on the request. Determines billing treatment: 'agent' requests are not billed as premium, 'user' requests are. Present only for Copilot-bound requests." |
| 102 | + }, |
| 103 | + "billing": { |
| 104 | + "type": "object", |
| 105 | + "description": "Billing/quota information extracted from upstream response headers (X-Quota-Snapshot-*, X-RateLimit-*). Present only when the upstream returns billing headers.", |
| 106 | + "properties": { |
| 107 | + "quota_chat": { |
| 108 | + "type": "object", |
| 109 | + "description": "X-Quota-Snapshot-Chat parsed fields.", |
| 110 | + "properties": { |
| 111 | + "ent": { "type": "string", "description": "Entitlement count (-1 = unlimited)." }, |
| 112 | + "ov": { "type": "string", "description": "Overage requests made this period." }, |
| 113 | + "ovPerm": { "type": "string", "description": "Whether overage is allowed (true/false)." }, |
| 114 | + "rem": { "type": "string", "description": "Percentage of entitlement remaining." }, |
| 115 | + "rst": { "type": "string", "description": "Quota reset date (RFC 3339 UTC)." } |
| 116 | + }, |
| 117 | + "additionalProperties": true |
| 118 | + }, |
| 119 | + "quota_premium-chat": { |
| 120 | + "type": "object", |
| 121 | + "description": "X-Quota-Snapshot-Premium-Chat parsed fields. Tracks premium request units (PRU).", |
| 122 | + "properties": { |
| 123 | + "ent": { "type": "string", "description": "Premium entitlement count." }, |
| 124 | + "ov": { "type": "string", "description": "Premium overage requests made." }, |
| 125 | + "ovPerm": { "type": "string", "description": "Whether premium overage is allowed." }, |
| 126 | + "rem": { "type": "string", "description": "Percentage of premium entitlement remaining." }, |
| 127 | + "rst": { "type": "string", "description": "Premium quota reset date." } |
| 128 | + }, |
| 129 | + "additionalProperties": true |
| 130 | + }, |
| 131 | + "rate_limit": { "type": "string", "description": "X-RateLimit-Limit value." }, |
| 132 | + "rate_remaining": { "type": "string", "description": "X-RateLimit-Remaining value." }, |
| 133 | + "rate_reset": { "type": "string", "description": "X-RateLimit-Reset value (Unix timestamp)." } |
| 134 | + }, |
| 135 | + "additionalProperties": true |
97 | 136 | } |
98 | 137 | } |
99 | 138 | } |
0 commit comments