Skip to content
Back to skills

Litellm Knowledge Patch

ASecurity

LiteLLM

  • 25 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentspythonrustrailsdockerazuregitapidatabasesecurity

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill litellm-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Litellm Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Litellm Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-litellm-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-litellm-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: litellm-knowledge-patch
description: LiteLLM
version: "1.111.1"
license: MIT
metadata:
  author: Nevaberry
---



# LiteLLM knowledge patch

Load this skill when configuring or upgrading the LiteLLM proxy or SDK,
managing virtual keys and budgets, or working on routing, protocol bridges,
MCP access, guardrails, and operational diagnostics.
Use the topic references for complete configuration details and examples.

## Reference index

| Reference | Topics |
| --- | --- |
| [Deployment configuration](references/deployment-configuration.md) | Configuration sources, credentials, database connections, migrations, runtime, containers, Helm, image verification |
| [Identity, budgets, and keys](references/identity-budgets-and-keys.md) | Ownership, permissions, key hooks and rotation, tags, budgets, teams, JWT, dashboard and CLI access |
| [Operations and observability](references/operations-and-observability.md) | Worker jobs, admission, health checks, Redis, costs, spend logs, audit records, OpenTelemetry |
| [Providers, protocols, and MCP](references/providers-protocols-and-mcp.md) | Protocol bridges, streams, provider adapters, native endpoints, MCP authentication and tools, guardrails |
| [Proxy security and networking](references/proxy-security-and-networking.md) | Validation, file ownership, payload limits, authentication, SSO, response IDs, cookies, outbound proxies |
| [Routing and resilience](references/routing-and-resilience.md) | Fallbacks, retries, cooldowns, deployment limits, strategies, groups, affinity, complexity routing |

## Upgrade checks and deprecations

### Cache, Helm, and SDK runtime

- In v1.109.0, `cache_params.type: disk` prevents proxy startup. Set the type
  to `local` or `redis` before upgrading.
- Remove `lensWorker.enabled` before upgrading to v1.106.7 so the chart renders.
  In v1.109.0, deploy Lens from its own chart and connect it with proxy-chart `lens.*` values.
- Version v1.109.0 supports Python 3.15. `import litellm` raises `ImportError`
  when the installation lacks the `_native` extension.
- The slim UI image removes `curl` in v1.108.11, v1.109.2, and v1.110.1.
  Use `wget` or `nc` for in-container probes.

### Router and batch configuration

- Starting in v1.109.0, router initialization rejects string-valued fallback targets.
  Change `fallbacks: [{chat: backup}]` to `fallbacks: [{chat: [backup]}]`.
- In v1.109.0, `enable_pre_call_checks` no longer filters deployments by RPM.
  Add `enforce_model_rate_limits` to `router_settings.optional_pre_call_checks`
  for a hard deployment RPM cap. The check also supports daily `rpd` and `tpd` limits.
- `general_settings.skip_batch_input_file_rate_limiting_for_models` is deprecated,
  has no effect, and emits a startup warning. Use
  `skip_batch_input_file_rate_limiting_for_providers` for provider-specific TPM/RPM
  exemptions; those exemptions still read files for keys with a model allowlist.
- In v1.109.0, custom cost maps should use `max_input_tokens` and
  `max_output_tokens` in place of the removed `max_tokens` field.

### Credentials and request validation

- In v1.106.9 and v1.108.6, model and pass-through routes reject top-level
  `tenant_id`, `client_id`, `client_secret`, `azure_username`, `azure_password`,
  and `azure_scope`. If used as request tags, put them under `metadata`.
- Starting in v1.108.11, only proxy administrators can write `os.environ/`
  references in team models; team administrators receive HTTP `403`.
- In v1.108.15, keyless JSON-configured deployments affected by the new
  credential check return HTTP `401`. Supply a deployment `api_key` or the
  provider's API key environment variable.
- Starting in v1.108.16, affected `azure` deployments with a `/openai/v1` base
  need a deployment `api_key` or `AZURE_API_KEY`; update deployments that
  previously inherited `OPENAI_API_KEY`.
