Firebase AI - no support for usageMetaData #18251
Replies: 1 comment
-
|
I agree this would be useful, especially for production apps that need per-session usage tracking.
It would be helpful if the Flutter Firebase AI SDK exposed usage metadata consistently across supported Gemini 2.5 models and APIs, including fields such as:
A temporary workaround could be routing requests through a backend using the Gemini or Vertex AI API directly and returning the usage metadata with the response, but that removes some of the convenience and security benefits of using Firebase AI Logic directly from Flutter. Native support in the Flutter SDK would make usage analytics, cost estimation, and quota monitoring much cleaner. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The flutter SDK does not include usageMetaData for the Gemini 2.5 live api , but it includes it only for Flash or Pro models. This is a critical feature for an app we are currnently working on to properly calculate the usage metadata data and related costs for each session.
Beta Was this translation helpful? Give feedback.
All reactions