Skip to content

Commit 6d1ab9d

Browse files
committed
Fix health check fallback kwargs
1 parent 1a5f889 commit 6d1ab9d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

litellm/proxy/proxy_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,15 +2752,15 @@ async def _run_direct_health_check_with_instrumentation(
27522752
**_hc_filter,
27532753
)
27542754
except TypeError as e:
2755-
if "instrumentation_context" not in str(e):
2755+
unsupported_optional_kwargs = ("instrumentation_context", *_hc_filter.keys())
2756+
if not any(kwarg_name in str(e) for kwarg_name in unsupported_optional_kwargs):
27562757
raise
27572758
# Backward compatibility for monkeypatched or wrapped callables
2758-
# that do not accept instrumentation_context.
2759+
# that do not accept newer health check kwargs.
27592760
return await perform_health_check(
27602761
model_list=model_list,
27612762
details=details,
27622763
max_concurrency=max_concurrency,
2763-
**_hc_filter,
27642764
)
27652765

27662766

0 commit comments

Comments
 (0)