From adf21464dbc8b8032598ce2a19d466258bdfdfb5 Mon Sep 17 00:00:00 2001 From: rudra-attri Date: Thu, 7 Aug 2025 16:48:54 +0530 Subject: [PATCH 1/2] Updated the default values for two parameters in the ModelSettings class to align with their documented behavior: --- src/agents/model_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agents/model_settings.py b/src/agents/model_settings.py index 5af83fe3e..f27cd63aa 100644 --- a/src/agents/model_settings.py +++ b/src/agents/model_settings.py @@ -104,11 +104,11 @@ class ModelSettings: metadata: dict[str, str] | None = None """Metadata to include with the model response call.""" - store: bool | None = None + store: bool | None = True """Whether to store the generated model response for later retrieval. Defaults to True if not provided.""" - include_usage: bool | None = None + include_usage: bool | None = True """Whether to include usage chunk. Defaults to True if not provided.""" From e6a6398eb430aeb87e7841a1dbf02af37dfb18cb Mon Sep 17 00:00:00 2001 From: rudra-attri Date: Mon, 11 Aug 2025 13:18:36 +0530 Subject: [PATCH 2/2] fix: revert incorrect default values and update documentation - Revert store and include_usage back to None as default values - Update documentation to accurately reflect API-specific behavior: * store: clarify different default behavior between Responses API and Chat Completions API * include_usage: clarify it's only available for Chat Completions API Addresses reviewer feedback from PR #1392 --- src/agents/model_settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/agents/model_settings.py b/src/agents/model_settings.py index 23e68e5a1..71e66ed84 100644 --- a/src/agents/model_settings.py +++ b/src/agents/model_settings.py @@ -105,13 +105,14 @@ class ModelSettings: metadata: dict[str, str] | None = None """Metadata to include with the model response call.""" - store: bool | None = True + store: bool | None = None """Whether to store the generated model response for later retrieval. - Defaults to True if not provided.""" + For Responses API: automatically enabled when not specified. + For Chat Completions API: disabled when not specified.""" - include_usage: bool | None = True + include_usage: bool | None = None """Whether to include usage chunk. - Defaults to True if not provided.""" + Only available for Chat Completions API.""" response_include: list[ResponseIncludable] | None = None """Additional output data to include in the model response.