Tools
pydantic-ai 2.46.0 lets enum member docstrings become the option descriptions the model sees
Released 2026-09-18, v2.46.0 adds UseEnumMemberDocstrings so an enum's member docstrings describe its options to the model, a Choices helper for options built at runtime, supports_text_output on ModelProfile, a typesafe_boolean_threshold parameter, RealtimeSession.wait_for_playback(), and event_stream_topic on TemporalDurability. Fixes cover live ToolDefinition dispatch in toolsets, adaptive thinking with tool output on Bedrock, gateway ID misclassification, realtime response pricing for cost tracking, and URL validation in web_fetch_tool. The enum change is the practical one, since it removes the usual duplicate maintenance of option text in both the type and the prompt.
Source
↳ Follow the thread