Skip to content

LiteLLMTeam ​

Creates and manages a team with budget limits, rate limits, and configurable member management.

API Version: litellm.palena.ai/v1alpha1Kind: LiteLLMTeamShort Name: lt

Example ​

yaml
apiVersion: litellm.palena.ai/v1alpha1
kind: LiteLLMTeam
metadata:
  name: engineering
spec:
  instanceRef:
    name: my-gateway
  teamAlias: engineering
  models:
    - gpt-4o
    - claude-4-sonnet
  maxBudgetMonthly: 1000
  budgetDuration: "30d"
  rpmLimit: 200
  tpmLimit: 50000
  tags: ["paid"]
  memberManagement: mixed
  members:
    - email: lead@example.com
      role: admin
    - email: dev@example.com
      role: user

Per-Team Logging Example ​

Route logs for a team to a dedicated Langfuse project (enterprise):

yaml
apiVersion: litellm.palena.ai/v1alpha1
kind: LiteLLMTeam
metadata:
  name: engineering
spec:
  instanceRef:
    name: my-gateway
  teamAlias: engineering
  logging:
    callbacks:
      - name: langfuse
        type: success_and_failure
        credentialsSecretRef:
          name: engineering-langfuse
        config:
          langfuse_host: "https://cloud.langfuse.com"
---
apiVersion: v1
kind: Secret
metadata:
  name: engineering-langfuse
stringData:
  langfuse_public_key: "pk-team-engineering"
  langfuse_secret: "sk-team-engineering"

Disable all logging for a team (GDPR compliance):

yaml
apiVersion: litellm.palena.ai/v1alpha1
kind: LiteLLMTeam
metadata:
  name: gdpr-team
spec:
  instanceRef:
    name: my-gateway
  teamAlias: gdpr-team
  logging:
    disabled: true

Spec Fields ​

FieldTypeRequiredDefaultDescription
instanceRefInstanceRefYes—Reference to the LiteLLMInstance
organizationRef*OrganizationRefNo—Reference to a LiteLLMOrganization in the same namespace
teamIdstringNo—Pins the LiteLLM team_id. An existing team with this id is adopted instead of duplicated; otherwise the team is created with it. See Adopting Existing Teams
teamAliasstringYes—Human-readable team name
models[]stringNo—Models this team can access
maxBudgetMonthly*float64No—Maximum monthly budget in USD
budgetDurationstringNo—Budget reset period (e.g., 30d, 7d)
tpmLimit*intNo—Tokens per minute limit
rpmLimit*intNo—Requests per minute limit
teamMemberRpmLimit*intNo—Per-member RPM limit
teamMemberTpmLimit*intNo—Per-member TPM limit
teamMemberBudget*float64No—Per-member max budget in USD (distinct from the team-wide maxBudgetMonthly); resets on budgetDuration
metadatamap[string]stringNo—Custom metadata
blocked*boolNo—Disable all requests from this team without deleting it
softBudget*float64No—Alert threshold in USD below maxBudgetMonthly (does not block)
modelRpmLimitmap[string]intNo—Per-model requests-per-minute caps (model name → RPM)
modelTpmLimitmap[string]intNo—Per-model tokens-per-minute caps (model name → TPM)
objectPermission*ObjectPermissionNo—Grant access to MCP servers, vector stores, agents, access groups
tags[]stringNo—Tags for tag-based routing (keys inherit these tags)
maxParallelRequests*intNo—Maximum concurrent requests for this team
guardrails[]stringNo—Names of LiteLLMGuardrail CRs this team opts into. Each entry must match spec.guardrailName on a guardrail bound to the same instance (enterprise)
logging*TeamLoggingSpecNo—Per-team logging configuration (enterprise). See below
memberManagementstringNomixedcrd, sso, or mixed
members[]TeamMemberNo—Team members list

logging ​

Per-team logging configuration (enterprise). Enables routing logs to team-specific provider instances (e.g., separate Langfuse projects) and GDPR-compliant logging disable.

FieldTypeDefaultDescription
disabledboolfalseDisable all logging for this team (GDPR compliance). When true, no request/response data is logged
callbacks[]TeamCallback—Team-specific logging callbacks

TeamCallback:

FieldTypeDefaultDescription
namestring—Callback provider: langfuse, gcs_bucket, langsmith, arize (required)
typestringsuccess_and_failureWhen to invoke: success, failure, success_and_failure
credentialsSecretRefSecretRef—Reference to a Secret containing provider credentials (required)
configmap[string]string—Additional provider-specific configuration merged with Secret data

Credentials Secret keys by provider:

ProviderExpected Secret Keys
langfuselangfuse_public_key, langfuse_secret, langfuse_host (optional)
gcs_bucketgcs_bucket_name, gcs_path_service_account (optional)
langsmithlangsmith_api_key, langsmith_project
arizearize_api_key, arize_space_key

members[] ​

FieldTypeDefaultDescription
emailstring—User email address
rolestringuseradmin or user

Status Fields ​

FieldTypeDescription
syncedboolWhether the team is synced to LiteLLM
litellmTeamIdstringLiteLLM-assigned team ID
currentSpend*float64Current spend in USD
loggingSyncedboolWhether team logging callbacks are synced
loggingDisabledboolWhether logging is disabled for this team (GDPR)
totalMemberCountintTotal members (CRD + SSO)
crdMembers[]TeamMemberStatusMembers managed by the CRD
ssoMembers[]TeamMemberStatusMembers provisioned by SSO
lastSyncTime*TimeLast successful sync time
conditions[]ConditionStandard conditions
bash
kubectl get lt
NAME          ALIAS         MEMBERS   MEMBERMGMT   SYNCED   AGE
engineering   engineering   5         mixed        true     2d

Member Management ​

See Team Member Management for a detailed explanation of the three modes.

Adopting Existing Teams ​

LiteLLM does not treat team_alias as unique, so a LiteLLMTeam for a team that already exists (made in the Admin UI, or before the operator was installed) would otherwise create a second team with the same alias. Set teamId to the existing team's id to bring it under the CR instead:

yaml
apiVersion: litellm.palena.ai/v1alpha1
kind: LiteLLMTeam
metadata:
  name: engineering
spec:
  instanceRef:
    name: my-gateway
  teamId: 3f2b6c1e-0000-4000-8000-000000000000  # id of the existing team
  teamAlias: engineering
  models: [gpt-4o]

WARNING

Adoption takes the team over, so a LiteLLMTeam in another namespace can only reference an instance that lists LiteLLMTeam in spec.allowedNamespaces.kinds. Listing it lets that namespace adopt any team on the proxy by id.

The first time it reconciles the CR, the operator looks up teamId:

/team/info resultWhat happens
Team foundAdopted: the id is recorded, the CR is annotated litellm.palena.ai/adopted: "true", and the team is updated to match the spec
404The team is created with that team_id
Any other errorNothing is created; the reconcile is retried

An adopted team is never deleted from LiteLLM when its CR is deleted. The operator did not create it, and the keys and spend history attached to it cannot be recreated. Teams the operator created are deleted on CR deletion as before.

Adoption applies the whole spec to the existing team, including membership. With the default memberManagement: mixed, members are only added. With memberManagement: crd, members of the existing team who are not listed in members are removed, so list them before adopting a team in that mode.

Released under the Apache 2.0 License.