(fix) don't block proxy startup if license check fails & using prometheus (#6839)

* fix - don't block proxy startup if not a premium user

* test_litellm_proxy_server_config_with_prometheus

* add test for proxy startup

* fix remove unused test

* fix startup test

* add comment on bad-license
This commit is contained in:
Ishaan Jaff 2024-11-20 17:55:39 -08:00 committed by GitHub
parent 8434c2fac7
commit ded03b315c
4 changed files with 113 additions and 1 deletions

View file

@ -242,7 +242,9 @@ def initialize_callbacks_on_proxy( # noqa: PLR0915
if "prometheus" in value:
if premium_user is not True:
raise Exception(CommonProxyErrors.not_premium_user.value)
verbose_proxy_logger.warning(
f"Prometheus metrics are only available for premium users. {CommonProxyErrors.not_premium_user.value}"
)
from litellm.proxy.proxy_server import app
verbose_proxy_logger.debug("Starting Prometheus Metrics on /metrics")