From ad9b79259f9c92788f98e2f0ecf315ecea3dccab Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 9 Jun 2025 17:37:40 -0700 Subject: [PATCH] Make all commands show server URL (#10801) * Make all commands show server URL so users know which server they're accessing * Write msg to stderr & only if it's a tty --- litellm/proxy/client/cli/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/client/cli/main.py b/litellm/proxy/client/cli/main.py index f053ffe84f4..9ecd2f1e19c 100644 --- a/litellm/proxy/client/cli/main.py +++ b/litellm/proxy/client/cli/main.py @@ -1,4 +1,5 @@ # stdlib imports +import sys from typing import Optional # third party imports @@ -60,6 +61,8 @@ def print_version(base_url: str, api_key: Optional[str]): def cli(ctx: click.Context, base_url: str, api_key: Optional[str]) -> None: """LiteLLM Proxy CLI - Manage your LiteLLM proxy server""" ctx.ensure_object(dict) + if sys.stderr.isatty(): + click.secho(f"Accessing LiteLLM server: {base_url} ...\n", fg="yellow", err=True) ctx.obj["base_url"] = base_url ctx.obj["api_key"] = api_key