Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8c20b55
feat(proxy): push-based OTLP billable-request metering for enterprise…
yassin-berriai Jun 29, 2026
fb1c18b
fix(proxy): align billable-request metering with the global collector
yassin-berriai Jul 7, 2026
87adc8f
fix(proxy): wrap enterprise billing import in try-except per code-qua…
yassin-berriai Jul 7, 2026
dd263fd
chore: satisfy strict lint gates in billing modules
yassin-berriai Jul 7, 2026
6484270
fix(proxy): bill provider passthrough, search, and rag routes
yassin-berriai Jul 7, 2026
3f76aca
fix(proxy): bill MCP and A2A requests by protocol transport routes only
yassin-berriai Jul 8, 2026
6f12dda
fix(proxy): harden billable-request classification and recorder lifec…
yassin-berriai Jul 9, 2026
b64f299
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
yassin-berriai Jul 9, 2026
291cfbf
chore(ui): regenerate eslint metrics after staging merge
yassin-berriai Jul 9, 2026
b25c2d2
docs(proxy): state the lower-bound billing contract in middleware com…
yassin-berriai Jul 9, 2026
3271c0f
fix(proxy): bill mcp-rest tool calls and bare a2a agent invokes
yassin-berriai Jul 9, 2026
2e50567
fix(proxy): flush billable-request counts on proxy shutdown
yassin-berriai Jul 9, 2026
382d11b
fix(proxy): stop billing bare a2a task RPCs and close the shutdown race
yassin-berriai Jul 9, 2026
f0b217f
test(proxy): stub the OTLP exporter in the recorder-build test
yassin-berriai Jul 9, 2026
4f7f706
fix(helm): truncate the helm.sh/chart label to 63 bytes
yassin-berriai Jul 9, 2026
1b91dd4
feat(proxy): accept inline PEM for the billing-metrics mTLS credentials
yassin-berriai Jul 9, 2026
91f5e26
feat(helm): add first-class billingMetrics values to the componentize…
yassin-berriai Jul 9, 2026
1023072
feat(terraform): billing-metrics variables for the aws and gcp templates
yassin-berriai Jul 9, 2026
f77c13e
feat(helm): add billingMetrics values to the classic chart
yassin-berriai Jul 9, 2026
a5b0f7c
test(helm): pin that the migrations job never mounts the billing cert
yassin-berriai Jul 9, 2026
37c6bad
fix(helm): meter the backend too, it serves the MCP transport
yassin-berriai Jul 9, 2026
269ee7e
fix(proxy): never log billing credential values when they fail to res…
yassin-berriai Jul 9, 2026
baba77b
Revert "fix(helm): truncate the helm.sh/chart label to 63 bytes"
yassin-berriai Jul 9, 2026
533b62c
feat(helm): default billingMetrics.secretName to the conventional name
yassin-berriai Jul 9, 2026
f80510e
feat(proxy): log once when billing metrics are actually enabled
yassin-berriai Jul 9, 2026
726eb1d
fix(terraform): fail the plan on a partial billing-metrics config
yassin-berriai Jul 9, 2026
5933294
docs(terraform): record why the billing guard sits on the gateway res…
yassin-berriai Jul 9, 2026
534ddfd
fix(terraform): guard the backend against a partial billing config too
yassin-berriai Jul 9, 2026
c109489
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
yassin-berriai Jul 15, 2026
c6bb384
docs(team): document mcp_rpm_limit in update_team docstring
yassin-berriai Jul 15, 2026
6d0a044
chore(ui): regenerate schema.d.ts for update_team docstring change
yassin-berriai Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions helm/litellm-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ If `db.useStackgresOperator` is used (not yet implemented):
| `pdb.annotations` | Extra metadata annotations to add to the PDB | `{}` |
| `pdb.labels` | Extra metadata labels to add to the PDB | `{}` |

| `billingMetrics.enabled` | Enable enterprise billable-request metering. Requires an enterprise license. | `false` |
| `billingMetrics.endpoint` | Collector that the billable-request counter is pushed to. | `https://telemetry.litellm.ai` |
| `billingMetrics.secretName` | Name of an existing Secret holding the mTLS client certificate, under the keys `tls.crt` and `tls.key`. | `litellm-billing-metrics-mtls` |
| `billingMetrics.caSecretName` | Name of an existing Secret holding a CA bundle under the key `ca.crt`. Only needed for a private or test collector whose server certificate is not on the public web PKI. | `""` |
| `billingMetrics.exportIntervalMs` | How often the counter is pushed, in milliseconds. The proxy defaults to `60000` when unset. | `""` |

#### Example `proxy_config` ConfigMap from values (default):

```
Expand Down Expand Up @@ -94,6 +100,21 @@ data:
type: Opaque
```

#### Enterprise billable-request metering

Enterprise licenses meter billable requests by pushing a counter to LiteLLM's collector over mutual TLS. The chart does not create the client certificate; it mounts one you already hold, read-only, so the private key is never exposed through the environment. Create the Secret under the name the chart expects, then turn the block on:

```
kubectl create secret tls litellm-billing-metrics-mtls --cert=client.crt --key=client.key
```

```
billingMetrics:
enabled: true
```

Set `billingMetrics.caSecretName` only when the collector is a private or test one whose server certificate is not on the public web PKI; the production collector needs no CA override. The chart fails the render rather than deploying a proxy that silently never exports, so a missing `secretName` or an emptied `endpoint` surfaces at `helm install` time.

### Database Settings

| Name | Description | Value |
Expand Down
47 changes: 47 additions & 0 deletions helm/litellm-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,53 @@ app.kubernetes.io/name: {{ include "litellm.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Enterprise billable-request metering. The client certificate identifies the
deployment to LiteLLM's collector, so it is mounted read-only from an existing
Secret rather than passed through the environment.
*/}}
{{- define "litellm.billingMetrics.certDir" -}}/etc/litellm/billing-mtls{{- end -}}
{{- define "litellm.billingMetrics.caDir" -}}/etc/litellm/billing-mtls-ca{{- end -}}

{{- define "litellm.billingMetricsEnv" -}}
- name: LITELLM_BILLING_METRICS_ENDPOINT
value: {{ required "billingMetrics.endpoint is required when billingMetrics.enabled is true" .Values.billingMetrics.endpoint | quote }}
- name: LITELLM_BILLING_METRICS_CLIENT_CERT
value: {{ printf "%s/tls.crt" (include "litellm.billingMetrics.certDir" .) | quote }}
- name: LITELLM_BILLING_METRICS_CLIENT_KEY
value: {{ printf "%s/tls.key" (include "litellm.billingMetrics.certDir" .) | quote }}
{{- if .Values.billingMetrics.caSecretName }}
- name: LITELLM_BILLING_METRICS_CA_CERT
value: {{ printf "%s/ca.crt" (include "litellm.billingMetrics.caDir" .) | quote }}
{{- end }}
{{- with .Values.billingMetrics.exportIntervalMs }}
- name: LITELLM_BILLING_METRICS_EXPORT_INTERVAL_MS
value: {{ . | quote }}
{{- end }}
{{- end -}}

{{- define "litellm.billingMetricsVolumes" -}}
- name: billing-metrics-mtls
secret:
secretName: {{ required "billingMetrics.secretName is required when billingMetrics.enabled is true (an existing Secret with tls.crt and tls.key)" .Values.billingMetrics.secretName }}
{{- if .Values.billingMetrics.caSecretName }}
- name: billing-metrics-mtls-ca
secret:
secretName: {{ .Values.billingMetrics.caSecretName }}
{{- end }}
{{- end -}}

{{- define "litellm.billingMetricsVolumeMounts" -}}
- name: billing-metrics-mtls
mountPath: {{ include "litellm.billingMetrics.certDir" . }}
readOnly: true
{{- if .Values.billingMetrics.caSecretName }}
- name: billing-metrics-mtls-ca
mountPath: {{ include "litellm.billingMetrics.caDir" . }}
readOnly: true
{{- end }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
Expand Down
9 changes: 9 additions & 0 deletions helm/litellm-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ spec:
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.billingMetrics.enabled }}
{{- include "litellm.billingMetricsEnv" . | nindent 12 }}
{{- end }}
{{- if .Values.migrationJob.enabled }}
# Schema updates are owned by the dedicated migrations Job; skip
# the proxy's startup `prisma db push` so N replicas don't race
Expand Down Expand Up @@ -220,6 +223,9 @@ spec:
- name: npm
mountPath: /.npm
{{- end }}
{{- if .Values.billingMetrics.enabled }}
{{- include "litellm.billingMetricsVolumeMounts" . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -252,6 +258,9 @@ spec:
items:
- key: {{ .Values.proxyConfigMap.key | default "config.yaml" }}
path: "config.yaml"
{{- if .Values.billingMetrics.enabled }}
{{- include "litellm.billingMetricsVolumes" . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Loading
Loading