LiteLLM audit logs

LiteLLM audit logs record who created, changed, deleted or regenerated keys, teams, users and models, but they only name a person when that person signs in through SSO. This page covers the Enterprise requirement, the settings, S3 export and the work to plan.

On this page

LiteLLM audit logs: who changed keys, teams and models

LiteLLM audit logs record create, update, delete and regenerate actions on keys, teams, users and models, along with who performed each action, and they require a LiteLLM Enterprise license. Use this section to decide whether your shared gateway needs that trail before an access review or audit asks who issued a key or changed a team's model access. For most shared proxies the answer is yes. If several people can mint keys, change budgets or alter which models a team can call, you cannot reliably reconstruct those changes from memory, chat threads or the spend log alone.

The log only names people when each person signs in with their own identity. If operators share the UI_USERNAME and UI_PASSWORD pair or the master key, the Admin UI treats every session as proxy admin, and the audit entry records that shared identity instead of the individual. Per-person sign-in therefore comes before the audit trail. Plan single sign-on for the Admin UI with Google, Microsoft Entra ID, Okta or a generic OIDC provider first. Confirm with LiteLLM how SSO is licensed for your user count, since from v1.76.0 SSO is free for up to 5 users and an Enterprise license is needed beyond that.

Teams usually need the trail when the gateway serves more than one group, when prompts or responses may contain regulated data, or when access reviews must show who granted model access and when. Ask the platform owner to list every action that changes a key's budget, a team's membership or a model's availability, and check whether each one would appear in the log with a named operator. If an access review question can only be answered from tickets or memory, the gateway is a candidate for audit logging now.

A single-operator test gateway, used by one engineer against sandbox provider keys with no customer data, rarely needs the trail yet. Spend that effort on keeping the gateway on a supported release line and on an accurate inventory of its keys. Watch for drift, though. Once a second person receives the master key or a team starts issuing keys from the gateway, the audit requirement arrives without a plan. Set a clear trigger, such as a second operator or the first production key, that starts the Enterprise and SSO work.

Before you commit, ask LiteLLM to confirm which events your installed version records, how the Enterprise license covers your deployment and what storage you must provide. Audit logs are on by default with an Enterprise license, but store_audit_logs in litellm_settings and the LITELLM_STORE_AUDIT_LOGS variable let you set the behavior explicitly, so record which one your team uses and why. Verify these setting names against the release you deploy, because they can change between versions.

Audit log settings and export choices compared

This table compares the explicit on and off setting, the default behavior with an Enterprise license, and S3 export through the s3_v2 callback. Read each row for when the option fits and what it changes in daily operations, then check flag names and callback names against the release you run. The main takeaway is that the trail requires an Enterprise license, and it can only name people once SSO is in place.

OptionWhen it fitsWhat it changes in operationsWhat to confirm in release notes
store_audit_logs: true or LITELLM_STORE_AUDIT_LOGS onEnterprise deployments that want the setting written into configuration for reviewMakes the intent explicit in config files and environment variables, so an auditor can see it without reading defaultsThat the setting name and environment variable still match the current release
store_audit_logs: false or LITELLM_STORE_AUDIT_LOGS offRare cases where your policy rules out storing management action records in the gatewayCreate, update, delete and regenerate actions on keys, teams, users and models are no longer recorded for later reviewWhether turning audit logs off affects other stored data, and whether your retention obligations still require a trail
Default behavior with an Enterprise licenseEnterprise deployments that accept the defaultsRecords start without a configuration change, so a new environment can record actions that nobody configured on purposeThe default state in the release you run, since it can change between minor versions
Open source without an Enterprise licenseTeams evaluating the open source build onlyNo audit log record is available for key, team, user or model changes, so change history must come from elsewhereWhich features still require Enterprise, and whether the Enterprise license terms match your use
S3 export with audit_log_callbacks set to s3_v2Organizations that need a copy outside the gateway database for retention, legal hold or a SIEMWrites JSON files under audit_logs/ with a date folder in your bucket, so you own bucket access, encryption, lifecycle rules and IAMThe callback name, the required S3 settings, and whether export runs asynchronously in your version
Any option with shared admin loginsNot a fit for a trail that must identify peopleAnyone using UI_USERNAME and UI_PASSWORD or the master key signs in as proxy admin, so entries cannot show the personThat SSO is configured and that individual admin accounts are used before relying on the log

What the LiteLLM audit trail records and what it leaves out

