mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Add attempted-retries
and timeout
values to response headers + more testing (#7926)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
* feat(router.py): add retry headers to response makes it easy to add testing to ensure model-specific retries are respected * fix(add_retry_headers.py): clarify attempted retries vs. max retries * test(test_fallbacks.py): add test for checking if max retries set for model is respected * test(test_fallbacks.py): assert values for attempted retries and max retries are as expected * fix(utils.py): return timeout in litellm proxy response headers * test(test_fallbacks.py): add test to assert model specific timeout used on timeout error * test: add bad model with timeout to proxy * fix: fix linting error * fix(router.py): fix get model list from model alias * test: loosen test restriction - account for other events on proxy
This commit is contained in:
parent
bc546d82a1
commit
513b1904ab
9 changed files with 245 additions and 31 deletions
|
@ -2742,3 +2742,22 @@ def test_router_prompt_management_factory():
|
|||
)
|
||||
|
||||
print(response)
|
||||
|
||||
|
||||
def test_router_get_model_list_from_model_alias():
|
||||
router = Router(
|
||||
model_list=[
|
||||
{
|
||||
"model_name": "gpt-3.5-turbo",
|
||||
"litellm_params": {"model": "gpt-3.5-turbo"},
|
||||
}
|
||||
],
|
||||
model_group_alias={
|
||||
"my-special-fake-model-alias-name": "fake-openai-endpoint-3"
|
||||
},
|
||||
)
|
||||
|
||||
model_alias_list = router.get_model_list_from_model_alias(
|
||||
model_name="gpt-3.5-turbo"
|
||||
)
|
||||
assert len(model_alias_list) == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue