Request: Token Count on Gemini (all) APIs
Author: joe-sageCreated Aug 15, 2025Updated Jul 25, 2026
Labelsenhancement
Hola,
First off, very cool library! Thank you for sharing.
I haven't delved too deep into the codebase, and may just fork and add this feature myself if it isn't planned, but I'd like to retrieve token counts from the ai providers (specifically Gemini). I'm unsure how that interacts with the library, though. Does each 'pass' send the entire document, prompt and all, to the API, so each call would be multiplied by the number of passes?
Either way, are token counts planned to be included generally?
Thanks again!
Source: google/langextract