{"slug":"litellm","name":"LiteLLM","kind":"runbook","what":"One OpenAI-format API (SDK or proxy) in front of 100+ providers, including your local models.","page":"https://insidethemachine.ai/setups/litellm","status":"docs-checked","status_label":"Not run: commands checked against the official docs only","status_note":"Commands checked against the official docs on 2026-10-15. Not run end to end.","wrapper":"The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.","wrapper_tested":null,"sh":"https://insidethemachine.ai/install/litellm.sh","ps1":"https://insidethemachine.ai/install/litellm.ps1","md":"https://insidethemachine.ai/install/litellm.md","json":"https://insidethemachine.ai/install/litellm.json","one_liner":"curl -fsSL https://insidethemachine.ai/install/litellm.sh | bash","one_liner_windows":"irm https://insidethemachine.ai/install/litellm.ps1 | iex","actions":{"install":"curl -fsSL https://insidethemachine.ai/install/litellm.sh | bash","plan":"curl -fsSL https://insidethemachine.ai/install/litellm.sh | bash -s -- plan","verify":"curl -fsSL https://insidethemachine.ai/install/litellm.sh | bash -s -- verify","rollback":"curl -fsSL https://insidethemachine.ai/install/litellm.sh | bash -s -- rollback --yes"},"env":{"ITM_RAM":"memory in GB instead of detecting it"},"model_by_memory_gb":null,"low_memory":null,"platforms":{"macos":{"install":[{"title":"Install LiteLLM","lines":[{"k":"mac","c":"brew install uv"},{"k":"run","c":"uv tool install 'litellm[proxy]'"}]},{"title":"Configure (your choices)","lines":[{"k":"you","c":"cat > litellm.yaml <<'EOF'\nmodel_list:\n  - model_name: \"local-llama\"\n    litellm_params:\n      model: \"ollama_chat/llama3.1\"\nEOF","why":"maps a local Ollama model to a proxy alias (format from LiteLLM's Ollama docs)"},{"k":"you","c":"litellm --config litellm.yaml","why":"proxy on http://0.0.0.0:4000"}]}],"verify":[{"run":"curl -s http://0.0.0.0:4000/chat/completions -H 'Content-Type: application/json' -d '{\"model\":\"local-llama\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}'","expect":"OpenAI-format JSON response; add an Authorization header if you set a master key"}],"rollback":[{"k":"run","c":"uv tool uninstall litellm"},{"k":"run","c":"rm litellm.yaml"}]},"linux":{"install":[{"title":"Install LiteLLM","lines":[{"k":"run","c":"uv tool install 'litellm[proxy]'"}]},{"title":"Configure (your choices)","lines":[{"k":"you","c":"cat > litellm.yaml <<'EOF'\nmodel_list:\n  - model_name: \"local-llama\"\n    litellm_params:\n      model: \"ollama_chat/llama3.1\"\nEOF","why":"maps a local Ollama model to a proxy alias (format from LiteLLM's Ollama docs)"},{"k":"you","c":"litellm --config litellm.yaml","why":"proxy on http://0.0.0.0:4000"}]}],"verify":[{"run":"curl -s http://0.0.0.0:4000/chat/completions -H 'Content-Type: application/json' -d '{\"model\":\"local-llama\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}'","expect":"OpenAI-format JSON response; add an Authorization header if you set a master key"}],"rollback":[{"k":"run","c":"uv tool uninstall litellm"},{"k":"run","c":"rm litellm.yaml"}]},"windows":{"install":[{"title":"Install LiteLLM","lines":[{"k":"run","c":"uv tool install \"litellm[proxy]\""}]}],"verify":[{"run":"curl -s http://0.0.0.0:4000/chat/completions -H 'Content-Type: application/json' -d '{\"model\":\"local-llama\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}'","expect":"OpenAI-format JSON response; add an Authorization header if you set a master key","you":true}],"rollback":[{"k":"run","c":"uv tool uninstall litellm"},{"k":"you","c":"rm litellm.yaml","why":"macOS/Linux command; do the same by hand"}]}}}