DepTime

google-generativeai → google-genaiWhat was renamed or removed, and what to use instead

google-generativeai → its successor, from the projects' migration guides

The names google-generativeai's migration guide says to replace, with what to use instead, each quoted from the guide with a link to it.

13renamed or replaced

Renamed or replaced13

OldUse insteadChanged inEvidence
google.generativeai.configuregoogle.genai.Clientthe project's migration guide: “genai.configure(api_key=...) … client = genai.Client(api_key="YOUR_API_KEY")” (source)
google.generativeai.GenerativeModelgoogle.genai.Clientthe project's migration guide: “Now, you interact through a central Client object. … You would directly instantiate and interact with GenerativeModel objects.” (source)
google.generativeai.GenerativeModel.generate_contentgoogle.genai.models.Models.generate_contentthe project's migration guide: “response = model.generate_content(...) … response = client.models.generate_content(...)” (source)
google.generativeai.GenerativeModel.start_chatgoogle.genai.chats.Chats.createthe project's migration guide: “chat = model.start_chat() … chat = client.chats.create(model='gemini-3.8-flash')” (source)
google.generativeai.GenerativeModel.generate_content_asyncgoogle.genai.models.AsyncModels.generate_contentthe project's migration guide: “response = model.generate_content_async( … there is a separate async implementation of every method under client.aio. … response = await client.aio.models.generate_content(” (source)
google.generativeai.GenerationConfiggoogle.genai.types.GenerateContentConfigthe project's migration guide: “generation_config=genai.GenerationConfig( … config=types.GenerateContentConfig(” (source)
google.generativeai.GenerativeModel.count_tokensgoogle.genai.models.Models.count_tokensthe project's migration guide: “response = model.count_tokens( … response = client.models.count_tokens(” (source)
google.generativeai.embed_contentgoogle.genai.models.Models.embed_contentthe project's migration guide: “response = genai.embed_content( … response = client.models.embed_content(” (source)
google.generativeai.upload_filegoogle.genai.files.Files.uploadthe project's migration guide: “file = genai.upload_file(path='a11.txt') … my_file = client.files.upload(file='a11.txt')” (source)
google.generativeai.list_filesgoogle.genai.files.Files.listthe project's migration guide: “for file in genai.list_files(): … for file in client.files.list():” (source)
google.generativeai.get_filegoogle.genai.files.Files.getthe project's migration guide: “file = genai.get_file(name=file.name) … file = client.files.get(name=file.name)” (source)
google.generativeai.delete_filegoogle.genai.files.Files.deletethe project's migration guide: “file = genai.delete_file(name=dummy_file.name) … response = client.files.delete(name=dummy_file.name)” (source)
google.generativeai.caching.CachedContent.creategoogle.genai.caches.Caches.createthe project's migration guide: “apollo_cache = caching.CachedContent.create( … apollo_cache = client.caches.create(” (source)

No names match.