Skip to content

fix(pydantic_ai): Support pydantic-ai v2.0.0b1#6318

Draft
sentrivana wants to merge 1 commit into
toxgen/update-05-21from
fix/pydantic-ai-v2-compat
Draft

fix(pydantic_ai): Support pydantic-ai v2.0.0b1#6318
sentrivana wants to merge 1 commit into
toxgen/update-05-21from
fix/pydantic-ai-v2-compat

Conversation

@sentrivana
Copy link
Copy Markdown
Contributor

In v2, result.usage changed from a method to a property, run_stream_events now returns an async context manager, and MCPServerStdio was replaced by MCPToolset + StdioTransport. Handle both v1 and v2 APIs.

Description

Issues

Reminders

In v2, `result.usage` changed from a method to a property, `run_stream_events`
now returns an async context manager, and `MCPServerStdio` was replaced by
`MCPToolset` + `StdioTransport`. Handle both v1 and v2 APIs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 43.24s

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 15026 uncovered lines.

Files with missing lines (1)
File Patch % Lines
invoke_agent.py 0.00% ⚠️ 84 Missing

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant