Skip to content

[Bug]: /v2/user/info omits user-level rpm_limit and tpm_limit #33347

Description

@silencedoctor

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

GET /v2/user/info is intended to be the lightweight replacement for /user/info, excluding virtual keys and full team objects while returning the user's own profile data.

The user database row already contains rpm_limit and tpm_limit, and the endpoint's existing find_unique query retrieves them. However, UserInfoV2Response does not declare either field, and the endpoint's explicit response mapping drops both values.

As a result, clients that need the complete user-level rate-limit policy must continue calling the heavier /user/info endpoint.

Expected behavior: /v2/user/info returns the user's optional rpm_limit and tpm_limit values without adding any database queries or returning keys/full team objects.

Actual behavior: both fields are absent from the JSON response even when they are set on the user row.

Steps to Reproduce

  1. Start a live LiteLLM proxy at commit 817582e697c92a67f8bf2238a9c646498b00ffb1 with an isolated PostgreSQL database.
  2. Create a synthetic internal user with tpm_limit=120000 and rpm_limit=600 via POST /user/new.
  3. Call GET /v2/user/info?user_id=v2-rate-limit-e2e-user with the local master key.
  4. Observe that the response returns HTTP 200 but omits both fields.
  5. Call GET /user/info for the same user and observe that both values are present, confirming they were persisted.

The reproduction uses a live proxy with no mocks. All identifiers and values are synthetic, and authorization is redacted.

Sanitized E2E reproduction

Relevant log output

POST /user/new                                      HTTP 200
{"user_id":"v2-rate-limit-e2e-user","tpm_limit":120000,"rpm_limit":600}

GET /v2/user/info?user_id=v2-rate-limit-e2e-user    HTTP 200
{"user_id":"v2-rate-limit-e2e-user","spend":0.0,"max_budget":null,"models":[],"teams":[]}

GET /user/info?user_id=v2-rate-limit-e2e-user       HTTP 200
{"user_info":{"tpm_limit":120000,"rpm_limit":600}}

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

litellm_internal_staging (817582e697, package version 1.94.0)

Twitter / LinkedIn details

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions