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
| Old | Use instead | Changed in | Evidence |
|---|---|---|---|
google. | google. | the project's migration guide: “genai.configure(api_key=...) … client = genai.Client(api_key="YOUR_API_KEY")” (source) | |
google. | google. | the project's migration guide: “Now, you interact through a central Client object. … You would directly instantiate and interact with GenerativeModel objects.” (source) | |
google. | google. | the project's migration guide: “response = model.generate_content(...) … response = client.models.generate_content(...)” (source) | |
google. | google. | the project's migration guide: “chat = model.start_chat() … chat = client.chats.create(model='gemini-3.8-flash')” (source) | |
google. | google. | the 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. | google. | the project's migration guide: “generation_config=genai.GenerationConfig( … config=types.GenerateContentConfig(” (source) | |
google. | google. | the project's migration guide: “response = model.count_tokens( … response = client.models.count_tokens(” (source) | |
google. | google. | the project's migration guide: “response = genai.embed_content( … response = client.models.embed_content(” (source) | |
google. | google. | the project's migration guide: “file = genai.upload_file(path='a11.txt') … my_file = client.files.upload(file='a11.txt')” (source) | |
google. | google. | the project's migration guide: “for file in genai.list_files(): … for file in client.files.list():” (source) | |
google. | google. | the project's migration guide: “file = genai.get_file(name=file.name) … file = client.files.get(name=file.name)” (source) | |
google. | google. | the project's migration guide: “file = genai.delete_file(name=dummy_file.name) … response = client.files.delete(name=dummy_file.name)” (source) | |
google. | google. | the project's migration guide: “apollo_cache = caching.CachedContent.create( … apollo_cache = client.caches.create(” (source) |
No names match.