flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🚀 [firebase_ai] Support GoAway message in LiveGenerativeModel

Open suesitran opened this issue 1 month ago • 0 comments

What feature would you like to see?

From the link here: https://ai.google.dev/gemini-api/docs/live-session

There is a limit on Session lifetime, and server will send a GoAway message with time left duration before the session cutoff.

Currently this GoAway message is returned as an exception in LiveGenerativeModel in firebase_ai package. It'd be great to have this message returned as 1 of the accepted type, so app will know when to stop the live session.

E/flutter ( 9834): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Unhandled format for LiveServerMessage: {goAway: {timeLeft: 50s}}

suesitran avatar Nov 01 '25 09:11 suesitran