-
Notifications
You must be signed in to change notification settings - Fork 4
Comparing changes
Open a pull request
base repository: johntango/openai-agents-python01
base: f976349
head repository: openai/openai-agents-python
compare: 5c7c678
Commits on May 14, 2025
-
Fixed a bug for "detail" attribute in input image (openai#685)
When an input image is given as input, the code tries to access the 'detail' key, that may not be present as noted in openai#159. With this pull request, now it tries to access the key, otherwise set the value to `None`. @pakrym-oai or @rm-openai let me know if you want any changes.
Configuration menu - View commit details
-
Copy full SHA for 2c46dae - Browse repository at this point
Copy the full SHA 2c46daeView commit details -
feat: pass extra_body through to LiteLLM acompletion (openai#638)
**Purpose** Allow arbitrary `extra_body` parameters (e.g. `cached_content`) to be forwarded into the LiteLLM call. Useful for context caching in Gemini models ([docs](https://ai.google.dev/gemini-api/docs/caching?lang=python)). **Example usage** ```python import os from agents import Agent, ModelSettings from agents.extensions.models.litellm_model import LitellmModel cache_name = "cachedContents/34jopukfx5di" # previously stored context gemini_model = LitellmModel( model="gemini/gemini-1.5-flash-002", api_key=os.getenv("GOOGLE_API_KEY") ) agent = Agent( name="Cached Gemini Agent", model=gemini_model, model_settings=ModelSettings( extra_body={"cached_content": cache_name} ) )
Configuration menu - View commit details
-
Copy full SHA for 1994f9d - Browse repository at this point
Copy the full SHA 1994f9dView commit details -
Update search_agent.py (openai#677)
Added missing word "be" in prompt instructions. This is unlikely to change the agent functionality in most cases, but optimal clarity in prompt language is a best practice.
Configuration menu - View commit details
-
Copy full SHA for 02b6e70 - Browse repository at this point
Copy the full SHA 02b6e70View commit details -
feat: Streamable HTTP support (openai#643)
Co-authored-by: aagarwal25 <akshit_agarwal@intuit.com>
Configuration menu - View commit details
-
Copy full SHA for 1847008 - Browse repository at this point
Copy the full SHA 1847008View commit details
Commits on May 15, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 5fe096d - Browse repository at this point
Copy the full SHA 5fe096dView commit details
Commits on May 18, 2025
-
Adding an AGENTS.md file for Codex use
Configuration menu - View commit details
-
Copy full SHA for c282324 - Browse repository at this point
Copy the full SHA c282324View commit details -
Added mcp 'instructions' attribute to the server (openai#706)
Added the `instructions` attribute to the MCP servers to solve openai#704 . Let me know if you want to add an example to the documentation.
Configuration menu - View commit details
-
Copy full SHA for 003cbfe - Browse repository at this point
Copy the full SHA 003cbfeView commit details
Commits on May 19, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 428c9a6 - Browse repository at this point
Copy the full SHA 428c9a6View commit details
Commits on May 20, 2025
-
Dev/add usage details to Usage class (openai#726)
PR to enhance the `Usage` object and related logic, to support more granular token accounting, matching the details available in the [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses) . Specifically, it: - Adds `input_tokens_details` and `output_tokens_details` fields to the `Usage` dataclass, storing detailed token breakdowns (e.g., `cached_tokens`, `reasoning_tokens`). - Flows this change through - Updates and extends tests to match - Adds a test for the Usage.add method ### Motivation - Aligns the SDK’s usage with the latest OpenAI responses API Usage object - Supports downstream use cases that require fine-grained token usage data (e.g., billing, analytics, optimization) requested by startups --------- Co-authored-by: Wulfie Bain <wulfie@openai.com>
Configuration menu - View commit details
-
Copy full SHA for 466b44d - Browse repository at this point
Copy the full SHA 466b44dView commit details
Commits on May 21, 2025
-
Upgrade openAI sdk version (openai#730)
--- [//]: # (BEGIN SAPLING FOOTER) * openai#732 * openai#731 * __->__ openai#730
Configuration menu - View commit details
-
Copy full SHA for ce2e2a4 - Browse repository at this point
Copy the full SHA ce2e2a4View commit details -
Hosted MCP support (openai#731)
--- [//]: # (BEGIN SAPLING FOOTER) * openai#732 * __->__ openai#731
Configuration menu - View commit details
-
Copy full SHA for 9fa5c39 - Browse repository at this point
Copy the full SHA 9fa5c39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 079764f - Browse repository at this point
Copy the full SHA 079764fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1992be3 - Browse repository at this point
Copy the full SHA 1992be3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1364f44 - Browse repository at this point
Copy the full SHA 1364f44View commit details
Commits on May 23, 2025
-
Fix visualization recursion with cycle detection (openai#737)
## Summary - avoid infinite recursion in visualization by tracking visited agents - test cycle detection in graph utility ## Testing - `make mypy` - `make tests` Resolves openai#668
Configuration menu - View commit details
-
Copy full SHA for db462e3 - Browse repository at this point
Copy the full SHA db462e3View commit details -
Update MCP and tool docs (openai#736)
## Summary - mention MCPServerStreamableHttp in MCP server docs - document CodeInterpreterTool, HostedMCPTool, ImageGenerationTool and LocalShellTool - update Japanese translations
Configuration menu - View commit details
-
Copy full SHA for a96108e - Browse repository at this point
Copy the full SHA a96108eView commit details -
Fix Gemini API content filter handling (openai#746)
## Summary - avoid AttributeError when Gemini API returns `None` for chat message - return empty output if message is filtered - add regression test ## Testing - `make format` - `make lint` - `make mypy` - `make tests` Towards openai#744
Configuration menu - View commit details
-
Copy full SHA for 6e078bf - Browse repository at this point
Copy the full SHA 6e078bfView commit details
Commits on May 29, 2025
-
Add Portkey AI as a tracing provider (openai#785)
This PR adds Portkey AI as a tracing provider. Portkey helps you take your OpenAI agents from prototype to production. Portkey turns your experimental OpenAI Agents into production-ready systems by providing: - Complete observability of every agent step, tool use, and interaction - Built-in reliability with fallbacks, retries, and load balancing - Cost tracking and optimization to manage your AI spend - Access to 1600+ LLMs through a single integration - Guardrails to keep agent behavior safe and compliant - Version-controlled prompts for consistent agent performance Towards openai#786
Configuration menu - View commit details
-
Copy full SHA for d46e2ec - Browse repository at this point
Copy the full SHA d46e2ecView commit details -
Added RunErrorDetails object for MaxTurnsExceeded exception (openai#743)
### Summary Introduced the `RunErrorDetails` object to get partial results from a run interrupted by `MaxTurnsExceeded` exception. In this proposal the `RunErrorDetails` object contains all the fields from `RunResult` with `final_output` set to `None` and `output_guardrail_results` set to an empty list. We can decide to return less information. @rm-openai At the moment the exception doesn't return the `RunErrorDetails` object for the streaming mode. Do you have any suggestions on how to deal with it? In the `_check_errors` function of `agents/result.py` file. ### Test plan I have not implemented any tests currently, but if needed I can implement a basic test to retrieve partial data. ### Issue number This PR is an attempt to solve issue openai#719 ### Checks - [✅ ] I've added new tests (if relevant) - [ ] I've added/updated the relevant documentation - [ ✅] I've run `make lint` and `make format` - [ ✅] I've made sure tests pass
Configuration menu - View commit details
-
Copy full SHA for 7196862 - Browse repository at this point
Copy the full SHA 7196862View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47fa8e8 - Browse repository at this point
Copy the full SHA 47fa8e8View commit details
Commits on May 30, 2025
-
Small fix for litellm model (openai#789)
Small fix: Removing `import litellm.types` as its outside the try except block for importing litellm so the import error message isn't displayed, and the line actually isn't needed. I was reproducing a GitHub issue and came across this in the process.
Configuration menu - View commit details
-
Copy full SHA for b699d9a - Browse repository at this point
Copy the full SHA b699d9aView commit details -
Fix typo in assertion message for handoff function (openai#780)
### Overview This PR fixes a typo in the assert statement within the `handoff` function in `handoffs.py`, changing `'on_input'` to `'on_handoff`' for accuracy and clarity. ### Changes - Corrected the word “on_input” to “on_handoff” in the docstring. ### Motivation Clear and correct documentation improves code readability and reduces confusion for users and contributors. ### Checklist - [x] I have reviewed the docstring after making the change. - [x] No functionality is affected. - [x] The change follows the repository’s contribution guidelines.
Configuration menu - View commit details
-
Copy full SHA for 16fb29c - Browse repository at this point
Copy the full SHA 16fb29cView commit details -
Fix typo: Replace 'two' with 'three' in /docs/mcp.md (openai#757)
The documentation in `docs/mcp.md` listed three server types (stdio, HTTP over SSE, Streamable HTTP) but incorrectly stated "two kinds of servers" in the heading. This PR fixes the numerical discrepancy. **Changes:** - Modified from "two kinds of servers" to "three kinds of servers". - File: `docs/mcp.md` (line 11).
Configuration menu - View commit details
-
Copy full SHA for 0a28d71 - Browse repository at this point
Copy the full SHA 0a28d71View commit details -
Update input_guardrails.py (openai#774)
Changed the function comment as input_guardrails only deals with input messages
Configuration menu - View commit details
-
Copy full SHA for ad80f78 - Browse repository at this point
Copy the full SHA ad80f78View commit details -
docs: fix typo in docstring for is_strict_json_schema method (openai#775
) ### Overview This PR fixes a small typo in the docstring of the `is_strict_json_schema` abstract method of the `AgentOutputSchemaBase` class in `agent_output.py`. ### Changes - Corrected the word “valis” to “valid” in the docstring. ### Motivation Clear and correct documentation improves code readability and reduces confusion for users and contributors. ### Checklist - [x] I have reviewed the docstring after making the change. - [x] No functionality is affected. - [x] The change follows the repository’s contribution guidelines.
Configuration menu - View commit details
-
Copy full SHA for 6438350 - Browse repository at this point
Copy the full SHA 6438350View commit details -
Add comment to handoff_occured misspelling (openai#792)
People keep trying to fix this, but its a breaking change.
Configuration menu - View commit details
-
Copy full SHA for cfe9099 - Browse repository at this point
Copy the full SHA cfe9099View commit details
Commits on Jun 2, 2025
-
Fix openai#777 by handling MCPCall events in RunImpl (openai#799)
This pull request resolves openai#777; If you think we should introduce a new item type for MCP call output, please let me know. As other hosted tools use this event, I believe using the same should be good to go tho.
Configuration menu - View commit details
-
Copy full SHA for 3e7b286 - Browse repository at this point
Copy the full SHA 3e7b286View commit details -
Ensure item.model_dump only contains JSON serializable types (openai#801
Configuration menu - View commit details
-
Copy full SHA for 775d3e2 - Browse repository at this point
Copy the full SHA 775d3e2View commit details -
Don't cache agent tools during a run (openai#803)
### Summary: Towards openai#767. We were caching the list of tools for an agent, so if you did `agent.tools.append(...)` from a tool call, the next call to the model wouldn't include the new tool. THis is a bug. ### Test Plan: Unit tests. Note that now MCP tools are listed each time the agent runs (users can still cache the `list_tools` however).
Configuration menu - View commit details
-
Copy full SHA for d4c7a23 - Browse repository at this point
Copy the full SHA d4c7a23View commit details -
Only start tracing worker thread on first span/trace (openai#804)
Closes openai#796. Shouldn't start a busy waiting thread if there aren't any traces. Test plan ``` import threading assert threading.active_count() == 1 import agents assert threading.active_count() == 1 ```
Configuration menu - View commit details
-
Copy full SHA for 995af4d - Browse repository at this point
Copy the full SHA 995af4dView commit details
Commits on Jun 3, 2025
-
Add is_enabled to FunctionTool (openai#808)
### Summary: Allows a user to do `function_tool(is_enabled=<some_callable>)`; the callable is called when the agent runs. This allows you to dynamically enable/disable a tool based on the context/env. The meta-goal is to allow `Agent` to be effectively immutable. That enables some nice things down the line, and this allows you to dynamically modify the tools list without mutating the agent. ### Test Plan: Unit tests
Configuration menu - View commit details
-
Copy full SHA for 4046fcb - Browse repository at this point
Copy the full SHA 4046fcbView commit details
Commits on Jun 4, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 204bec1 - Browse repository at this point
Copy the full SHA 204bec1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a529e6 - Browse repository at this point
Copy the full SHA 4a529e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05db7a6 - Browse repository at this point
Copy the full SHA 05db7a6View commit details -
Add release documentation (openai#814)
## Summary - describe semantic versioning and release steps - add release page to documentation nav ## Testing - `make format` - `make lint` - `make mypy` - `make tests` - `make build-docs` ------ https://chatgpt.com/codex/tasks/task_i_68409d25afdc83218ad362d10c8a80a1
Configuration menu - View commit details
-
Copy full SHA for 5c7c678 - Browse repository at this point
Copy the full SHA 5c7c678View commit details
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.