$npx -y skills add BerriAI/litellm-skills --skill delete-modelDelete a model from a live LiteLLM proxy. Asks for the model name or model_id and confirms before calling POST /model/delete. Use when the user wants to remove, delete, or unregister a model from a LiteLLM proxy instance.
| 1 | # Delete Model |
| 2 | |
| 3 | Remove a model from a live LiteLLM proxy. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ``` |
| 8 | LITELLM_BASE_URL — e.g. https://my-proxy.example.com |
| 9 | LITELLM_API_KEY — proxy admin key |
| 10 | ``` |
| 11 | |
| 12 | ## Ask the user |
| 13 | |
| 14 | 1. **Model name or model_id** — if they give a name, look up the ID first: |
| 15 | ```bash |
| 16 | curl -s "$BASE/model/info" -H "Authorization: Bearer $KEY" | python3 -c " |
| 17 | import sys,json |
| 18 | for m in json.load(sys.stdin).get('data',[]): |
| 19 | print(m['model_info']['id'], m['model_name']) |
| 20 | " |
| 21 | ``` |
| 22 | 2. **Confirm** — show the model name and ask for confirmation before deleting. |
| 23 | |
| 24 | ## Run |
| 25 | |
| 26 | ```bash |
| 27 | curl -s -X POST "$BASE/model/delete" \ |
| 28 | -H "Authorization: Bearer $KEY" \ |
| 29 | -H "Content-Type: application/json" \ |
| 30 | -d '{"id": "<model_id>"}' |
| 31 | ``` |
| 32 | |
| 33 | ## Output |
| 34 | |
| 35 | Show the success message. Warn the user that any keys scoped to this model name will start getting errors. |