LiteLLM Service is a shell-based toolkit for managing, testing, and running custom Ollama models and the LiteLLM proxy. It provides an interactive menu for model lifecycle management, proxy control, and integration with the Cursor editor.
- Create, select, and test custom Ollama models
- Install, upgrade, and run the LiteLLM proxy
- Background proxy management with logging
- Integration with Cursor editor
- Interactive menu for all major operations
- Install prerequisites:
- Python 3.12+
- pip
- Conda
- Clone the repository:
git clone <repo-url> cd litellm
- Create and activate the Conda environment:
conda create -n litellm python=3.12 conda activate litellm
- Install dependencies:
pip install -r requirements.txt pip install "litellm[proxy]" - Configure environment variables:
- Copy
src/config/.env.exampletosrc/config/.envand update as needed.
- Copy
- Run the service:
bash launch.sh
When you run bash launch.sh, you'll see a menu with options:
- Select Custom Model: Choose an Ollama model to use.
- Create Custom Model: Build a new model from a Modelfile.
- Test Custom Model: Send a test prompt to your model.
- Run Custom Model: Run the selected model with Ollama.
- Install LiteLLM Proxy: Install the proxy via pip.
- Upgrade LiteLLM Proxy: Upgrade to the latest proxy version.
- Start LiteLLM Proxy: Run the proxy in the foreground.
- Start LiteLLM Proxy (BG): Run the proxy in the background with logging.
- Test LiteLLM Proxy: Send a test request to the proxy.
- Start Cursor: Launch the Cursor editor (if installed).
- Stop LiteLLM Proxy: Stop the running proxy.
- LiteLLM Proxy Status: Check if the proxy is running.
- Exit: Quit the service.
- If you see errors about missing commands, ensure all prerequisites are installed and your environment is activated.
- For environment issues, check your
.envfile insrc/config/. - For proxy issues, check logs in the
./.logdirectory.
Q: How do I add a new model? A: Use menu option [2] and provide the model name and Modelfile path.
Q: How do I change the proxy port?
A: Edit LITELLM_PORT in src/config/.env or src/common.sh and restart the proxy.
Q: How do I integrate with Cursor? A: Use menu option [10]. Ensure Cursor is installed at the default path.