From f03f29dc7f8089006c00846d82a2c9ba5a540941 Mon Sep 17 00:00:00 2001 From: Rishab Motgi Date: Mon, 18 May 2026 12:28:09 -0700 Subject: [PATCH] fix(tests): use "compaction" as ContextManagement type value The ContextManagement TypedDict's type field only accepts "compaction" (see response_create_params.py: "Currently only 'compaction' is supported"). The auto-generated test stubs used the placeholder string "type", which is not a valid value and would never exercise the intended code path. Fixes #2868 --- tests/api_resources/test_responses.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index 094687c2c6..87ec0065d3 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -32,7 +32,7 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: background=True, context_management=[ { - "type": "type", + "type": "compaction", "compact_threshold": 1000, } ], @@ -120,7 +120,7 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: background=True, context_management=[ { - "type": "type", + "type": "compaction", "compact_threshold": 1000, } ], @@ -445,7 +445,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn background=True, context_management=[ { - "type": "type", + "type": "compaction", "compact_threshold": 1000, } ], @@ -533,7 +533,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn background=True, context_management=[ { - "type": "type", + "type": "compaction", "compact_threshold": 1000, } ],