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-19 18:56:43 +08:00
2026-08-19 18:56:43 +08:00
2026-07-26 14:31:45 +08:00
2026-08-25 11:51:17 +08:00
2026-08-25 11:51:17 +08:00
2026-08-25 11:51:17 +08:00
2026-08-25 11:51:17 +08:00
2026-08-25 15:13:04 +08:00
2026-08-11 18:33:50 +08:00
2026-08-25 11:51:17 +08:00
2026-08-25 15:13:04 +08:00
2026-08-25 15:13:04 +08:00
2026-08-25 15:13:04 +08:00
2026-08-25 11:51:17 +08:00
2026-08-11 18:33:50 +08:00
2026-08-25 14:57:46 +08:00
2026-08-25 14:57:46 +08:00
2026-08-11 16:07:42 +08:00
2026-07-25 14:07:31 +08:00
2026-08-11 09:57:15 +08:00
2026-08-11 09:57:15 +08:00
2026-08-25 14:57:46 +08:00
2026-08-11 16:07:42 +08:00
2026-08-11 18:33:50 +08:00
2026-08-19 19:13:56 +08:00
2026-08-11 19:33:40 +08:00
2026-08-03 14:47:26 +08:00
2026-08-20 00:15:31 +08:00
2026-08-20 00:15:31 +08:00
2026-08-18 17:29:26 +08:00
2026-08-18 18:06:40 +08:00
2026-08-03 15:44:44 +08:00
2026-08-03 14:47:26 +08:00
2026-08-18 18:21:33 +08:00
2026-08-27 17:32:07 +08:00
2026-08-03 14:47:26 +08:00
2026-08-15 14:08:16 +08:00
2026-08-18 17:29:26 +08:00
2026-08-15 14:08:16 +08:00
2026-08-03 14:47:26 +08:00
2026-08-19 22:29:51 +08:00
2026-08-20 15:19:07 +08:00
2026-08-18 18:21:33 +08:00
2026-08-28 05:01:42 +08:00
2026-08-03 14:47:26 +08:00
2026-08-18 18:06:40 +08:00
2026-08-03 14:47:26 +08:00
2026-08-20 15:19:07 +08:00
2026-08-18 18:06:40 +08:00
2026-08-18 18:21:33 +08:00
2026-08-18 17:29:26 +08:00
2026-08-18 18:06:40 +08:00
2026-08-18 18:21:33 +08:00
2026-08-09 04:36:39 +08:00
2026-08-09 04:36:39 +08:00
2026-07-26 14:31:45 +08:00
2026-08-12 18:28:40 +08:00
2026-08-18 19:33:50 +08:00
2026-08-22 20:58:35 +08:00
2026-08-03 02:45:49 +08:00
2026-07-24 11:10:58 -07:00
2026-07-26 19:11:32 +08:00
2026-08-20 15:19:07 +08:00
2026-08-06 04:49:28 +08:00
2026-08-20 21:31:53 +08:00
2026-08-29 01:22:21 +08:00
2026-08-29 01:22:21 +08:00
2026-08-06 17:19:24 +08:00
2026-07-26 14:31:45 +08:00
2026-07-30 16:37:40 +08:00
2026-08-18 19:33:50 +08:00
2026-08-20 21:31:53 +08:00
2026-08-07 19:16:06 +08:00
2026-07-26 14:31:45 +08:00
2026-08-29 01:22:21 +08:00
2026-07-23 13:42:08 +08:00
2026-08-27 17:09:28 +08:00
2026-07-26 14:31:45 +08:00
2026-08-20 15:19:07 +08:00
2026-08-12 18:20:13 +08:00
2026-08-12 18:20:13 +08:00
2026-08-29 01:22:21 +08:00
2026-08-18 19:33:50 +08:00
2026-08-21 10:57:03 +08:00
2026-08-20 15:19:07 +08:00
2026-08-21 10:57:03 +08:00
2026-08-21 10:57:03 +08:00
2026-07-23 13:42:08 +08:00
2026-08-18 17:29:26 +08:00
2026-08-18 18:21:33 +08:00
2026-08-08 05:08:42 +08:00
2026-08-09 04:36:39 +08:00
2026-08-12 13:05:06 +08:00
2026-08-07 06:26:33 +08:00
2026-08-03 03:37:24 +08:00
2026-08-18 19:33:50 +08:00
2026-08-07 19:16:06 +08:00
2026-08-07 19:16:06 +08:00
2026-07-23 13:42:08 +08:00
2026-07-23 13:42:08 +08:00
2026-07-26 14:31:45 +08:00
2026-08-27 01:08:35 +08:00
2026-08-18 19:33:50 +08:00
2026-08-27 01:08:35 +08:00
2026-08-27 01:08:35 +08:00
2026-08-27 01:08:35 +08:00
2026-08-27 01:08:35 +08:00
2026-07-26 14:31:45 +08:00
2026-08-27 01:08:35 +08:00
2026-08-07 06:48:09 +08:00
2026-08-07 06:48:09 +08:00
2026-08-27 05:30:19 +08:00