Commit graph

21 commits

Author SHA1 Message Date
Ddper
8ded8a9981
add overwrite mechanism for stream_options (#465)
fix issue https://github.com/openai/openai-agents-python/issues/442

below is an example to overwrite include_usage


```
    result = Runner.run_streamed(
        agent,
        "Write a haiku about recursion in programming.",
        run_config=RunConfig(
            model_provider=CUSTOM_MODEL_PROVIDER,
            model_settings=ModelSettings(include_usage=True)
        ),
    )
```
2025-04-10 16:54:00 -04:00
Rohan Mehta
2bcc864b81
Don't send the "store" param unless its hitting OpenAI (#455)
Summary: See #443. Causes issues with Gemini.

Test Plan: Tests. Also tested with Gemini to ensure it works.
2025-04-07 19:13:08 -04:00
Suveen Ellawela
07a627e8eb
Add reasoning parameter to ModelSettings (#388)
fixes #189 

@rm-openai Would really appreciate if this can get a quick review.

---------

Co-authored-by: Rohan Mehta <rm@openai.com>
2025-04-03 19:35:59 -04:00
Drew Youngwerth
0110f3ad96
Add metadata to ModelSettings (#431) 2025-04-03 17:50:24 -04:00
Rohan Mehta
bf302c574c
Use "{}" instead of empty string for arguments (#422) 2025-04-02 12:27:42 -04:00
Steven Heidel
aad8accc86
Expose the "store" parameter through ModelSettings (#357)
Closes https://github.com/openai/openai-agents-python/issues/173

This will also set stored completions to True by default, encouraging a
best practice.
2025-03-26 19:01:28 -04:00
Rohan Mehta
6fb5792b77 Make the reset behavior on tool use configurable
## Summary:

#263 added this behavior. The goal was to prevent infinite loops when tool choice was set. The key change I'm making is:
1. Making it configurable on the agent.
2. Doing bookkeeping in the Runner to track this, to prevent mutating agents.
3. Not resetting the global tool choice in RunConfig.

## Test Plan:
Unit tests.
.
2025-03-25 13:29:32 -04:00
apeccaud
326ff09127 Fix parallel_tool_calls when False 2025-03-25 14:52:48 +00:00
Rohan Mehta
4cb011c4d2
Fix Typos (#258)
Noticed a bunch of typos when reading code, fixing.
2025-03-23 20:28:14 -04:00
Dominik Kundel
c7ce154637 feat: add voice pipeline support
> Co-authored-by: rm@openai.com
2025-03-20 09:43:13 -07:00
Raduan77
e9f6d08260 fix typos in src/ 2025-03-20 11:24:08 +01:00
Rohan Mehta
8c9974bc90 Fix breaking changes from openai 1.66.2 2025-03-19 12:30:45 -04:00
Rohan Mehta
16cfce117c
Add examples and documentation for using custom model providers (#110) 2025-03-13 08:17:25 -07:00
Rohan Mehta
341198ff92 Add request ID 2025-03-12 18:07:59 -07:00
Rohan Mehta
25a633139d Add examples and documentation for using custom model providers 2025-03-12 17:34:38 -07:00
Rohan Mehta
2302b478af Fix streaming in chat completions 2025-03-12 17:17:07 -07:00
Rohan Mehta
fde49cfcf7 Add max_tokens and documentation to model settings 2025-03-12 13:35:10 -07:00
Muhammad Junaid
51d79bf141 fix: support assistant role in message conversion
- The _Converter.items_to_messages method was incorrectly rejecting 'assistant'
as a valid role in conversation messages, causing runtime errors when processing
standard chat completion message formats.
- This fix enables proper handling of
complete conversation contexts that include both user and assistant messages.
2025-03-12 21:10:03 +05:00
Rohan Mehta
c27d7b7d24 pin to openai 1.66.2, update tests 2025-03-11 15:26:06 -07:00
dmitry-openai
9946b8b58d Merge pull request #8 from openai/repo/gitignore
removing ds store, adding gitignore
2025-03-11 11:17:37 -07:00
Rohan Mehta
aaec57a426 Initial commit 2025-03-11 09:42:28 -07:00