The LiteLLM audit trail records four action types: create, update, delete and regenerate. These apply to four object types: keys, teams, users and models. Each entry carries an actor field that names who performed the change. This field is the main reason to keep the trail, so a reviewer should confirm early that it holds an individual's identity and not a generic value. Audit logs require an Enterprise license. With Enterprise they are on by default, but your team should set store_audit_logs in litellm_settings, or the LITELLM_STORE_AUDIT_LOGS variable, so the setting is explicit in your configuration and can be checked during review.

Request-level traffic is not the audit trail. The records of each prompt, response, model call and token count belong to request and spend logging, which is covered separately. Those records show what a virtual key did with the gateway. They do not show who created the key, who raised its budget, or who regenerated its secret. A reviewer who accepts request logs as evidence of administrative change will miss the questions that matter most. Ask the team to show, for one key, the request log and the audit entry side by side, and to confirm that each answers a different question.

Read-only access may not be recorded. Listing keys, opening team settings, or viewing a model's configuration may leave no entry in the audit trail. If your policy requires evidence of who viewed credentials, budgets or model definitions, this gap needs a documented decision. Test the read actions in the admin UI and the API during the non-production run, record what appears, and decide whether to accept the gap, restrict admin access further, or add a separate control. Do not assume that a missing entry means the view did not happen.

Changes made with the master key, or with UI_USERNAME and UI_PASSWORD, show only the shared admin identity. Anyone holding those values signs in as proxy admin, so the audit trail cannot tell the people apart. Limit these credentials to documented break-glass use, keep the master key in a secret manager, and put individual sign-in in front of the admin UI. Single sign-on is what makes the actor field meaningful for day-to-day administration, and it should be in place before the audit trail is relied on for accountability.

Before relying on the trail, test each action type against each object type that supports it in a non-production gateway. For each test, confirm the actor value, the object identifier, the timestamp and any before and after details the product captures. If you export to S3 with audit_log_callbacks set to s3_v2, confirm that JSON files appear under audit_logs/ with a date folder and that the same fields survive the export. Keep the test record as evidence of what the trail captures, and ask your LiteLLM contact to confirm any field you cannot verify in your own environment.

Setup sequence for LiteLLM audit logs

This sequence sets up LiteLLM audit logging so that every create, update, delete and regenerate action on keys, teams, users and models is recorded, exported and tied to a named person. Each step ends with a check, so you know the trail works before anyone relies on it.

  1. Confirm the Enterprise license and release line

    Start by confirming that your organization holds a LiteLLM Enterprise license, because audit logs require one. Ask your account contact to confirm in writing which license covers the deployment and which environments it applies to. Then check the running version against the four most recent stable minor versions that LiteLLM supports, and plan any upgrade before setup begins using the current list on the GitHub releases page. Done means the license is on file and the running version falls inside the supported window.

  2. Prepare the PostgreSQL database and secrets

    Point the proxy at PostgreSQL, the primary supported database, because virtual keys and the audit records that reference them depend on it. If more than one proxy instance runs, deploy Redis 7.0 or newer for shared rate limits, router state and cache. Store LITELLM_MASTER_KEY, which must start with sk-, in your secret manager and keep it out of configuration files and repositories. Done means the proxy starts cleanly, connects to the database, and a test key still exists after a restart.

  3. Enable SSO and retire shared admin logins

    Connect the admin UI to your identity provider using Google, Microsoft Entra ID, Okta or a generic OIDC provider. Map each administrator to a named account so every audit entry resolves to a person. Remove UI_USERNAME and UI_PASSWORD from daily use and limit the master key to a documented break-glass procedure, because anyone holding those values signs in as proxy admin and the log cannot identify them. Confirm the SSO user limit against your license terms, since SSO is free for up to 5 users from v1.76.0 and needs Enterprise beyond that. Done means each admin signs in with their own identity and no shared credential is used for routine work.

  4. Set the audit log switch explicitly

    Audit logs are on by default with an Enterprise license, but set the switch anyway so the configuration states what it does. Add store_audit_logs under litellm_settings, or set LITELLM_STORE_AUDIT_LOGS, to true for each environment. Keep the setting in the same version-controlled configuration as the rest of the gateway so that any later change appears in review. Done means the proxy reports audit logging as enabled after a restart, and the value matches the reviewed configuration in every environment.

  5. Configure S3 export with the s3_v2 callback

    Create or select the bucket that will hold the trail, and grant the proxy write access through an IAM role or an equivalent workload identity. Set audit_log_callbacks to s3_v2 so that records export asynchronously as JSON files under audit_logs/, with a folder for each date. Confirm bucket versioning, encryption and retention with your security team before go-live, since those settings are yours to choose. Done means the first JSON file appears under audit_logs/ in a folder named for the current date.

  6. Run a test change for each object type

    Make one controlled change for each object type: create, update, delete and regenerate a key, then repeat the exercise for a team, a user and a model. Use a named admin account and a clear test label so the entries are easy to find. Open the exported JSON for each change and check that the action, the object and the actor match what you did, with the actor naming the person who signed in and not a shared account. Done means every object type has a matching record, and the test entries are kept as evidence in your change file.

Why SSO must come before LiteLLM audit logs can name people

Audit logs only help when each entry names a person. The LiteLLM audit log records who created, updated, deleted or regenerated keys, teams, users and models, but the Admin UI also accepts UI_USERNAME and UI_PASSWORD, or the master key. Anyone who holds those values signs in as proxy admin, so an entry shows that an admin acted, not which engineer did it. Until admins stop sharing these credentials, the log cannot separate one person from another, and no export setting changes that.

LiteLLM's admin UI supports SSO with Google, Microsoft Entra ID (Azure AD), Okta and generic OIDC providers. From v1.76.0, SSO is free for up to 5 users, and an Enterprise license is needed beyond that. Count the people who will administer keys, teams, users and models before choosing a path, because that number decides whether the free tier is enough. Also confirm with your identity provider and LiteLLM which group or role claims map to admin rights. SCIM provisioning and JWT authentication are Enterprise features, so confirm with your vendor whether your identity provider needs either one before you commit to a design.

The order of work matters. First, issue a personal SSO identity to every person who administers the gateway. Second, move those admins to SSO sign-in and make a test change, such as creating and then deleting a test team, to confirm that the audit entry shows the person's identity. Third, rotate or restrict the shared values. Change UI_PASSWORD, limit who can read the master key in your secret manager, and document a break-glass procedure for the rare case when SSO is unavailable. Skipping the second step is the most common way to end up with a log that looks complete but names no one.

Plan for the actions SSO does not cover. Automation, CI jobs and scripts that call the proxy with the master key will still appear as proxy admin, so give each one its own virtual key or service identity before you retire the shared credentials. Ask your vendor to confirm how the admin UI session and API key actions are recorded in the audit entry for your release, and check that exported files under audit_logs/ carry the actor field you expect. Record the result of the test change as evidence, so the sign-off can show the log identifies individuals.

Security and operational considerations for the audit trail

An audit trail is only useful if it is complete, intact and read on time. The controls below cover who can touch the exported files, how long the bucket keeps them, where the gateway's master key lives, and the routine checks that show the export is still working.

Restrict read and delete access to the bucket

Audit JSON files written under audit_logs/ in the export bucket are the evidence of who changed keys, teams, users and models. Grant read access only to the reviewers and tooling that need it, and deny delete to everyone except a documented break-glass role. Confirm that the gateway's export identity can write new objects but cannot overwrite or remove existing ones. Check the bucket policy and the identity policies together, since either can grant access.

Set retention and legal hold on the bucket

Enable object versioning and a retention rule on the bucket so exported audit files cannot be altered or purged before your retention period ends. Your records policy and any legal hold requirements set the period, so confirm both with your compliance lead rather than copying a default. Test that a deletion attempt on a protected object is refused, and record the test result in your change log.

Keep the master key in a secret manager

LITELLM_MASTER_KEY must start with sk- and grants full proxy admin rights, so it should not sit in a config file or a shell history. LiteLLM's production guide recommends a secret manager, and the Enterprise tier lists integrations with AWS, Azure, Google, HashiCorp Vault and CyberArk. Check that only the gateway's runtime identity can read the secret, and that anyone who later signs in with the master key is logged as proxy admin in your review notes.

Watch for failed exports

Export runs asynchronously, so a failing callback does not stop the gateway from serving requests, and gaps can go unnoticed. Alert on errors in the gateway logs that mention the S3 callback, and compare the daily audit_logs/<YYYY-MM-DD>/ prefixes against the expected activity on the admin side. Test the alert by temporarily revoking the export role in a non-production environment.

Account for delay between action and file

Because export is asynchronous, an admin action may appear in the bucket minutes or longer after it happened, and a file for a given day may be written after that day ends. Do not treat the bucket as a real-time view. Build reviews and incident searches to cover a lag window, and confirm the typical delay with a controlled test change on your own deployment.

Review the trail on a fixed schedule

An exported trail that nobody reads provides no assurance. Set a recurring review, for example monthly or as your control framework requires, in which a named owner samples create, delete and regenerate events for keys, teams, users and models. Record who performed each review, what was checked, and any changes to admin accounts that could not be explained. Keep the review record in the same retained location as the audit files.

How to export LiteLLM audit logs to S3 and read the files

