update the code with aysnc iterator as suggested by Ben

This commit is contained in:
Sumit Jaiswal 2025-06-02 23:49:08 +05:30
parent b413c7562b
commit 3840ef7a98
No known key found for this signature in database
GPG key ID: A4604B39D64D6AEC
3 changed files with 22 additions and 7 deletions

View file

@ -602,7 +602,7 @@ class InferenceRouter(Inference):
async def health(self) -> dict[str, HealthResponse]:
health_statuses = {}
timeout = 0.5
timeout = 1 # increasing the timeout to 1 second for health checks
for provider_id, impl in self.routing_table.impls_by_provider_id.items():
try:
# check if the provider has a health method