Commit graph

15 commits

Author SHA1 Message Date
Ishaan Jaffer
7ab9d06c3e address greptile review: fix yaml escaping, port validation, display name collisions, tests
- setup_wizard.py: add _yaml_escape() for safe YAML embedding of API keys
- setup_wizard.py: add _styled_input() with readline ANSI ignore markers
- setup_wizard.py: change DIVIDER to _divider() fn to avoid import-time color capture
- setup_wizard.py: validate port range 1-65535, initialize before loop
- setup_wizard.py: qualify azure display names (azure-gpt-4o) to avoid collision with openai
- setup_wizard.py: work on env_copy in _build_config to avoid mutating caller's dict
- setup_wizard.py: skip model_list entries for providers with no credentials
- setup_wizard.py: prompt for azure deployment name
- setup_wizard.py: wrap os.execlp in try/except with friendly fallback
- setup_wizard.py: wrap config write in try/except OSError
- setup_wizard.py: fix _validate_and_report to use two print lines (no \r overwrite)
- setup_wizard.py: add .gitignore tip next to key storage notice
- setup_wizard.py: fix run_setup_wizard() return type annotation to None
- scripts/install.sh: drop pipefail (not supported by dash on Ubuntu when invoked as sh)
- scripts/install.sh: use litellm[proxy] from PyPI (not hardcoded dev branch)
- scripts/install.sh: guard /dev/tty read with -r check for Docker/CI compat
- scripts/install.sh: remove --force-reinstall to avoid downgrading dependencies
- tests/test_litellm/test_setup_wizard.py: 13 unit tests for _build_config and _yaml_escape
2026-03-17 13:23:35 -07:00
Ishaan Jaffer
d5b7b515c0 style(install.sh): show git clone warning in blue 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
cf1b12b48a fix(install.sh): warn about git clone duration, drop --no-cache-dir so re-runs are faster 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
fa1c412912 fix(install.sh): redirect stdin from /dev/tty on exec so wizard gets terminal, not exhausted pipe 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
29fa7c0f75 fix(install.sh): use sysconfig.get_path('scripts') to find pip-installed litellm binary 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
2b3d8a1dbf fix(install.sh): use Python bin-dir litellm binary to avoid CWD sys.path shadowing 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
86162d7714 fix(install.sh): suppress RuntimeWarning from module invocation 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
5c757ba9d0 fix(install.sh): use litellm.proxy.proxy_cli module (no __main__.py exists) 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
f99be57ed2 fix(install.sh): always launch wizard via $PYTHON_BIN -m litellm, not PATH binary 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
6871959111 fix(install.sh): show pip progress bar during install 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
c0d1ac9f54 fix(install.sh): force-reinstall from git to bypass cached PyPI version 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
027174df58 fix(install.sh): remove stale LITELLM_BRANCH reference that caused unbound variable error 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
3998b47c84 fix(install.sh): install from git branch so --setup is available for QA 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
f765541dda fix(install.sh): remove orange color, add LITELLM_BRANCH env var for branch installs 2026-03-17 13:23:35 -07:00
Ishaan Jaffer
db7075b080 feat(setup): add interactive setup wizard + install.sh
Adds `litellm --setup` — a Claude Code-style TUI onboarding wizard that
guides users through provider selection, API key entry, and proxy config
generation, then optionally starts the proxy immediately.

- litellm/setup_wizard.py: wizard with ASCII art, numbered provider menu
  (OpenAI, Anthropic, Azure, Gemini, Bedrock, Ollama), API key prompts,
  port/master-key config, and litellm_config.yaml generation
- litellm/proxy/proxy_cli.py: adds --setup flag that invokes the wizard
- scripts/install.sh: curl-installable script (detect OS/Python, pip
  install litellm[proxy], launch wizard)

Usage:
  curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/main/scripts/install.sh | sh
  litellm --setup
2026-03-17 13:23:35 -07:00