[GH-ISSUE #4449] [BUG/CHORE]: Gemini models token metrics incorrect #2837

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

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

Originally assigned to: @angelplusultra on GitHub.

How are you running AnythingLLM?

All versions

What happened?

The TPS measurement of Gemini models is incorrect. This is likely due to manual counting of the tokens on request, which has always been a rough estimation. If possible, this value should come directly from the API chunks.

Are there known steps to reproduce?

Use Google Gemini as the LLM provider (any model)
In a chat send a simple prompt like Tell me a short story
Observe that the metrics are clearly wrong (~3-8 tps, which should be 100+)

More Context:
https://github.com/Mintplex-Labs/anything-llm/pull/4459#pullrequestreview-3287426632

Originally created by @timothycarambat on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4449 Originally assigned to: @angelplusultra on GitHub. ### How are you running AnythingLLM? All versions ### What happened? The TPS measurement of Gemini models is incorrect. This is likely due to manual counting of the tokens on request, which has always been a rough estimation. If possible, this value should come directly from the API chunks. ### Are there known steps to reproduce? Use Google Gemini as the LLM provider (any model) In a chat send a simple prompt like `Tell me a short story` Observe that the metrics are clearly wrong (~3-8 tps, which should be 100+) More Context: https://github.com/Mintplex-Labs/anything-llm/pull/4459#pullrequestreview-3287426632
yindo added the enhancementpossible bugcore-team-only labels 2026-02-22 18:31:28 -05:00
yindo closed this issue 2026-02-22 18:31:28 -05:00
yindo changed title from [BUG/CHORE]: Gemini models token metrics incorrect to [GH-ISSUE #4449] [BUG/CHORE]: Gemini models token metrics incorrect 2026-06-05 14:48:49 -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#2837