diff --git a/litellm/proxy/client/cli/interface.py b/litellm/proxy/client/cli/interface.py index 48f21e39297..d3f3a24eb45 100644 --- a/litellm/proxy/client/cli/interface.py +++ b/litellm/proxy/client/cli/interface.py @@ -101,7 +101,7 @@ def show_commands(): def setup_shell(ctx: click.Context): """Set up the interactive shell with banner and initial info.""" - from .banner import show_banner + from litellm.proxy.common_utils.banner import show_banner show_banner() @@ -123,7 +123,7 @@ def handle_special_commands(user_input: str) -> bool: return True elif user_input.lower() == "clear": click.clear() - from .banner import show_banner + from litellm.proxy.common_utils.banner import show_banner show_banner() show_commands() return True diff --git a/litellm/proxy/client/cli/banner.py b/litellm/proxy/common_utils/banner.py similarity index 88% rename from litellm/proxy/client/cli/banner.py rename to litellm/proxy/common_utils/banner.py index 58bba9cac2e..1deca22373d 100644 --- a/litellm/proxy/client/cli/banner.py +++ b/litellm/proxy/common_utils/banner.py @@ -1,5 +1,3 @@ -# third party imports -import click # LiteLLM ASCII banner LITELLM_BANNER = """ ██╗ ██╗████████╗███████╗██╗ ██╗ ███╗ ███╗ @@ -12,4 +10,8 @@ LITELLM_BANNER = """ ██╗ ██╗████████╗██ def show_banner(): """Display the LiteLLM CLI banner.""" - click.echo(f"\n{LITELLM_BANNER}\n") \ No newline at end of file + try: + import click + click.echo(f"\n{LITELLM_BANNER}\n") + except ImportError: + print("\n") # noqa: T201 \ No newline at end of file diff --git a/litellm/proxy/common_utils/html_forms/cli_sso_success.py b/litellm/proxy/common_utils/html_forms/cli_sso_success.py index ba9036f578e..7da140505aa 100644 --- a/litellm/proxy/common_utils/html_forms/cli_sso_success.py +++ b/litellm/proxy/common_utils/html_forms/cli_sso_success.py @@ -1,5 +1,4 @@ - -from litellm.proxy.client.cli.banner import LITELLM_BANNER +from litellm.proxy.common_utils.banner import LITELLM_BANNER def render_cli_sso_success_page() -> str: diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index d0651e5d40e..6140d5cd933 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -2977,7 +2977,7 @@ async def initialize( # noqa: PLR0915 config=None, ): global user_model, user_api_base, user_debug, user_detailed_debug, user_user_max_tokens, user_request_timeout, user_temperature, user_telemetry, user_headers, experimental, llm_model_list, llm_router, general_settings, master_key, user_custom_auth, prisma_client - from litellm.proxy.client.cli.banner import show_banner + from litellm.proxy.common_utils.banner import show_banner show_banner() if os.getenv("LITELLM_DONT_SHOW_FEEDBACK_BOX", "").lower() != "true": generate_feedback_box()