Skip to content

Local setup requiring GEMINI DEVELOPER API KEY, despite VERTEX AI API enabled on Firebase project #295

@mhmzdev

Description

@mhmzdev

I'm trying to run examples of genui locally through my fork. I've setup a firebase project for the examples, and it has vertex AI enabled. But the logs says I need to use Gemini Developer API Key. Do I need to enable both of them?

The same project works fine with firebase_ai: 2.1.0 however I cannot downgrade firebase logic in here due to conflicts of versions

Firebase console (FIrebase AI)

Image

Logs

E/flutter (12920): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Firebase AI Logic is missing a configured Gemini Developer API key. Set one up by visiting https://console.firebase.google.com/project/dreamstale-stage/ailogic/settings. See https://firebase.google.com/docs/ai-logic/faq-and-troubleshooting?api=dev#error-genai-config-not-found for more details. If you very recently went through the Firebase AI Logic setup workflow, wait a few minutes for the action to propagate to our systems and retry.
E/flutter (12920): #0      DeveloperSerialization.parseGenerateContentResponse (package:firebase_ai/src/developer/api.dart:108:56)
api.dart:108
E/flutter (12920): <asynchronous suspension>
E/flutter (12920): #1      FirebaseAiClient._generate (package:flutter_genui/src/ai_client/firebase_ai_client.dart:397:24)
firebase_ai_client.dart:397
E/flutter (12920): <asynchronous suspension>
E/flutter (12920): #2      FirebaseAiClient.generateContent (package:flutter_genui/src/ai_client/firebase_ai_client.dart:116:14)
firebase_ai_client.dart:116
E/flutter (12920): <asynchronous suspension>
E/flutter (12920): #3      _TravelPlannerPageState._triggerInference (package:travel_app/main.dart:176:22)
main.dart:176
E/flutter (12920): <asynchronous suspension>
E/flutter (12920): 

I just want to understand the genui overall and want to contribute to something little as of my knowledge and experience. Really appreciate this initiative

Me understanding the core be like 🥲

Image
Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions