sususu98
4b2beb3da1
feat(executor): measure effective TTFT with protocol-aware token classification (#5313)
* feat(executor): measure effective TTFT with protocol-aware token classification
- Introduce protocol-aware streaming token classification under internal/runtime/executor/helps
- Implement responses_ttft_helpers.go for OpenAI Responses / Codex WebSocket & SSE streaming
- Filter out container metadata, rate limits, handshake headers, and tool execution outputs
- Implement dual-track firstPacketDuration fallback for abnormal / zero-token stream terminations
- Add TrackHTTPClientRoundTripOnly to bypass false TTFT triggers on first response body reads
- Optimize UsageReporter.ObserveTokenEvent hot path with fast-path RLock short-circuiting (0 B/op)
- Align terminal event completions across SSE, WebSocket streaming, and non-streaming executions
- Add EnsurePublished metric recording fallback for successful terminal turns lacking usage blocks
- Add stub helpers with comprehensive specifications for Chat, Claude, and Gemini protocols
* fix(executor): normalize SSE response.done and terminate incomplete WS streams
* fix(usage): capture first-packet fallback on initial body reads with TrackHTTPClientRoundTripOnly
2026-08-29 01:22:21 +08:00
..
2026-08-29 01:22:21 +08:00
2026-08-14 22:45:09 +08:00
2026-08-19 22:29:51 +08:00
2026-08-19 22:29:51 +08:00
2026-08-18 17:29:26 +08:00
2026-08-20 00:15:31 +08:00
2026-08-11 19:33:40 +08:00
2026-08-11 19:33:40 +08:00
2026-08-20 00:30:41 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 15:25:17 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-07-22 05:21:14 +08:00
2026-08-15 15:00:19 +08:00
2026-08-14 22:45:09 +08:00
2026-08-14 22:45:09 +08:00
2026-08-14 22:45:09 +08:00
2026-08-27 17:32:07 +08:00
2026-08-27 17:32:07 +08:00
2026-08-29 01:22:21 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-05 00:27:32 +08:00
2026-08-03 14:47:26 +08:00
2026-08-12 01:04:22 +08:00
2026-08-12 01:04:22 +08:00
2026-08-11 16:07:42 +08:00
2026-08-12 15:04:17 +08:00
2026-08-24 17:15:37 +08:00
2026-08-24 17:15:37 +08:00
2026-07-26 03:07:21 +08:00
2026-07-26 03:07:21 +08:00
2026-08-19 18:56:43 +08:00
2026-08-19 18:56:43 +08:00
2026-08-29 01:22:21 +08:00
2026-08-03 21:40:06 +08:00
2026-08-03 21:40:06 +08:00
2026-08-24 17:15:37 +08:00
2026-07-31 13:28:14 +08:00
2026-08-07 06:26:33 +08:00
2026-08-03 03:37:24 +08:00
2026-08-03 03:37:24 +08:00
2026-08-05 18:25:40 +08:00
2026-08-05 18:25:40 +08:00
2026-08-29 01:22:21 +08:00
2026-08-29 01:22:21 +08:00
2026-08-15 15:00:19 +08:00
2026-08-15 15:00:19 +08:00
2026-07-31 12:45:13 +08:00
2026-07-31 12:45:13 +08:00
2026-08-11 18:33:50 +08:00
2026-08-11 18:33:50 +08:00
2026-08-29 01:22:21 +08:00
2026-08-29 01:22:21 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-03 14:47:26 +08:00
2026-08-11 00:58:13 +08:00
2026-08-11 00:58:13 +08:00
2026-08-27 05:30:19 +08:00
2026-08-27 05:30:19 +08:00