- Notifications
You must be signed in to change notification settings - Fork2.8k
Releases: openai/openai-agents-python
v0.5.0
92fcf51Key Changes
This version doesn’t introduce any visible breaking changes, but it includes new features and a few significant updates under the hood:
- Added support for
RealtimeRunnerto handleSIP protocol connections - Significantly revised the internal logic of
Runner#run_syncfor Python 3.14 compatibility
What's Changed
- docs:#1999 adjust the realtime module code comment by@seratch in#2000
- docs: improve typing in lifecycle hook example code by@seratch in#2002
- Add Python 3.14 to the supported versions by@seratch in#1961
- feat:#1760 Add SIP support for realtime agent runner by@seratch in#1993
- fix: improve run_sync's python 3.14 compatibility by@seratch in#2006
- feat:#1994 Add a list of per-request usage data to Usage by@habema in#1995
- fix: use ResponseOutputRefusal for refusal content part added event by@mshsheikh in#2013
- docs: clarify on_tool_start and on_tool_end hooks for local tools only by@ihower in#2037
- fix:#2038 openai==2.7.0 compatibility by@seratch in#2039
- fix(usage): Normalize None token details on Usage initialization by@codefromthecrypt in#2034
- fix(realtime): include tool arguments in RealtimeToolStart/RealtimeToolEnd events by@ruskaruma in#2028
- Add Dapr session storage option by@filintod in#1937
- v0.5.0 by@seratch in#2015
New Contributors
- @codefromthecrypt made their first contribution in#2034
Full Changelog:v0.4.2...v0.5.0
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.4.2
a30c32eWhat's Changed
- fix:#1764 enable developers to pass custom reasoning effort for LiteLLM providers by@seratch in#1972
- ci: make format required (devs should run
make formatbefore committing) by@filintod in#1979 - Fix: Add empty checks for reasoning content arrays in stream handler by@gn00295120 in#1982
- fix:#1942 Enable async tool calling in Realtime sessions by@seratch in#1984
- Fix#1559: Handle empty choices array in LiteLLM model (same as PR#935) by@gn00295120@ihower in#1981
- v0.4.2 by@seratch in#1988
Full Changelog:v0.4.1...v0.4.2
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.4.1
fdcf6d3What's Changed
- Add breaking change notes in docs by@seratch in#1894
- Update all translated document pages by @github-actions[bot] in#1922
- docs: add missing items in side navi bar (ja, zh) by@seratch in#1932
- Update all translated document pages by @github-actions[bot] in#1933
- Fix: call
_fix_tool_message_orderingfor all Anthropic models by@habema in#1936 - make format on main branch returns diff on some files by@filintod in#1947
- fix: prevent ValueError when audio buffer is empty in STT (fixes#821) by@gn00295120 in#1934
- fix: add missing mcp_approval_response event name (fixes#1020) by@gn00295120 in#1931
- fix: Remove trailing commas causing tuple assignment in response cancellation by@gn00295120 in#1952
- fix: await cancelled websocket task to prevent resource leak by@gn00295120 in#1955
- fix: prevent race condition in listener iteration by@gn00295120 in#1956
- Tweak CI test job settings by@seratch in#1962
- Remove unused ui.py example file by@ihower in#1967
- fix:#1907 guardrails w/ turn_detection.interrupt_response: true by@seratch in#1968
- Fix#1846 Litellm: fails with function name for tool_choice parameter w/ streaming enabled by@ihower in#1971
- Fix streaming trace end before guardrails complete by@zbirenbaum in#1921
- Add engine accessor to SQLAlchemySession for closing it when it's created from a URL by@gn00295120 in#1960
- Make Tool Output dict conversion stricter to improve backward compatibility by@ihower in#1965
- version 0.4.1 by@seratch in#1963
New Contributors
- @filintod made their first contribution in#1947
- @gn00295120 made their first contribution in#1934
- @zbirenbaum made their first contribution in#1921
Full Changelog:v0.4.0...v0.4.1
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.4.0
da32045Key Changes
In this version,openai package v1.x versions are no longer supported. Please use openai v2.x along with this SDK.
What's Changed
- fix: making input_file's filename optional in code for supporting non-OpenAI models by@ant31 in#1839
- feat:#1829 add httpx_client_factory to MCPServerStreamableHttp initialization options by@jjcampana in#1833
- fix:#1789 Fix multi-turn handling for conversation_id and previous_response_id: only send new items by@ihower in#1827
- Update all translated document pages by @github-actions[bot] in#1842
- docs: improve formatting consistency in tools documentation by@AbdulSamad94 in#1856
- Update all translated document pages by @github-actions[bot] in#1858
- docs: add documentation for extension feature EncryptedSession by@maxmekiska in#1872
- Update all translated document pages by @github-actions[bot] in#1873
- Fix: Correct streaming order for ReasoningItem and RawResponsesStreamEvent events by@ihower in#1869
- fix: adjust realtime handoff import by@mcbortolozzo in#1861
- Migrate openai from 1.x to 2.2.0 by@seratch in#1874
- fix:#1840 roll back session changes when Guardrail tripwire is triggered by@seratch in#1843
- docs: Add Chinese translation for documents by@SepineTam in#1878
- docs: add ToolContext section for advanced tool metadata by@MuhammadSaqib786 in#1868
- Fix: Exclude unset fields in OpenAIConversationsSession.get_items() by@ihower in#1883
- Update all translated document pages by @github-actions[bot] in#1891
- Feat: Expose MCP message handler configuration by@freeznet in#1795
- fix: handle omit type in
_remove_not_given()for litellm model by@HareeshBahuleyan in#1893 - fix: convert oneOf to anyOf in strict schema for OpenAI compatibility by@ruskaruma in#1884
- Fix Local shell tool: return tool output to the LLM by@ihower in#1855
- Image, file output types for functions by@rm-openai in#1898
- Update all translated document pages by @github-actions[bot] in#1910
- Add graceful cancel mode for streaming runs by@habema in#1896
- Document
AdvancedSQLiteSessionand refactor session docs by@habema in#1791 - Update all translated document pages by @github-actions[bot] in#1913
- Fixes realtime example app stability issues by@thli-openai in#1905
- fix:#1900 fix a bug where SQLAlchemySession could return items in an invalid order by@seratch in#1917
- fix:#1916 openai_chatcompletions.Converter.extract_all_content does not support input_audio type items by@seratch in#1918
- v0.4.0 by@seratch in#1919
New Contributors
- @jjcampana made their first contribution in#1833
- @mcbortolozzo made their first contribution in#1861
- @SepineTam made their first contribution in#1878
- @MuhammadSaqib786 made their first contribution in#1868
- @freeznet made their first contribution in#1795
- @HareeshBahuleyan made their first contribution in#1893
- @ruskaruma made their first contribution in#1884
- @thli-openai made their first contribution in#1905
Full Changelog:v0.3.3...v0.4.0
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.3.3
a450c21What's Changed
- Feat: Add AdvancedSQLiteSession with conversation branching & usage tracking by@habema in#1662
- Fix extended thinking bug by reordering tool messages by@habema in#1798
- feat: add Redis session support for scalable distributed memory by@damianoneill in#1785
- Add agent hooks to lifecycle_example by@seratch in#1809
- Update models in docs by@seratch in#1810
- Update all translated document pages by @github-actions[bot] in#1811
- Fix code snippet error in MCP docs by@seratch in#1812
- Update all translated document pages by @github-actions[bot] in#1813
- Adding tool input and output guardrails by@steven10a in#1792
- Korean translation by@tylerryu-oai in#1816
- Update all translated document pages by @github-actions[bot] in#1818
- docs: update examples.md to match current examples directory structure by@AbdulSamad94 in#1819
- Update all translated document pages by @github-actions[bot] in#1820
- Add guidelines for translation script contributors by@seratch in#1821
- Add missing parens in docs links by@tcbegley in#1825
- Update all translated document pages by @github-actions[bot] in#1826
- docs: fix link errors in sessions document page by@seratch in#1835
- Update all translated document pages by @github-actions[bot] in#1836
- fix:#1834 minor error in docstring by@seratch in#1837
- v0.3.3 by@rm-openai in#1838
New Contributors
- @damianoneill made their first contribution in#1785
- @steven10a made their first contribution in#1792
- @tylerryu-oai made their first contribution in#1816
- @AbdulSamad94 made their first contribution in#1819
- @tcbegley made their first contribution in#1825
Full Changelog:v0.3.2...v0.3.3
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.3.2
e87552aWhat's Changed
- fix#1750 better error message when passing AgentHooks to Runner by@seratch in#1752
- Enhance function tool schemas with Annotated types by@MuhammadHassaanArain in#1777
- fix(chatcmpl): preserve all LiteLLM thinking-block signatures in converter by@serialx in#1779
- Update dynamic_system_prompt.py example to use dataclass for simiplicity by@SheikhMuhammadHamza-HS in#1774
- fix(chatcmpl): preserve text content when adding Anthropic thinking blocks to tool calls by@serialx in#1784
- fix:#556 add llms.txt / llms-full.txt by@seratch in#1782
- Add tool call arguments in ToolContext for RunHooks by@ihower in#1765
- Allow headers override instead of just ua by@jiwon-oai in#1787
- v0.3.2 by@rm-openai in#1793
New Contributors
- @SheikhMuhammadHamza-HS made their first contribution in#1774
Full Changelog:v0.3.1...v0.3.2
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.3.1
a4c125eWhat's Changed
- Update all translated document pages by @github-actions[bot] in#1720
- Fix missing imports in MCP documentation examples by@MariumAfzal2703 in#1718
- Update all translated document pages by @github-actions[bot] in#1721
- fix(streaming): push processed_response.new_items (including HandoffCallItem) to event_queue by@Wujiaxuan007 in#1703
- fix:#1704 Preserve thinking blocks in Anthropic conversations with tool calls by@habema in#1706
- Wait for input guardrails in streaming runs by@rm-openai in#1730
- docs: add docstring for parameter session in run, run_sync and run_streamed functions by@LokinDev in#1739
- docs:#1722 LiteLLM usage tracking by@seratch in#1743
- Update all translated document pages by @github-actions[bot] in#1747
- docs: Fix tracing setup documentation by@abdul-kabir-jawed in#1734
- Fixed Race Condition in RunResultStreaming.stream_events() Method by@AnkanMisra in#1745
- feat: Support Anthropic extended thinking and interleaved thinking by@serialx in#1744
- feat(realtime):#1560 add input audio noise reduction by @notV3NOM in#1749
- feat(voice)!: migrate STT streaming to match GA Realtime API by @notV3NOM in#1759
- Add encryption support using cryptography to Sessions implementation by@maxmekiska in#1674
- docs: reformat run module docstrings to Google style for better mkdocstrings rendering by@MuhammedSuhaib in#1740
- fix:#1668 Handoffs with gpt-5* model + store=False + remove_all_tools fails due to 404 error response by@ihower in#1757
- Add warning for agent names that transform into conflicting function names by@ihower in#1758
- feat:#1731 Enable developers to use Annotated types for function tool param description by@seratch in#1753
- feat: add more options to Agent#as_tool function by@seratch in#1751
- Export
user_agent_overridecontextmanager by@jiwon-oai in#1768 - v0.3.1 by@rm-openai in#1773
New Contributors
- @MariumAfzal2703 made their first contribution in#1718
- @Wujiaxuan007 made their first contribution in#1703
- @LokinDev made their first contribution in#1739
- @AnkanMisra made their first contribution in#1745
- @serialx made their first contribution in#1744
- @notV3NOM made their first contribution in#1749
- @maxmekiska made their first contribution in#1674
- @jiwon-oai made their first contribution in#1768
Full Changelog:v0.3.0...v0.3.1
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.3.0
e291b10Key changes
- New realtime updates based on the GA Realtime API
What's Changed
- Use head commit in docs workflow PR body by@seratch in#1657
- Code snippet error in "Running Agents" document by@iliailmer in#1665
- Update all translated document pages by @github-actions[bot] in#1667
- fix(voice/stt): accept conversation.item.input_audio_transcription.completed (keep legacy alias) by@dudududukim in#1537
- Fix instructions not being applied by@michieldwitte in#1688
- Fix a bug where the default behavior of loading the debug flag differs from the documentation by@seratch in#1682
- fix:#1661 Preserve realtime session voice settings when updating agents by@seratch in#1684
- Update MCP server tool documentation to cover all available options by@seratch in#1685
- Fix a minor bug in#1601 by@seratch in#1669
- Update all translated document pages by @github-actions[bot] in#1691
- docs: fix typo in connectors.py by@hxreborn in#1693
- docs:#1686 update the document to mention the end of voice stream by@majklost in#1687
- Save session on turn rather than at final response by@spokeydokeys in#1550
- Prevent preamble messages from being treated as final output when tool calls are pending by@ihower in#1689
- Delete an unused local var (I forgot deleting in#1587) by@seratch in#1696
- Fix session history duplication after PR#1550 by@habema in#1700
- Fix CI failure in
make old_version_testsby@habema in#1710 - Allow to pass both session and input list by@DanieleMorotti in#1298
- Update Realtime Agent documents (ref#1646) by@seratch in#1695
- feat:#1614 gpt-realtime migration (Realtime API GA) by@seratch in#1646
- Fix a bug where debug logging fails with Iterable objects by@seratch in#1683
- v0.3.0 by@rm-openai in#1717
New Contributors
- @iliailmer made their first contribution in#1665
- @dudududukim made their first contribution in#1537
- @hxreborn made their first contribution in#1693
- @majklost made their first contribution in#1687
- @spokeydokeys made their first contribution in#1550
- @ihower made their first contribution in#1689
Full Changelog:v0.2.11...v0.3.0
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.2.11
f612516What's Changed
- docs: Fix#1625 code snippet error by@aiwithwhitehat in#1626
- Update all translated document pages by @github-actions[bot] in#1627
- fixed_typo: wiht -> with by@MuhammedSuhaib in#1624
- Update all translated document pages by @github-actions[bot] in#1628
- fix(run): fire on_llm_start / on_llm_end in Runner.run() for streaming & non-streaming (aligns with docs) by@erikanstine in#1619
- Fix#1629 Empty tool call arguments in streaming events by@habema in#1636
- Docs: Fix confusing session usage docs by@habema in#1637
- Update all translated document pages by @github-actions[bot] in#1643
- fix:#1594 support Azure OpenAI Realtime connection using headers by@seratch in#1633
- fix: Fix#1640 openai package breaking changes by@seratch in#1641
- Fix an error with make mypy on local machine by@seratch in#1642
- Improve translation prompt guidance by@seratch in#1647
- Update all translated document pages by @github-actions[bot] in#1648
- Document OpenAI Conversations session option by@seratch in#1649
- docs: Add more clarity on multi-agent design patterns by@seratch in#1650
- Update all translated document pages by @github-actions[bot] in#1654
- v0.2.11 by@rm-openai in#1655
New Contributors
- @aiwithwhitehat made their first contribution in#1626
- @MuhammedSuhaib made their first contribution in#1624
- @erikanstine made their first contribution in#1619
Full Changelog:v0.2.10...v0.2.11
Assets2
Uh oh!
There was an error while loading.Please reload this page.
v0.2.10
de9d1fdWhat's Changed
- Performance: only create the OpenAIRealtimeServerEvent TypeAdapter once by@michieldwitte in#1548
- Realtime: fix typecheck error by@rm-openai in#1558
- Docs: Add SQLAlchemy-powered sessions by@habema in#1549
- Update all translated document pages by @github-actions[bot] in#1561
- Add tests for Agent default model settings when using GPT-5 by@seratch in#1562
- Re:#1534 Update models document page to cover gpt-5 use cases by@seratch in#1535
- Update all translated document pages by @github-actions[bot] in#1563
- Docs: Improvements for SQLAlchemy Sessions by@habema in#1576
- Update all translated document pages by @github-actions[bot] in#1577
- Fix: Emit tool_called events immediately in streaming runs by@habema in#1300
- Feature: Make trace_include_sensitive_data configurable via environment variable by@Kunmeer-SyedMohamedHyder in#1192
- Docs: Improve example for custom Session class implementation. by@luke-wriglesworth in#1582
- Update all translated document pages by @github-actions[bot] in#1589
- Remove CI job we no longer actively use by@seratch in#1590
- Upgrade underlying oepnai package to the latest version by@seratch in#1599
- Fix#1585 supporting connectors by@seratch in#1600
- Fix#1592 Web search tool updates by@seratch in#1601
- Handle LiteLLM's json_tool_call addition for structured outputs by@seratch in#1602
- Add reasoning text delta event support for gpt-oss models by@seratch in#1586
- Fix#1564 Add conversations API support by@seratch in#1587
- fix: copy extra_kwargs to prevent litellm from polluting metadata by@zhowzeng in#1610
- v0.2.10 by@rm-openai in#1607
New Contributors
- @michieldwitte made their first contribution in#1548
- @luke-wriglesworth made their first contribution in#1582
- @zhowzeng made their first contribution in#1610
Full Changelog:v0.2.9...v0.2.10
Assets2
Uh oh!
There was an error while loading.Please reload this page.