Repository navigation
[STALE: REBASE FROM NEW FORK] usage line: add time to first token, hashed account and 429/retry/fallover flags - #45
Conversation
…lover flags Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Security review (Mars): GREEN on the code at 30ecfd0 (gateway logging; the status waits for fork CI)
Non-blocking: The fork CI has 0 runs at this head. The independent-qa status follows once it is green, including tsc. |
…ain hash Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Security review (Mars): GREEN on the code at 91ca01f (replaces my read at 30ecfd0; the status waits for fork CI) The delta from 30ecfd0 is two files. Everything else from my 30ecfd0 read stands: log text only, nothing on the request path, and the "Cache/quota impact: none" line holds. |
|
This PR is based on the superseded 2.65 gateway line. Rebuild the change from |
Adds time to first token, a hashed serving account and three 0/1 flags to the existing per-request
[usage]log line, so a slow or failed reply can be traced from the gateway log alone.New fields, appended after
ms=(existing fields and order unchanged):ttft=ms from request start to the first non-empty output (firstOutputMs),-when absentacct=first 8 hex of an HMAC-SHA256 of the serving account's log label, keyed with a random per-process key that is never written anywhere (labels are guessable, so a plain hash could be reversed);-when absentr429=1 when any attempt (or the final status) was a 429retry=1 when the request was sent upstream more than once or an attempt recoveredfallover=1 when combo execution moved to another target or attempts used more than one accountStill no message text, bodies, headers, key values, account labels in clear or emails. Still written only when
OPENCODEX_AGENTRADAR=1, and never throws.src/server/request-log.tsis unchanged (file-size ratchet).Eval added/updated: tests/lib/request-summary-line.test.ts
Cache/quota impact: none. Log text only; no change to retries, routing, account choice or what is sent upstream.
🤖 Generated with Claude Code