From c6ef7db5661256e7180087d2dd5abbe9b0e733e3 Mon Sep 17 00:00:00 2001 From: Jan Andrusikiewicz Date: Tue, 3 Mar 2026 14:59:23 +0100 Subject: [PATCH] addec coercing to bool in _compat.py --- src/openai/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openai/_compat.py b/src/openai/_compat.py index 020ffeb2ca..f71dfb1427 100644 --- a/src/openai/_compat.py +++ b/src/openai/_compat.py @@ -149,7 +149,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + by_alias=bool(by_alias), ) return cast( "dict[str, Any]",