mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 00:23:19 +00:00
Update routing references (#6758)
* Update routing references Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> * Update routing references Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> --------- Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
@@ -281,7 +281,7 @@ Picks the deployment with the lowest response time.
|
||||
|
||||
It caches, and updates the response times for deployments based on when a request was sent and received from a deployment.
|
||||
|
||||
[**How to test**](https://github.com/BerriAI/litellm/blob/main/litellm/tests/test_lowest_latency_routing.py)
|
||||
[**How to test**](https://github.com/BerriAI/litellm/blob/main/tests/local_testing/test_lowest_latency_routing.py)
|
||||
|
||||
```python
|
||||
from litellm import Router
|
||||
@@ -567,7 +567,7 @@ print(response)
|
||||
|
||||
Picks a deployment with the least number of ongoing calls, it's handling.
|
||||
|
||||
[**How to test**](https://github.com/BerriAI/litellm/blob/main/litellm/tests/test_least_busy_routing.py)
|
||||
[**How to test**](https://github.com/BerriAI/litellm/blob/main/tests/local_testing/test_least_busy_routing.py)
|
||||
|
||||
```python
|
||||
from litellm import Router
|
||||
@@ -1035,7 +1035,7 @@ print(f"response: {response}")
|
||||
|
||||
### [Advanced]: Custom Retries, Cooldowns based on Error Type
|
||||
|
||||
- Use `RetryPolicy` if you want to set a `num_retries` based on the Exception receieved
|
||||
- Use `RetryPolicy` if you want to set a `num_retries` based on the Exception received
|
||||
- Use `AllowedFailsPolicy` to set a custom number of `allowed_fails`/minute before cooling down a deployment
|
||||
|
||||
[**See All Exception Types**](https://github.com/BerriAI/litellm/blob/ccda616f2f881375d4e8586c76fe4662909a7d22/litellm/types/router.py#L436)
|
||||
|
||||
Reference in New Issue
Block a user