Currently all methods that can stream results (e.g. StreamGenerateContent) have a corresponding generated Dart binding, e.g.
/// Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream)
/// from the model given an input `GenerateContentRequest`.
Stream<GenerateContentResponse> streamGenerateContent(
GenerateContentRequest request,
) {
final url = Uri.https(_host, '/v1/${request.model}:streamGenerateContent');
return _client
.postStreaming(url, body: request)
.map(GenerateContentResponse.fromJson);
}
But not all streaming methods support Server-sent events (SSE), which is the implementation supported by Dart.
So instead whitelist streamed methods known to support SSE.