co-mono/packages/ai/src/providers
Mario Zechner bc8d994a7b Fix token statistics on abort for Anthropic provider
- Add handling for message_start event to capture initial token usage
- Fix message_delta to use assignment (=) instead of addition (+=)
  since Anthropic sends cumulative token counts, not incremental
- Add comprehensive tests for all providers (Google, OpenAI Completions,
  OpenAI Responses, Anthropic)
- Document OpenAI limitation: token stats only available at stream end

Fixes issue where aborted streams had zero token counts despite
Anthropic sending input tokens in the initial message_start event.
2025-10-26 21:22:24 +01:00
..
anthropic.ts Fix token statistics on abort for Anthropic provider 2025-10-26 21:22:24 +01:00
google.ts Add timestamp to messages 2025-10-26 00:43:43 +02:00
openai-completions.ts Add timestamp to messages 2025-10-26 00:43:43 +02:00
openai-responses.ts Add timestamp to messages 2025-10-26 00:43:43 +02:00
transorm-messages.ts Remove tool calls for which there are no results in subsequent user messages. 2025-10-01 22:18:30 +02:00