The audit export runs asynchronously, so it writes beside the gateway rather than inside the request path. Audit logs require an Enterprise license, so confirm your license before you configure the export. Then set audit_log_callbacks to s3_v2 in the proxy configuration. The gateway writes JSON files under audit_logs/ in your bucket, with one folder per day named YYYY-MM-DD. Before go-live, ask your LiteLLM contact to confirm, for your release, the callback name, the folder layout, the file format and the exact field names for the acting user, action, target type, target ID and timestamp. Record those names in a data dictionary that your SIEM or data platform team owns. Test with one create and one regenerate action on a non-production key, then find both events in the bucket before you rely on the pipeline.

The gateway's storage permissions should be narrow. It needs to write objects under the audit_logs/ prefix and nothing else in the bucket. Ask your vendor whether it needs any other S3 action, because each extra permission on the gateway role increases what a compromised proxy could reach. If your retention policy requires that events cannot be altered or deleted, decide whether to use bucket versioning, object lock or both, and confirm the gateway's role is compatible with that setting. Block public access, encrypt objects with a key your security team controls, and turn on access logging or data event logging so you can see who reads the bucket. Keep audit data in a dedicated bucket or a dedicated prefix that application data cannot write to.

Split the write and read roles from the start. The gateway's write role is assumed by the proxy workload and holds only the put permission on the audit prefix. The reviewer read role is assumed by a named security or compliance group through your identity provider, with multi-factor authentication required and session logging on. Reviewers need list and get permissions on the audit prefix and no ability to change the gateway, its configuration or its keys, because the gateway is the system being audited. Nobody on the platform team should hold both roles. Review membership of both roles at a fixed interval, and remove access for people who change teams. Document who may approve a change to either role, so a platform engineer cannot quietly widen the reviewer's access.

Reading the files usually means a scheduled ingestion job in your SIEM or data platform. The job loads each JSON file, uses the date folder as a partition, and normalizes timestamps to UTC. The identity step matters most. Join the acting-user field to identity records exported from your identity provider, so each action resolves to a person, their team and their role at the time. Without single sign-on, the actor often resolves to a shared credential. LiteLLM's Moving from OSS checklist warns that anyone who signs in with the UI username and password or the master key appears as proxy admin, and the audit trail cannot identify them. Run the join only after SSO is in place, test it with a known change, and repeat the test after each upgrade, since field names can change between releases.

Limits to confirm before you rely on the audit trail

An audit trail is only as useful as its coverage, retention and failure behavior. The items below are questions to put to the vendor or to test in your own environment before a compliance reviewer or incident responder depends on the records.

Exact actions and objects captured

The documented scope covers create, update, delete and regenerate actions on keys, teams, users and models. Confirm the precise event list, field names and object identifiers in the release you deploy, and check whether changes to budgets, model access or routing settings appear as separate entries. Perform one action of each type in a test environment and compare the exported record against what you expected to see.

Whether read access is logged

The documented scope describes changes, not reads. Ask the vendor whether viewing a key, listing teams or opening usage reports in the admin UI produces any audit record, and whether API reads with a virtual key do. If reads are not captured, record that gap in your control documentation and decide whether another control, such as access review of admin accounts, covers it.

Retention in the proxy database before export

Find out how long audit records remain in the proxy PostgreSQL database, whether any built-in cleanup runs on them, and whether export to S3 removes or leaves the source rows. Confirm this with the vendor for your release, then test it by checking the table after the cleanup schedule you plan to run. Your retention period should be set from your policy, not from the default behavior.

Behavior across supported minor versions

LiteLLM states that it supports the four most recent stable minor versions. Ask how audit log schema, event names and the S3 object layout change between minor versions, and whether a database migration is needed to keep records readable after an upgrade. Test an upgrade on a copy of your database and confirm that existing records still export and that the field layout in the bucket has not changed.

Blocking or dropping on failed S3 writes

The export runs asynchronously, so a failed write to the bucket may be retried, queued or silently discarded. Ask the vendor which behavior applies, and whether a failed write can affect the action that produced the event. Test it by revoking write permission on a test bucket during activity, then confirm whether events are delayed, recovered after restoration or lost.

Questions buyers ask about LiteLLM audit logs

Does LiteLLM audit logging require an Enterprise license?

Yes. LiteLLM's audit log documentation lists audit logs as an Enterprise feature, so an open-source deployment does not record who created, updated, deleted or regenerated keys, teams, users or models. The license cost comes from LiteLLM's written quote and its license terms, which you need to obtain directly from the vendor. Confirm that the license scope covers audit logs, the number of SSO users you plan to have, and your deployment model before you commit. DeployOpen's fee is separate and follows from a written scope, so ask for it as its own line item.

How long does it take to set up LiteLLM audit logs?

The timeline depends on three inputs: whether your identity provider is ready for LiteLLM's admin UI single sign-on, whether the team can grant bucket access for exports, and how far testing goes. If the identity provider needs a new application registration, group mapping and admin role design, that work comes first. Bucket ownership, encryption settings and write permissions for the proxy's role add time when several teams must approve them. Testing scope matters too: checking a single action on a test gateway takes less effort than verifying every key, team, user and model action with a named reviewer. Ask any provider for a written plan that lists these inputs and the dependencies between them.

Can our own team configure LiteLLM audit logs without outside help?

Yes, if your team already administers single sign-on for an identity provider that LiteLLM supports and has cloud skills for S3 bucket policies, IAM roles and secret handling on the proxy. The configuration steps are documented, but the hard part is getting identity claims and group mappings right and then proving that each logged action names a person. Teams without those skills usually lose time on claims that fail to map to admin roles and on bucket permissions that block exports. Assess these skills in your team first, and check whether the people with identity provider admin rights can attend review sessions.

What do we need to provide before a LiteLLM audit log project starts?

Four things. First, identity provider admin access, so the work can register the LiteLLM application, map groups to proxy roles and test sign-in. Second, a test gateway that matches production's LiteLLM version and database setup, so changes can be verified without touching live keys. Third, bucket ownership: an owner who can create or approve the S3 bucket, the write policy for the proxy and the retention rules. Fourth, a named reviewer on your side who accepts the test evidence and signs off on the handover. Confirm each item with the person who controls it before the project is scheduled.

Why does LiteLLM audit logging fail to name the person who made a change?

The most likely cause is shared admin access. LiteLLM's Moving from OSS checklist warns that anyone who signs in with the UI username and password, or with the master key, appears as proxy admin, so the audit log cannot identify the person who acted. Single sign-on fixes this only when each administrator signs in with their own identity. Set up SSO first, stop using shared credentials for daily administration, and keep the master key in a secret manager. Then test by making a key change under a named account and checking the exported record for that user.

Where does LiteLLM write exported audit logs and how are they organized?

With the s3_v2 audit log callback, LiteLLM exports audit logs asynchronously and writes JSON files to your S3 bucket under a date-based path: audit_logs/ followed by the day in YYYY-MM-DD format. Confirm that the bucket sits in your account, that the proxy's role can write the files, and that the deletion and retention rules match your retention schedule. Exports depend on the proxy reaching the bucket, so network paths and IAM policies need testing from the actual runtime environment. Ask your reviewer to check a sample file for the action, the actor and the timestamp.

What does a LiteLLM audit log project cost depend on?

Cost has four components: the LiteLLM Enterprise license, the outside implementation scope, your internal staff time, and the cloud and identity services you already run or add. License cost comes from LiteLLM's quote and its terms. DeployOpen's fee follows from the written scope, which covers identity provider configuration, the audit log callback, bucket setup, testing and handover. Recurring costs include license renewal, storage of exported logs and the reviewer's time for periodic checks. Ask for a quote that separates one-time setup from recurring items and states which identity provider, bucket and test scope it assumes.

How DeployOpen scopes and delivers LiteLLM audit logging

DeployOpen plans, implements, documents and supports self-hosted LiteLLM gateways inside your own infrastructure, including the audit trail for key, team, user and model changes. Engagements are fixed-scope, with the scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • Confirm the Enterprise license position, since audit logs require an Enterprise license for the gateway.
  • Map which create, update, delete and regenerate actions on keys, teams, users and models must be recorded and who reviews them.
  • Agree whether SSO is in place first so each logged action can be tied to a named person rather than a shared admin login.

How we build

  • Set store_audit_logs explicitly in configuration or through LITELLM_STORE_AUDIT_LOGS rather than relying on defaults.
  • Configure asynchronous export to your S3 bucket using the s3_v2 audit log callback and verify the audit_logs/YYYY-MM-DD/ layout.
  • Restrict admin access so UI_USERNAME, UI_PASSWORD and the master key are not used for routine administration.

How we hand over

  • Document the audit event inventory, storage location, bucket permissions and the daily folder structure for your auditors and operators.
  • Provide test records showing a key creation, a team change and a deletion appearing in the exported trail with the acting identity.
  • Deliver runbooks covering export failures, bucket access reviews and the steps to query a given day's JSON files.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Re-verify audit export after each LiteLLM upgrade, keeping the gateway on a release line that receives maintenance.
  • Confirm with your provider or Enterprise contact which support levels and response commitments apply to your license.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.