- In v1.109.0, `/v1/images/generations` requires `model`; omission returns HTTP `400`.

### Key permissions and pagination

- In v1.109.0, `/key/update` requires admin rights for `budget_duration` and
  `budget_id`. An opt-in allows owners to edit `max_budget` and `budget_limits`.
- In v1.108.17, non-admin owners cannot clear `max_budget`: they receive HTTP `403`.
  An administrator must remove the cap.
- In v1.109.0, customer lists default to 50 entries per page and accept sizes
  from 1 to 100. Fetch subsequent pages when all customers are needed.

### Verify release images

Starting with v1.106.11, v1.108.10, v1.109.2, and v1.110.1, verify images
against the release workflow's certificate identity and OIDC issuer.
Apply the same flags to database, non-root, and Docker Hub images.

```sh
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.108.10
```

Earlier image and chart signing keys, root CA removal, migration checks,
and vector-store cleanup are detailed in the deployment reference.

## Protocol translation and streaming

- On v1.108.7 and v1.109.0, Responses-only fields such as `max_tool_calls`
  return HTTP `400` when `/v1/responses` uses the Chat Completions bridge.
  Remove them or enable `drop_params: true`. Since v1.108.2, the same choices
  apply to hosted MCP tools that a translated route cannot run.
- Starting in v1.109.0, requests to newer deployments that retired sampling
  controls must omit `temperature`, `top_p`, and `top_k` or use `drop_params: true`.
- In v1.108.18, chat-bridged `/v1/responses` rejects an unknown
  `previous_response_id` with HTTP `400`.
- In v1.108.18, `/v1/messages` rejects text blocks whose text is null or numeric
  with HTTP `400`; `drop_params: true` can still discard those blocks.
- In v1.109.0, interrupted Chat Completions streams can continue on a configured
  fallback after partial output. On `/v1/responses`, v1.110.2 stops retrying after
  output reaches the client, including reasoning, and prevents a second response
  from starting on a fallback group.
- In v1.109.0, a stream ending without a finish reason is an error. Stalled
  Chat Completions, Messages, or Responses reads raise `litellm.Timeout` with HTTP `408`.
- Resume a background Responses stream in v1.109.0 with `stream=true` and
  `starting_after` set to the last received event's sequence number:
  `GET /v1/responses/resp_123?stream=true&starting_after=12`.

## Routing and resilience

### Deployment limits and failover

`enforce_model_rate_limits` enforces deployment `rpm` and `tpm` before sending
requests upstream. RPM uses the configured ceiling; TPM uses tokens counted
after completed calls, so one call can push usage over the cap before the next
is blocked. Separate input and output limits use `itpm` and `otpm`.
Rejections return HTTP `429` with `Retry-After: 60`.

```yaml
router_settings:
  optional_pre_call_checks: [enforce_model_rate_limits]
```

`num_retries` applies within each model group before the next fallback.
The proxy resolves it from `x-litellm-num-retries`, the request body, the
deployment's `litellm_params`, then `litellm_settings`, in descending priority.
The provider SDK's `max_retries` is fixed at `0`; use `num_retries: 0` to
disable router retries and `retry_after` for the minimum retry delay in seconds.

Set `general_settings.enforce_fallback_model_access: true` to check the caller's
key, team, and project permissions on router-configured fallback models.
If all fallbacks are excluded, the proxy returns the primary error.

### Groups, priorities, and affinity

- `routing_groups` can apply strategies to selected request model names.
  A group's `group_name` is also callable as `model`, with its own model-list entry
  and key or team grant.
- `litellm_params.order` tries lower deployment tiers first, with retries per
  tier and model-group fallbacks after all tiers are exhausted.
- In v1.109.0, `x-litellm-priority: 2` sets request scheduling priority;
  `router_settings.default_priority` covers requests without an explicit priority.
