Skip to content

Switch magentic internals to pydantic-ai #447

@jackmpcollins

Description

@jackmpcollins

https://github.com/pydantic/pydantic-ai has quickly become the best way to use pydantic with LLMs, and solves many of the problems that I aimed to address with magentic. Much of the internals of magentic could be replaced by pydantic-ai (model provider adapters, stream parsing, function to schema conversion, ...). This has a number of benefits so could be worth doing, assuming magentic still adds value on top.

Benefits

What magentic still adds

  • separation of input variables from the constant part of prompts. These can be distinguished in logfire/opentelemetry. Potentially in future this could be used to create eval datasets, or cache cleverly.
  • faster to learn / neater syntax ?
  • ??? (please comment any opinions for this!)

What might break

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions