From 0e10ae1cf188ce24ae089bad0809ebd29a544f5d Mon Sep 17 00:00:00 2001 From: Alessandro Marrella Date: Sat, 28 Jun 2025 03:12:13 +0200 Subject: [PATCH] change Message init type annotation to support other roles (#11942) --- litellm/types/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index b28977e7e5..5e38402031 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -623,7 +623,7 @@ class Message(OpenAIObject): def __init__( self, content: Optional[str] = None, - role: Literal["assistant"] = "assistant", + role: Literal["assistant", "user", "system", "tool", "function"] = "assistant", function_call=None, tool_calls: Optional[list] = None, audio: Optional[ChatCompletionAudioResponse] = None,