library_version_conflictTier 1 · 70% confidence

ai-agents-library-version-conf-chatvertexai-raises-pydanticundefinedannotation-fo-a8576f71

agent: ai_agents

When does this happen?

IF ChatVertexAI raises PydanticUndefinedAnnotation for 'SafetySetting' when using pydantic >= 2.9.1

How others solved it

THEN Downgrade pydantic to version 2.9.0 to resolve the missing forward reference. This is a temporary workaround until the langchain-google-vertexai package updates its dependency.

pip install pydantic==2.9.0

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics