chore(ai): support pydantic-ai v2#9973
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pydantic-ai-slim: dependency changes (1.54.0 → 2.0.0)Comparison of declared dependency constraints between Sources: Core deps (always installed with slim)
Extra-specific mins (only if you use that extra)
|
|
If Pydantic AI is popular, then increasing the lower bound in this way will prevent users from using other packages that rely on older pydantic-ai < 2.0.0. @Light2Dark, did you consider adding support for >= 2.0 without removing support for < 2.0? |
Bump the minimum pydantic-ai version to 2.0 and drop v1 compatibility shims now that profiles are TypedDicts and model construction validates profiles eagerly. Co-authored-by: Cursor <cursoragent@cursor.com>
It's possible, and maybe we can support it for some time. However, if v2 makes more changes, we can't guarantee newer versions don't break, and we shouldn't cap it imo, a lot of bug fixes gets shipped as new models, APIs get released. It is an increase in our maintenance cost to support both. I'll see if we can support both for the time being. |
f6a1877 to
2c6089a
Compare
📝 Summary
Motivation: less bugs, capability features, better pydantic-ai support
require_vercel_ai_sdk_support,model_dumpfallbacks,AnthropicModelProfile.from_profile, explicit Anthropic temperature handling).ModelProfileas TypedDict (.get()access),Agent[object, ...]typing,FunctionToolsetwithoutNonetype param.openrouter/<vendor>/<model>slugs — bareopenrouter/gpt-4breaks under v2 because profile resolution is eager and requires the upstream vendor prefix.custom_model.📋 Pre-Review Checklist
✅ Merge Checklist
Made with Cursor