@@ -344,9 +344,9 @@ fn push_deduped_entry(
344344///
345345/// Matching message and request IDs identify one response across sessions. Without a request
346346/// ID, gateways can reuse one message ID for every response, so the key is scoped to the
347- /// session and timestamp instead. Real response IDs (`msg_` and `resp_` prefixes ) are unique
348- /// per response, so requestless entries with one collapse by session across timestamps: Claude
349- /// Code writes one line per content block with the same `message.id` but distinct timestamps.
347+ /// session and timestamp instead. Real Anthropic IDs (`msg_` prefix ) are unique per response,
348+ /// so requestless entries with one collapse by session across timestamps: Claude Code writes
349+ /// one line per content block with the same `message.id` but distinct timestamps.
350350fn usage_dedupe_hash (
351351 message_id : & str ,
352352 request_id : Option < & str > ,
@@ -365,14 +365,12 @@ fn usage_dedupe_hash(
365365 hasher. finish ( )
366366}
367367
368- /// Real response IDs are unique per response, unlike the placeholder IDs gateways
368+ /// Real Anthropic message IDs are unique per response, unlike the placeholder IDs gateways
369369/// reuse for every response.
370370///
371371/// The prefix is a heuristic: only a request ID proves two lines belong to one response, so a
372- /// gateway that reused a response-shaped placeholder would collapse to one entry per session.
373- /// OpenAI's Responses API mints one `resp_` ID per response, the same way Anthropic mints one
374- /// `msg_` ID per response, so both collapse across the content-block timestamps Claude Code
375- /// writes for a single response.
372+ /// gateway that reused a `msg_`-shaped placeholder would collapse to one entry per session.
373+ /// OpenAI Responses API `resp_` IDs are treated the same way.
376374pub ( crate ) fn is_anthropic_message_id ( message_id : & str ) -> bool {
377375 message_id. starts_with ( "msg_" ) || message_id. starts_with ( "resp_" )
378376}
0 commit comments