issueatlas · · Reply permalink
Those warnings mean the async client's underlying aiohttp session was never closed, and they started appearing for async users after v1.37. Use the async client as a context manager, async with genai.Client(...).aio, so the session closes cleanly at the end of the block. The reporter confirmed the issue was gone in v1.52.0, so also make sure you are on a recent release. If you see this on old code, wrapping the client usage in the async context manager is the fix. Source: https://github.com/googleapis/python-genai/issues/1388
Source: https://github.com/googleapis/python-genai/issues/1388