mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
test(test_optional_params.py): use num_retries instead of 'max_retries' if given
This commit is contained in:
parent
5357bd7799
commit
3b49b32a24
1 changed files with 17 additions and 0 deletions
|
@ -446,3 +446,20 @@ def test_bedrock_optional_params_embeddings_provider_specific_params():
|
||||||
wait_for_model=True,
|
wait_for_model=True,
|
||||||
)
|
)
|
||||||
assert len(optional_params) == 1
|
assert len(optional_params) == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_optional_params_num_retries():
|
||||||
|
"""
|
||||||
|
Relevant issue - https://github.com/BerriAI/litellm/issues/5124
|
||||||
|
"""
|
||||||
|
with patch("litellm.main.get_optional_params", new=MagicMock()) as mock_client:
|
||||||
|
_ = litellm.completion(
|
||||||
|
model="gpt-3.5-turbo",
|
||||||
|
messages=[{"role": "user", "content": "Hello world"}],
|
||||||
|
num_retries=10,
|
||||||
|
)
|
||||||
|
|
||||||
|
mock_client.assert_called()
|
||||||
|
|
||||||
|
print(f"mock_client.call_args: {mock_client.call_args}")
|
||||||
|
assert mock_client.call_args.kwargs["max_retries"] == 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue