Coverage for .venv/lib/python3.13/site-packages/litellm/proxy/client/cli/commands/_cli_context.py: 0%
10 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 12:01 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 12:01 +0000
1from typing import Final
3import click
4from typing_extensions import ReadOnly, TypedDict
7class CliContextValues(TypedDict):
8 """Values the top-level CLI group stores on the click context."""
10 base_url: ReadOnly[str]
11 api_key: ReadOnly[str | None]
14_UNSET_CLI_CONTEXT: Final[CliContextValues] = {"base_url": "", "api_key": None}
17def cli_context_values(ctx: click.Context) -> CliContextValues:
18 values: Final[CliContextValues] = getattr(ctx, "obj", _UNSET_CLI_CONTEXT)
19 return values