Skip to content

Consider first class support for Pydantic AI #169

@shea-parkes

Description

@shea-parkes

I fully understand why y'all are developing chatlas. It's nice to have a posit-y GenAI middleware in Python that mostly mirrors y'all's ellmer R package.

And I appreciate the tasteful coupling y'all have done between chatlas and shinychat.

But I just felt obligated to open this issue to at least raise the idea of leaning into Pydantic AI instead. Either in addition to chatlas or as a full replacement.

For the simplest use cases, it is pretty easy to swap pydantic_ai for chatlas and still leverage shinychat. But y'all have put in the (tasteful) bindings in here on chatlas.ContentToolResult. So anyone wishing to adopt pydantic_ai instead of chatlas will need to shim their own means of displaying tool calls. It might be nice if y'all centrally did the work of displaying pydantic_ai tool calls with shinychat.

Some potential reasons to consider this:

  • Pydantic AI is getting a lot of investment and developer focus. Might as well piggy back that.
    • They're staying ahead of chatlas on a pile of things like A2A.
  • Pydantic AI has much tighter bindings to FastMCP. Chatlas does obviously work with FastMCP... but not to the same extent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions