[GH-ISSUE #4457] [BUG]: Misreporting of TPS for OpenAI #2841

Closed
opened 2026-02-22 18:31:29 -05:00 by yindo · 0 comments
Owner

Originally created by @timothycarambat on GitHub (Sep 30, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4457

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

All versions

What happened?

The migration to the responses API in #4403 left a gap in token tracking as the responses response schema does not 1:1 map to the usage fields we track across all providers:

{
  completion_tokens: 0,
  prompt_tokens: 0,
  total_tokens: 0,
  outputTps: 0,
  duration: 0,
}

This resulted in incorrect TPS measurments as several fields would be missing since in the responses API:
completion_tokens -> output_tokens
prompt_tokens -> input_tokens

Are there known steps to reproduce?

cc: @shatfield4

Originally created by @timothycarambat on GitHub (Sep 30, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4457 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? All versions ### What happened? The migration to the `responses` API in #4403 left a gap in token tracking as the responses response schema does not 1:1 map to the usage fields we track across all providers: ```js { completion_tokens: 0, prompt_tokens: 0, total_tokens: 0, outputTps: 0, duration: 0, } ``` This resulted in incorrect TPS measurments as several fields would be missing since in the responses API: `completion_tokens` -> `output_tokens` `prompt_tokens` -> `input_tokens` ### Are there known steps to reproduce? cc: @shatfield4
yindo added the core-team-only label 2026-02-22 18:31:29 -05:00
yindo closed this issue 2026-02-22 18:31:29 -05:00
yindo changed title from [BUG]: Misreporting of TPS for OpenAI to [GH-ISSUE #4457] [BUG]: Misreporting of TPS for OpenAI 2026-06-05 14:48:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2841