Skip to content

Commit eb9df26

Browse files
committed
fix: omit chat completions store by default
1 parent 3854c12 commit eb9df26

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/agents/models/chatcmpl_helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def is_openai(cls, client: AsyncOpenAI) -> bool:
2929

3030
@classmethod
3131
def get_store_param(cls, client: AsyncOpenAI, model_settings: ModelSettings) -> bool | None:
32-
# Match the behavior of Responses where store is True when not given
33-
default_store = True if cls.is_openai(client) else None
34-
return model_settings.store if model_settings.store is not None else default_store
32+
return model_settings.store
3533

3634
@classmethod
3735
def get_stream_options_param(

tests/models/test_openai_chatcompletions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,12 @@ def __init__(self, completions: DummyCompletions) -> None:
577577

578578

579579
def test_store_param():
580-
"""Should default to True for OpenAI API calls, and False otherwise."""
580+
"""Should omit store unless it is explicitly set."""
581581

582582
model_settings = ModelSettings()
583583
client = AsyncOpenAI()
584-
assert ChatCmplHelpers.get_store_param(client, model_settings) is True, (
585-
"Should default to True for OpenAI API calls"
584+
assert ChatCmplHelpers.get_store_param(client, model_settings) is None, (
585+
"Should omit store when not specified for Chat Completions"
586586
)
587587

588588
model_settings = ModelSettings(store=False)

0 commit comments

Comments
 (0)