LiteLLM — Configuring Local LLM and MiniMax
How to add both a local Ollama model and the MiniMax cloud API to a single LiteLLM config.yaml.
Why / When to Use
Use when you want LiteLLM proxy to serve multiple backends (local inference + cloud API) under one unified OpenAI-compatible endpoint.
Core Config
Ollama (local LLM)
model_list:
- model_name: my-local-llama
litellm_params:
model: ollama/llama3.1:8b
api_base: http://localhost:11434Requires ollama serve to be running before starting the proxy.
LM Studio or other OpenAI-compatible local server
model_list:
- model_name: my-local-model
litellm_params:
model: openai/your-model-name
api_base: http://localhost:1234/v1
api_key: none # required field but value doesn't matterMiniMax (cloud API)
model_list:
- model_name: minimax-m2-5
litellm_params:
model: minimax/MiniMax-Text-01
api_key: os.environ/MINIMAX_API_KEYSet the env var before starting the proxy:
export MINIMAX_API_KEY=your-minimax-api-key
litellm --config config.yamlCombined config (local + MiniMax)
model_list:
- model_name: my-local-llama
litellm_params:
model: ollama/llama3.1:8b
api_base: http://localhost:11434
- model_name: minimax-m2-5
litellm_params:
model: minimax/MiniMax-Text-01
api_key: os.environ/MINIMAX_API_KEYTesting
# Test local model
curl http://0.0.0.0:4000/chat/completions \
-H "Authorization: Bearer sk-your-proxy-key" \
-d '{"model": "my-local-llama", "messages": [{"role": "user", "content": "Hello"}]}'
# Test MiniMax
curl http://0.0.0.0:4000/chat/completions \
-H "Authorization: Bearer sk-your-proxy-key" \
-d '{"model": "minimax-m2-5", "messages": [{"role": "user", "content": "Hello"}]}'Gotchas
- Ollama must be running (
ollama serve) before LiteLLM starts; otherwise requests to that model fail immediately. api_key: noneis still required for OpenAI-compatible local servers — omitting it causes a validation error.- MiniMax model name in
litellm_paramsusesminimax/prefix; themodel_namealias can be anything.
Source
Conversation: “Configuring local LLM and Minimax on LiteLLM” — 2026-05-29