[FEATURE] allow connecting to LiteLLM (third-party proxy) directly from the /login flow in the TUI
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
We use LiteLLM internally as a proxy/gateway to route requests to LLM providers within our company. We have a Claude Code Team subscription, and we'd like to be able to authenticate and connect Claude Code to our LiteLLM instance directly from the /login command in the TUI, instead of relying solely on environment variables set outside of Claude Code.
Motivation
We use LiteLLM internally as a proxy/gateway to route requests to LLM providers within our company. We have a Claude Code Team subscription, and we'd like to be able to authenticate and connect Claude Code to our LiteLLM instance directly from the /login command in the TUI, instead of relying solely on environment variables set outside of Claude Code.
Having native support for a third-party/proxy connection in the /login flow would make it much easier for companies using LiteLLM (or other gateways) to roll out Claude Code to their teams while keeping their existing routing, logging, and governance setup.
Additionnal context
We're on a Claude Code Team subscription and use LiteLLM as our internal gateway. Native support for this in /login would remove friction for onboarding our team and let us keep our existing observability/governance setup around LLM usage.
Proposed Solution
Current behavior
- Connecting Claude Code to a third-party endpoint like LiteLLM currently requires setting environment variables (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, etc.) manually, outside of the normal /login flow.
- The /login command currently only supports the standard Anthropic account / Claude Code Team login path, with no option to point it at a custom/proxy endpoint such as LiteLLM.
Desired behavior
- When running /login in the TUI, allow the option to configure a custom base URL / proxy (e.g. our LiteLLM endpoint) alongside or as part of the Team subscription login.
- Ideally, this configuration could be saved persistently (e.g. in settings.json) so it doesn't need to be re-entered every session.
- Support for entering a LiteLLM API key/token as part of this same flow, rather than requiring environment variables to be pre-set.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
Scenario: Onboarding a new engineer with a Claude Code Team subscription routed through our internal LiteLLM gateway
- A new engineer joins our team and installs Claude Code.
- They run /login in the TUI.
- Instead of only seeing the standard "Anthropic account" / "Claude Code Team (SSO)" options, they select "Third-party / Custom provider".
- From the list of supported third-party providers, they select "LiteLLM".
- They're prompted to enter our company's LiteLLM connection details (e.g. base URL, API key/virtual key).
- The normal Claude Code Team login flow then continues as usual (e.g. SSO authentication against Anthropic to validate the Team subscription/seat).
- Once both steps complete, Claude Code is fully authenticated: the session is authorized under our Team subscription, but all model requests are transparently routed through our LiteLLM proxy.
- From that point on, the engineer uses Claude Code normally no manual environment variables, no extra config files and our LiteLLM instance handles routing, logging, rate-limiting, and provider selection on the backend, exactly as it does for our other internal tools.
This would let us onboard every team member in under a minute, with zero manual setup outside of the TUI, while keeping full visibility and governance over LLM usage through LiteLLM — consistent with how we manage LLM access company-wide.
Additional Context
_No response_