mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test: add unit tests for VibeThinker models configuration
Add comprehensive tests to verify: - Models exist in model_prices_and_context_window.json - Required fields (provider, mode, tokens) are present - Context window values are correct (32K) - Provider consistency with other Featherless AI models
This commit is contained in:
parent
303eb586b0
commit
ed7cccaa54
1 changed files with 49 additions and 0 deletions
49
tests/test_litellm/test_vibethinker_models.py
Normal file
49
tests/test_litellm/test_vibethinker_models.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
"""
|
||||
Test VibeThinker models configuration.
|
||||
"""
|
||||
import json
|
||||
import pytest
|
||||
|
||||
|
||||
def test_vibethinker_models_in_model_prices():
|
||||
"""Verify VibeThinker models are correctly configured in model_prices_and_context_window.json."""
|
||||
with open("model_prices_and_context_window.json", "r") as f:
|
||||
model_prices = json.load(f)
|
||||
|
||||
models = [
|
||||
"featherless_ai/WeiboAI/VibeThinker-1.5B",
|
||||
"featherless_ai/WeiboAI/VibeThinker-3B",
|
||||
]
|
||||
|
||||
for model in models:
|
||||
assert model in model_prices, f"{model} not found in model_prices_and_context_window.json"
|
||||
|
||||
config = model_prices[model]
|
||||
|
||||
# Verify required fields
|
||||
assert config["litellm_provider"] == "featherless_ai", f"{model}: wrong provider"
|
||||
assert config["mode"] == "chat", f"{model}: wrong mode"
|
||||
assert "max_tokens" in config, f"{model}: missing max_tokens"
|
||||
assert "max_input_tokens" in config, f"{model}: missing max_input_tokens"
|
||||
assert "max_output_tokens" in config, f"{model}: missing max_output_tokens"
|
||||
|
||||
# Verify context window (Qwen base models have 32K context)
|
||||
assert config["max_input_tokens"] == 32768, f"{model}: incorrect max_input_tokens"
|
||||
assert config["max_tokens"] == 32768, f"{model}: incorrect max_tokens"
|
||||
|
||||
|
||||
def test_vibethinker_provider_consistency():
|
||||
"""Verify VibeThinker models use the same provider pattern as other Featherless AI models."""
|
||||
with open("model_prices_and_context_window.json", "r") as f:
|
||||
model_prices = json.load(f)
|
||||
|
||||
# Get all featherless_ai models
|
||||
featherless_models = {k: v for k, v in model_prices.items() if k.startswith("featherless_ai/")}
|
||||
|
||||
# VibeThinker models should exist
|
||||
assert "featherless_ai/WeiboAI/VibeThinker-1.5B" in featherless_models
|
||||
assert "featherless_ai/WeiboAI/VibeThinker-3B" in featherless_models
|
||||
|
||||
# All should have the same provider
|
||||
for model, config in featherless_models.items():
|
||||
assert config["litellm_provider"] == "featherless_ai", f"{model}: inconsistent provider"
|
||||
Loading…
Add table
Reference in a new issue