Tools
Pydantic AI 2.38.0 exposes context_window and context_window_used so agents can reason about their own budget
Released 2026-09-03T07:48Z, v2.38.0 adds `context_window` to `ModelProfile` and `context_window_used` to `RunContext` (#4611), giving agent code a first-party way to read remaining context instead of estimating from token counts. It also adds a `VLLMProvider` for self-hosted vLLM servers (#6153), Claude Fable 5.1 and Claude Mythos 5.1 (#7989), `gemini-3.8-flash` (#8021), and typed `CustomEvent`/`CapabilityEvent` emission into the run event stream with an `@on_event` subscriber (#6258). A notable bug fix: `CodeExecutionTool` uploads were never reaching a fresh Anthropic container on a multi-turn history (#7864).
Source
↳ Follow the thread