mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge 46bb15266d into a6816f0e96
This commit is contained in:
commit
efbb4e880f
1 changed files with 36 additions and 0 deletions
36
tests/test_litellm/llms/cerebras/test_cerebras_chat.py
Normal file
36
tests/test_litellm/llms/cerebras/test_cerebras_chat.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import pytest
|
||||
|
||||
from litellm.llms.cerebras.chat import CerebrasConfig
|
||||
|
||||
|
||||
class TestCerebrasConfig:
|
||||
def test_get_supported_openai_params_includes_max_retries(self):
|
||||
config = CerebrasConfig()
|
||||
params = config.get_supported_openai_params(model="cerebras/llama-4-scout-17b-16e")
|
||||
assert "max_retries" in params
|
||||
|
||||
def test_get_supported_openai_params_includes_extra_headers(self):
|
||||
config = CerebrasConfig()
|
||||
params = config.get_supported_openai_params(model="cerebras/llama-4-scout-17b-16e")
|
||||
assert "extra_headers" in params
|
||||
|
||||
def test_map_openai_params_passes_through_max_retries(self):
|
||||
config = CerebrasConfig()
|
||||
result = config.map_openai_params(
|
||||
non_default_params={"max_retries": 0},
|
||||
optional_params={},
|
||||
model="cerebras/llama-4-scout-17b-16e",
|
||||
drop_params=False,
|
||||
)
|
||||
assert result["max_retries"] == 0
|
||||
|
||||
def test_map_openai_params_passes_through_extra_headers(self):
|
||||
config = CerebrasConfig()
|
||||
headers = {"X-Custom": "value"}
|
||||
result = config.map_openai_params(
|
||||
non_default_params={"extra_headers": headers},
|
||||
optional_params={},
|
||||
model="cerebras/llama-4-scout-17b-16e",
|
||||
drop_params=False,
|
||||
)
|
||||
assert result["extra_headers"] == headers
|
||||
Loading…
Add table
Reference in a new issue