github pydantic/pydantic-ai v2.49.0
v2.49.0 (2026-09-23)

5 hours ago

What's Changed

🚀 Features

  • Add GitHubCopilotOAuthFlow for device authorization by @Kludex in #8618
  • Add BoolCriteria to say what a bool field's yes and no mean, and let a True/False Enum do the same by @DouweM in #8586
  • Use what the user wrote about None as the "none of these" option in TypeSafeModel by @DouweM in #8684
  • Offer whole numbers that are not a rubric as a Choice in TypeSafeModel by @DouweM in #8686
  • Add RealtimeSession.wait_for_reply() by @DouweM in #8514

🐛 Bug Fixes

  • Keep all streamed OpenAIChatModel logprobs in provider_details['logprobs'] by @adtyavrdhn in #8653
  • Allow gpt-6-sol, gpt-6-luna, and gpt-6-astra on Bedrock Converse by @sevakva in #8656
  • fix: preserve fanned producer contributions in graph joins by @FIITAY in #8385
  • Surface @GraphBuilder.stream node errors in-context during graph.iter() by @pydanty in #8304
  • Forward Cloud Storage gs:// references as fileData in GoogleImageGenerationModel on Vertex AI by @dorukgezici in #8225
  • Preserve output tool names and descriptions for Annotated model types by @ikriv in #8608
  • Type None in a list of output types as | None so output_type=[Foo, Bar, None] passes pyright by @DouweM in #8641
  • Fix google_proactive_audio, which no Gemini Live session could ever connect with by @DouweM in #8394
  • Drop temperature and top_p for OpenAI GPT-5.6 and GPT-6 on Bedrock Converse instead of failing with a 400 by @kimnamu in #8668
  • Let a field's default apply when TypeSafeModel answers "None of these" for an optional field by @DouweM in #8685
  • Surface realtime receive-side failures to every consumer shape, and end send_audio(iterable) cleanly on close by @DouweM in #8138
  • Keep Annotated metadata on the members of an X | Y output_type by @DouweM in #8687
  • Keep an uninstrumented delegate's usage off its caller's agent run span by @DouweM in #8689
  • Let a nested model's default apply when TypeSafeModel answers "None of these" for every field under it by @DouweM in #8697
  • Accept Annotated, Literal and union output_types as PEP 747 TypeForms, and bump pyright to 1.1.414 by @DouweM in #8690
  • Make RunContext.tracer, trace_include_content and instrumentation_version follow an explicit Instrumentation capability by @DouweM in #8706
  • Send deferred tools with native tool search on OpenAICodexModel instead of failing with a 400 by @aweis89 in #8693

New Contributors

Full Changelog: v2.48.0...v2.49.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.