- In v1.109.0, opt-in session repinning lets later turns stay with a successful
  replacement deployment after failover.
- In v1.110.3, a complexity-routed request can use the selected model's fallbacks
  when that model is on cooldown.

## Virtual keys and budgets

With Postgres configured, create a tag through `POST /tag/new`:

```json
{"name": "engineering", "max_budget": 500, "budget_duration": "30d"}
```

Attach it with `{"tags": ["engineering"]}` in `/key/generate` or `/key/update`;
key `metadata.tags` also works. Requests inherit key tags. Individual requests
can use `metadata.tags` or `x-litellm-tags`. Any over-budget tag causes
`budget_exceeded`. `general_settings.reject_clientside_metadata_tags: true`
rejects client `metadata.tags` while allowing inherited virtual-key metadata tags.

Key ownership controls management-route roles. Use `allowed_routes` to restrict
a key even when its owner is `proxy_admin`. Custom-auth common model, budget,
and rate-limit checks default to off; enable them with
`general_settings.custom_auth_run_common_checks: true`.

## Configuration and MCP

- Named connections use top-level `credential_list` and deployment
  `litellm_params.litellm_credential_name`. Values accept `os.environ/` references;
  `credential_info` is required even when empty.
- `database_connection_pool_limit` under `general_settings` defaults to ten
  connections per worker. Multiply by workers across replicas for the database
  connection budget.
- Use `true_passthrough` or `oauth_delegate` when clients hold upstream MCP
  credentials. Client-forwarded pass-through calls relay upstream HTTP `401`.
- Gateway-owned registration for new clientless MCP DCR bridges is opt-in in
  v1.108.16, v1.109.4, and v1.110.3. Set `LITELLM_MCP_DCR_GATEWAY_CLIENT=true`
  to keep automatic gateway-owned registration.
- Set `PROXY_BASE_URL` to the browser-visible origin, using only scheme, host,
  and any non-default port. MCP OAuth has trusted-forwarding conditions when unset.
- In v1.109.0, admin-owned team keys can access only their team's MCP servers
  and toolsets. A tool in both `allowed_tools` and `disallowed_tools` is denied.
- If MCP semantic filtering exceeds its context window, the gateway returns
  the error and withholds the unfiltered tool list.

## Operations and observability

- In v1.109.0, `LITELLM_OFFLINE_MODE=true` disables the proxy's own outbound
  fetches; `LITELLM_DISABLE_LATEST_RELEASE_CHECK=true` disables only the release check.
- `LITELLM_JOB_ROLE=serving` leaves single-owner jobs to a dedicated
  `LITELLM_JOB_ROLE=worker` deployment. The default `all` and `worker` register every job.
- LiteLLM resolves `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` for aiohttp by
  default. `DISABLE_AIOHTTP_TRUST_ENV=True` turns off this proxy resolution.
  `AIOHTTP_TRUST_ENV=True` enables environment handling in the aiohttp session.
- `store_prompts_in_spend_logs` also controls retention of `guardrail_information`.
  In v1.109.0, `maximum_spend_logs_size` enables size-based retention and deletes
  the oldest logs first when exceeded.
- In v1.108.21 and v1.111.1, failed requests no longer produce zero-cost rows
  in spend logs or daily usage.
- Query proxy error details under `litellm.*`; failed calls emit
  `gen_ai.client.operation.exception`, and streaming spans report
  `gen_ai.response.time_to_first_chunk`.
- `OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental` enables newer
  GenAI conventions: spans use `{operation} {model}`, carry `gen_ai.provider.name`,
  and omit `raw_gen_ai_request`.

Files in this skill

  • SKILL.md9.4 KB
  • coverage.json1.1 KB
  • references/deployment-configuration.md3.6 KB
  • references/identity-budgets-and-keys.md7.1 KB
  • references/operations-and-observability.md3.8 KB
  • references/providers-protocols-and-mcp.md4.4 KB
  • references/proxy-security-and-networking.md4.3 KB
  • references/routing-and-resilience.md8.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.