New agno version gives "google-genai" issue

so my old working deployed backend also not working because of this new version i get

[2025-08-27 22:21:11 +0000] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/agno/models/google/gemini.py", line 24, in <module>
    from google.genai.types import (
ImportError: cannot import name 'UrlContext' from 'google.genai.types' (/usr/local/lib/python3.11/site-packages/google/genai/types.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/geventlet.py", line 142, in init_process
    super().init_process()
  File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 135, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi
    self.wsgi = self.app.wsgi()
                ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
                    ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
    return self.load_wsgiapp()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
    return util.import_app(self.app_uri)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/gunicorn/util.py", line 370, in import_app
    mod = importlib.import_module(module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/app.py", line 19, in <module>
    from assistant import get_llm_os
  File "/app/assistant.py", line 11, in <module>
    from agno.models.google import Gemini
  File "/usr/local/lib/python3.11/site-packages/agno/models/google/__init__.py", line 1, in <module>
    from agno.models.google.gemini import Gemini
  File "/usr/local/lib/python3.11/site-packages/agno/models/google/gemini.py", line 43, in <module>
    raise ImportError("`google-genai` not installed. Please install it using `pip install google-genai`")
ImportError: `google-genai` not installed. Please install it using `pip install google-genai`

this error also i have another topic ill list them below

https://community.agno.com/t/how-to-assign-thinking-budget-to-gemini-models/1404

https://community.agno.com/t/how-to-assign-thinking-budget-to-gemini-models/1404

in this topic you will find the same error related to google-genai import. as im heavily depeendent on google api and modals i cant run my production or testing env. can you tell me how to download old version.

Hey @Prajwal, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.If it’s urgent, please let us know. We appreciate your patience!

Hi @Prajwal , thanks for reaching out.
Can you please confirm if you have done pip install google-genai in your project?
Also to downgrade agno version , you can run the following command pip install agno==1.8.0.
Thanks

yes i also tried to downgrade much older version but im getting this same issue. im using this for now a year i tested my older code then new code and my current development code all are getting this issue, if i get this error in development i thought i did something wrong but i wasnt able to debug then i tested my working code now that also give this error. im completely lost

i tried agno version 1.8.1 / 1.8.0 / 1.7.12 / 1.7.11 still i get that same error and when i ask llm modals about the issue it says :-

Looking at your error logs, the issue is that while google-genai is listed in your requirements.txt, there’s a compatibility problem with the agno package trying to import from it.

The error shows that agno is trying to import UrlContext from google.genai.types, but this import is failing. This suggests a version mismatch between agno and google-genai.

so i will try old version of google genai can you list the older version of google genai

(aios) PS C:\Users\prajw\Downloads\AI-OS> pip show google-genai
Name: google-genai
Version: 1.2.0
Summary: GenAI Python SDK
Home-page: https://github.com/googleapis/python-genai
Author:
Author-email: Google LLC <googleapis-packages@google.com>
License: Apache-2.0
Location: C:\Users\prajw\Downloads\AI-OS\aios\Lib\site-packages
Requires: google-auth, pydantic, requests, typing-extensions, websockets
Required-by:
(aios) PS C:\Users\prajw\Downloads\AI-OS> 

is 1.2.0 the current version ?

the issue is solved i used (google-genai==1.32.0) this version and its working.

Yes i was trying with 1.2.0 and it worked for me , must be some compatibility issue . Glad that 1.32.0 worked for you . Thanks