From cf03b2a797a606c64a2305cd8c7410d8a6253fa6 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 22 Mar 2025 18:09:04 -0700 Subject: [PATCH] test_langfuse_logging_completion --- litellm/types/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 83e8525fa9e..2cc06eecbf3 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -598,6 +598,11 @@ class Message(OpenAIObject): # OpenAI compatible APIs like mistral API will raise an error if audio is passed in del self.audio + if annotations is None: + # ensure default response matches OpenAI spec + # Some OpenAI compatible APIs raise an error if annotations are passed in + del self.annotations + if reasoning_content is None: # ensure default response matches OpenAI spec del self.reasoning_content