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
- expands supported LLM providers, with even more getting added over time, and keeps these up-to-date for us
- adds or makes easier support for many features
- improved integration with logfire/opentelemetry
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
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
What might break