fix(gen): downgrade langchain-google-genai - #122
Merged
Merged
Conversation
langchain-google-genai version 4.3.7 introduced a bug. Keep the version below that until it's fixed.
a buggy dependency update was merged because integration tests were disabled in PR. Hence the integration tests are re-enabled.
mwien
approved these changes
Sep 8, 2026
friedrichwilken
added a commit
to friedrichwilken/ai-sdk-python
that referenced
this pull request
Sep 24, 2026
The SDK's ChatGoogleGenerativeAI shadows the upstream `validate_environment` validator to inject the AI Core client. Since langchain-google-genai 4.3.7 that upstream validator also registers the client with a `_ClientCleanup` object which the `async_client` property and `aclose()` dereference, so every async call failed with AttributeError. Register the injected client in our own `_initialize_client` validator instead, add a unit test covering `async_client` and `aclose()`, lift the `<4.3.7` pin introduced as a stopgap in SAP#122/SAP#129, and update the stale pin in README_sphynx.md. Refs SAP#152
friedrichwilken
added a commit
to friedrichwilken/ai-sdk-python
that referenced
this pull request
Sep 24, 2026
The SDK's ChatGoogleGenerativeAI shadows the upstream `validate_environment` validator to inject the AI Core client. Since langchain-google-genai 4.3.7 that upstream validator also registers the client with a `_ClientCleanup` object which the `async_client` property and `aclose()` dereference, so every async call failed with AttributeError. Register the injected client in a validator of our own on the chat class, add a unit test covering `async_client` and `aclose()`, lift the `<4.3.7` pin introduced as a stopgap in SAP#122/SAP#129, and update the stale pin in README_sphynx.md. Refs SAP#152
alpkom
pushed a commit
that referenced
this pull request
Sep 25, 2026
…165) The SDK's ChatGoogleGenerativeAI shadows the upstream `validate_environment` validator to inject the AI Core client. Since langchain-google-genai 4.3.7 that upstream validator also registers the client with a `_ClientCleanup` object which the `async_client` property and `aclose()` dereference, so every async call failed with AttributeError. Register the injected client in a validator of our own on the chat class, add a unit test covering `async_client` and `aclose()`, lift the `<4.3.7` pin introduced as a stopgap in #122/#129, and update the stale pin in README_sphynx.md. Refs #152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Downgrade langchain-google-genai
What this PR does and why it is needed
langchain-google-genai version 4.3.7 introduced a bug.
Keep the version below that until it's fixed.