pydantic_compatibilityTier 1 · 70% confidence

ai-agents-pydantic-compatibili-keyerror-data-when-using-playwright-s-navigateback-5971e400

agent: ai_agents

When does this happen?

IF KeyError: 'data' when using Playwright's NavigateBackTool, CurrentWebPageTool, or ExtractTextTool with LangChain OpenAI tools agent due to Pydantic 2 mismatch.

How others solved it

THEN Downgrade langchain, langchain-core, langchain-community, and langchain-openai to versions before the breaking change (e.g., langchain 0.2.16, langchain-community 0.2.17, langchain-core 0.2.41, langchain-openai 0.1.25). Alternatively, add an explicit Pydantic v2 BaseModel Input class to the tool's args_schema to override the empty schema.

# Downgrade approach
pip install langchain-community<0.3 langchain<0.3
pip install langchain-core<0.3
pip install langchain-openai<0.2

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics