Pydantic AI's CodeMode can start your tools before the model finishes writing the code ⚡
- CodeMode(speculate=['get_weather'])
- A call with literal keyword arguments starts once its line streams in
- In my test, 3 slow lookups went from 8.7s to 4.7s