mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
test(deepseek): assert tool result images move into a user message
The tool result image test only checked that the image appeared somewhere in the output, so it still passed if the image stayed inside the tool message, which DeepSeek ignores. Assert the tool message keeps its tool_call_id without the image and the following user message carries it
This commit is contained in:
parent
2c6577959a
commit
ca3ade45e0
1 changed files with 6 additions and 3 deletions
|
|
@ -175,9 +175,12 @@ class TestDeepSeekVisionMultimodalContent:
|
|||
|
||||
result = self.config._transform_messages([tool_message], model=self.VISION_MODEL)
|
||||
|
||||
assert result[0]["role"] == "tool"
|
||||
assert result[0]["tool_call_id"] == "call_1"
|
||||
assert any(isinstance(message["content"], list) and image_block in message["content"] for message in result)
|
||||
tool_result, image_carrier = result
|
||||
assert tool_result["role"] == "tool"
|
||||
assert tool_result["tool_call_id"] == "call_1"
|
||||
assert image_block not in tool_result["content"]
|
||||
assert image_carrier["role"] == "user"
|
||||
assert image_block in image_carrier["content"]
|
||||
|
||||
def test_audio_block_collapsed_even_on_vision_model(self):
|
||||
messages = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue