From 375df83bdbf141a1c96a3731decb0531568d1cf2 Mon Sep 17 00:00:00 2001 From: Bortlesboat Date: Thu, 19 Mar 2026 22:19:35 -0400 Subject: [PATCH 1/3] feat(lib): export type_to_response_format_param publicly Add type_to_response_format_param to the public openai.lib namespace so users don't need to import from internal _parsing._completions path. --- src/openai/lib/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openai/lib/__init__.py b/src/openai/lib/__init__.py index 5c6cb782c0..02aace86ce 100644 --- a/src/openai/lib/__init__.py +++ b/src/openai/lib/__init__.py @@ -1,2 +1,3 @@ from ._tools import pydantic_function_tool as pydantic_function_tool from ._parsing import ResponseFormatT as ResponseFormatT +from ._parsing import type_to_response_format_param as type_to_response_format_param From eb5a6edbafba41e062d92f0fab4db72834abdc0b Mon Sep 17 00:00:00 2001 From: Andrew Barnes Date: Sun, 12 Jul 2026 18:44:02 -0400 Subject: [PATCH 2/3] test(lib): cover response format helper export --- src/openai/lib/__init__.py | 3 +-- tests/lib/test_public_exports.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tests/lib/test_public_exports.py diff --git a/src/openai/lib/__init__.py b/src/openai/lib/__init__.py index 02aace86ce..881cfa4667 100644 --- a/src/openai/lib/__init__.py +++ b/src/openai/lib/__init__.py @@ -1,3 +1,2 @@ from ._tools import pydantic_function_tool as pydantic_function_tool -from ._parsing import ResponseFormatT as ResponseFormatT -from ._parsing import type_to_response_format_param as type_to_response_format_param +from ._parsing import ResponseFormatT as ResponseFormatT, type_to_response_format_param as type_to_response_format_param diff --git a/tests/lib/test_public_exports.py b/tests/lib/test_public_exports.py new file mode 100644 index 0000000000..bcd301edb3 --- /dev/null +++ b/tests/lib/test_public_exports.py @@ -0,0 +1,6 @@ +from openai.lib import type_to_response_format_param +from openai.lib._parsing import type_to_response_format_param as internal_type_to_response_format_param + + +def test_type_to_response_format_param_is_publicly_exported() -> None: + assert type_to_response_format_param is internal_type_to_response_format_param From 9b343c8a0c33c9fe584e30f54b0c45e3ef9b0050 Mon Sep 17 00:00:00 2001 From: Marcus Wood Date: Fri, 2 Oct 2026 19:43:58 +0000 Subject: [PATCH 3/3] test: remove redundant public export test --- tests/lib/test_public_exports.py | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 tests/lib/test_public_exports.py diff --git a/tests/lib/test_public_exports.py b/tests/lib/test_public_exports.py deleted file mode 100644 index bcd301edb3..0000000000 --- a/tests/lib/test_public_exports.py +++ /dev/null @@ -1,6 +0,0 @@ -from openai.lib import type_to_response_format_param -from openai.lib._parsing import type_to_response_format_param as internal_type_to_response_format_param - - -def test_type_to_response_format_param_is_publicly_exported() -> None: - assert type_to_response_format_param is internal_type_to_response_format_param