File tree Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -120,28 +120,6 @@ def test_developer_role_translation(self):
120
120
121
121
assert response .choices [0 ].message .content is not None
122
122
123
- def test_system_message_with_no_user_message (self ):
124
- """
125
- Test that the system message is translated correctly for non-OpenAI providers.
126
- """
127
- base_completion_call_args = self .get_base_completion_call_args ()
128
- messages = [
129
- {
130
- "role" : "system" ,
131
- "content" : "Be a good bot!" ,
132
- },
133
- ]
134
- try :
135
- response = self .completion_function (
136
- ** base_completion_call_args ,
137
- messages = messages ,
138
- )
139
- assert response is not None
140
- except litellm .InternalServerError :
141
- pytest .skip ("Model is overloaded" )
142
-
143
- assert response .choices [0 ].message .content is not None
144
-
145
123
def test_content_list_handling (self ):
146
124
"""Check if content list is supported by LLM API"""
147
125
base_completion_call_args = self .get_base_completion_call_args ()
Original file line number Diff line number Diff line change @@ -624,3 +624,22 @@ async def test_gemini_image_generation_async_stream():
624
624
assert model_response_image is not None
625
625
assert model_response_image ["url" ].startswith ("data:image/png;base64," )
626
626
627
+
628
+ def test_system_message_with_no_user_message ():
629
+ """
630
+ Test that the system message is translated correctly for non-OpenAI providers.
631
+ """
632
+ messages = [
633
+ {
634
+ "role" : "system" ,
635
+ "content" : "Be a good bot!" ,
636
+ },
637
+ ]
638
+
639
+ response = litellm .completion (
640
+ model = "gemini/gemini-2.5-flash" ,
641
+ messages = messages ,
642
+ )
643
+ assert response is not None
644
+
645
+ assert response .choices [0 ].message .content is not None
You can’t perform that action at this time.
0 commit comments