From f5644b7e7377d258f87ec43cb453b6538c748b9a Mon Sep 17 00:00:00 2001 From: yenslife <77geo5rge6@gmail.com> Date: Sun, 2 Feb 2025 14:52:57 +0800 Subject: [PATCH] fix(types): add "developer" role to support O-series models The OpenAI API now supports a "developer" role specifically for O-series models, but this role was missing in the type definitions. This update adds the "developer" role to ChatCompletionRole type alias to prevent IDE warnings while maintaining compatibility with the actual API behavior. --- src/openai/types/chat/chat_completion_role.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openai/types/chat/chat_completion_role.py b/src/openai/types/chat/chat_completion_role.py index c2ebef74c8..a3cc96e2e9 100644 --- a/src/openai/types/chat/chat_completion_role.py +++ b/src/openai/types/chat/chat_completion_role.py @@ -4,4 +4,4 @@ __all__ = ["ChatCompletionRole"] -ChatCompletionRole: TypeAlias = Literal["system", "user", "assistant", "tool", "function"] +ChatCompletionRole: TypeAlias = Literal["system", "user", "assistant", "tool", "function", "developer"]