Skip to content

Rename litellm-proxy CLI command to lite - #29874

Closed
mateo-berri wants to merge 4 commits into
litellm_internal_stagingfrom
claude/nifty-shannon-zLdtG
Closed

Rename litellm-proxy CLI command to lite#29874
mateo-berri wants to merge 4 commits into
litellm_internal_stagingfrom
claude/nifty-shannon-zLdtG

Conversation

@mateo-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

CI (LiteLLM team)

  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

After installing the package, the proxy management CLI is now invoked as lite. The old litellm-proxy script is no longer created.

$ uv pip install -e . --no-deps

$ lite --help
Usage: lite [OPTIONS] COMMAND [ARGS]...

  LiteLLM Proxy CLI - Manage your LiteLLM proxy server

Options:
  -v, --version    Show the LiteLLM Proxy CLI and server version and exit.
  --base-url TEXT  Base URL of the LiteLLM proxy server  [env var: LITELLM_PROXY_URL]
  --api-key TEXT   API key for authentication  [env var: LITELLM_PROXY_API_KEY]
  --help           Show this message and exit.

Commands:
  chat         Interactive chat with streaming responses
  claude       Run Claude Code through your LiteLLM proxy
  ...

$ lite whoami
❌ Not authenticated. Run 'lite login' to authenticate.

$ litellm-proxy --help
bash: litellm-proxy: command not found

Type

🧹 Refactoring

Changes

The proxy management CLI was invoked as litellm-proxy, which is a lot to type for an everyday command. This renames the console script entry point in pyproject.toml from litellm-proxy to lite so it's less typing.

The in-CLI usage examples, help text shown in the interactive shell, error messages (for example the "Run lite login" hints) and the CLI README docs are updated to match the new name. The existing whoami regression test was updated to assert on the new message.

This is a breaking change for anyone who hard-codes litellm-proxy in scripts or CI; they will need to switch to lite. Unrelated identifiers that merely share the string (the litellm-proxy-budget user, S3 bucket names, JWT audiences and the litellm-proxy-extras package) are intentionally left untouched.


Generated by Claude Code

mateo-berri and others added 4 commits June 6, 2026 18:54
…hrough the proxy

Wraps Claude Code, Codex, OpenCode, and any other coding agent so all of its
LLM traffic routes through a LiteLLM proxy, with the agent-vault style of "just
works" DX: one `run -- <agent>` command, auto SSO login when interactive,
env-key "agent mode" for containers/CI, and a fail-fast key check against the
proxy so bad credentials error immediately instead of deep inside the agent.

The wrapped binary is detected by name to pick the right variables. Claude Code
gets ANTHROPIC_BASE_URL (the bare proxy root, so it appends /v1/messages) and
ANTHROPIC_AUTH_TOKEN, with any stray ANTHROPIC_API_KEY cleared so the proxy
token wins. Codex and OpenCode get OPENAI_BASE_URL (proxy + /v1) and
OPENAI_API_KEY. Unrecognized commands get both sets so they work either way.
`litellm-proxy claude-code` remains as a shortcut for `run -- claude`.

The core logic is split into dependency-injected helpers (agent_profile,
build_agent_env, verify_proxy_key, run_agent) so env wiring, the preflight, and
the launch handoff are unit-tested without monkeypatching, alongside CliRunner
tests for auth resolution, agent mode, and auto-login. Mutation-tested the env
profiles, preflight, and agent-mode branch to confirm the tests fail when the
behavior is broken.

https://claude.ai/code/session_0154VpLXW7mMvk5wfbgPRJa6
Replace the `run -- <agent>` interface and the `claude-code` shortcut with
top-level commands generated per known agent, so launching is just
`litellm-proxy claude`, `litellm-proxy codex`, or `litellm-proxy opencode`,
with everything after the agent name forwarded straight to it. This drops the
ceremony of `run --` and cuts typing.

The `--model`/`--small-fast-model` wrapper flags are gone; pass the agent's
own model flag instead, or export the model env vars (the wrapper preserves
what you already have set), which keeps the surface minimal and avoids
intercepting flags the agent owns. Rename the module to agents.py to match.
…provider

Codex ignores OPENAI_BASE_URL (it always dials api.openai.com over the
Responses WebSocket transport), so the OpenAI env profile alone left
`litellm-proxy codex` talking to OpenAI directly instead of the proxy. Point
Codex at the proxy with a custom provider passed as `-c` config overrides, and
force the HTTP/SSE Responses transport with supports_websockets=false since the
proxy does not speak the Responses WebSocket protocol. The provider reads its
key from OPENAI_API_KEY, which the agent env already exports.

The overrides are injected ahead of the user's args so they precede Codex's
subcommand. Claude Code and OpenCode are unaffected; they honor the exported
env vars. Adds regression tests for the per-agent launch args and the
injection ordering.

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
The proxy management CLI was invoked as litellm-proxy, which is a lot to
type for an everyday command. Rename the console script entry point to
lite and update the in-CLI usage examples, help text, error messages and
docs to match.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ mateo-berri
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.69369% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/proxy/client/cli/interface.py 0.00% 4 Missing ⚠️
litellm/proxy/client/cli/commands/agents.py 97.08% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor Author

Closing this. The lite rename now lives directly on the litellm_cli_run_agents branch as part of #29850, so this standalone branch and PR are redundant


Generated by Claude Code

@mateo-berri mateo-berri closed this Jun 7, 2026
@mateo-berri
mateo-berri deleted the claude/nifty-shannon-zLdtG branch June 7, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants