mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
test: cover video_url validation message
This commit is contained in:
parent
625880c9f0
commit
031acb9d38
1 changed files with 15 additions and 0 deletions
|
|
@ -993,6 +993,21 @@ def test_token_counter_with_video_url():
|
|||
)
|
||||
|
||||
|
||||
def test_token_counter_invalid_content_type_lists_video_url():
|
||||
messages = [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [{"type": "audio_url", "audio_url": "https://example.com"}],
|
||||
}
|
||||
]
|
||||
|
||||
try:
|
||||
token_counter(model="gpt-4o", messages=messages)
|
||||
assert False, "Expected ValueError for invalid content item type"
|
||||
except ValueError as e:
|
||||
assert "video_url" in str(e)
|
||||
|
||||
|
||||
def test_token_counter_with_thinking_content():
|
||||
"""
|
||||
Test that _count_content_list() correctly handles Claude's extended thinking content blocks.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue