Skip to content

fix(auth): index restricted end-user registry refreshes - #51772

Merged
kerry-berri merged 3 commits into
mainfrom
litellm_restricted_end_user_index
Nov 17, 2026
Merged

kerry-berri merged 3 commits into
mainfrom
litellm_restricted_end_user_index

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

index for the end user table for the stuff that we care about for the end user table for the registry cache

Details

Link to Devin session: https://app.devin.ai/sessions/6d42f90560c24cdaba679cc474709d6a
Open in Devin Desktop: https://app.devin.ai/desktop/session/6d42f90560c24cdaba679cc474709d6a?variant=devin
Requested by: @ryan-crabbe-berri

TLDR

Problem this solves:

  • Restricted-user refreshes scan unrestricted users every minute per worker

How it solves it:

  • Build a concurrent partial index outside Prisma migrations
  • Reload only IDs with the same literal predicate
  • Preserve TTL, overflow, invalidation, and lookup fallback
  • Protect partial-index drops and reuse matching workaround indexes

User Flow

Before, routine requests can trigger expensive database reads even without restricted customers

  1. The operator has millions of unrestricted customers and few restrictions
  2. Their app sends POST https://litellm-domain/v1/chat/completions with a customer in user
  3. The operator sees recurring database reads grow with their whole customer population

After, the same requests and restrictions remain, but refresh reads cover restricted customers only

  1. The operator has millions of unrestricted customers and few restrictions
  2. Their app sends POST https://litellm-domain/v1/chat/completions with a customer in user
  3. After the background build finishes, refresh reads grow with restricted customers instead

Relevant issues

Fixes #47413
Fixes #51115

Linear ticket

Resolves LIT-9895

Pre-Submission checklist

  • I have added meaningful tests
  • The focused test files pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is isolated to this refresh and its index
  • Latest-commit automated reviews have finished and findings are addressed

Screenshots / Proof of Fix

The database proof used PostgreSQL 14.24 and Prisma 5.4.2 on an isolated local database, not a production database. Two live proxy workers shared Redis on port 6395 in both legs. Both worker PIDs reached application startup in each leg, despite using --reload. The base was fa79311dfc7f1661f6950ad1e69c945ffea876e4. The after code is 506cd870ce6632434e10c1deff3046f5a610e3a5. The benchmark used the same literal SQL and index definition as this tip. Later cleanup removed unused selector helpers, validated the extras-package boundary, and kept an explicitly named database span around the reload, without changing either SQL expression. Parity and live endpoint checks were rerun after that cleanup at bb99b3e8ef7bff9dff61d1194c31a7758ad87678. The final commit only updates unit database doubles, with no runtime change, so that proof is retained at the current tip

The SQL predicate is defined once in request_log_indexes.py, then used for both the index and repository query. Only LIMIT is bound. pg_stat_statements normalizes the literal empty array to $2 in its displayed query text, which does not mean the sent predicate was parameterized

Before (fa79311dfc7f)

Restricted-user refresh

  1. Seed 2,100,000 unrestricted rows without the partial index and call the old Prisma selector ten times
  2. Capture pg_stat_statements and EXPLAIN (ANALYZE, BUFFERS) under auto and force_generic_plan

Auto planning

calls=10, rows=0, total_exec_time_ms=2518.405308, mean_exec_time_ms=251.840531, shared_blks_hit=82511, shared_blks_read=155492
Node Type=Limit, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=11733, Shared Read Blocks=8195
  Node Type=Sort, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=11733, Shared Read Blocks=8195
    Node Type=Gather, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=11730, Shared Read Blocks=8195
      Node Type=Seq Scan, Actual Rows=0, Actual Loops=3, Rows Removed by Filter=700000, Shared Hit Blocks=11730, Shared Read Blocks=8195
EXPLAIN execution_ms=94.178

Forced generic planning

calls=10, rows=0, total_exec_time_ms=4407.154369, mean_exec_time_ms=440.715437, shared_blks_hit=96, shared_blks_read=276654
Node Type=Limit, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=3, Shared Read Blocks=27675
  Node Type=Index Scan, Index Name=LiteLLM_EndUserTable_pkey, Actual Rows=0, Actual Loops=1, Rows Removed by Filter=2100000, Shared Hit Blocks=3, Shared Read Blocks=27675
EXPLAIN execution_ms=393.07

/v1/chat/completions

  1. Generate a proxy key and submit real provider requests with unrestricted, model-restricted, and exhausted-budget customers
  2. Observe HTTP 200 with OK, HTTP 403 customer_model_access_denied, and HTTP 422 budget_exceeded

/v1/responses

  1. Send the same customer cases using input, user, and max_output_tokens
  2. Observe HTTP 200, 403 customer_model_access_denied, and 422 budget_exceeded

/v1/messages

  1. Send the same customer cases using messages and metadata.user_id
  2. Observe HTTP 200, 403 permission_error, and 422 invalid_request_error with budget_exceeded

After (506cd870ce6632434e10c1deff3046f5a610e3a5)

Restricted-user refresh

  1. Build the partial index with the real background builder and repeat the same ten reloads in each planning mode
  2. Observe an index-only scan instead of reading 2.1M unrestricted rows

Auto planning

calls=10, rows=0, total_exec_time_ms=0.047097, mean_exec_time_ms=0.004710, shared_blks_hit=10, shared_blks_read=0
Node Type=Limit, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=1, Shared Read Blocks=0
  Node Type=Index Only Scan, Index Name=LiteLLM_EndUserTable_restricted_idx, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=1, Shared Read Blocks=0, Heap Fetches=0
EXPLAIN execution_ms=0.017

Forced generic planning

calls=10, rows=0, total_exec_time_ms=0.053526, mean_exec_time_ms=0.005353, shared_blks_hit=10, shared_blks_read=0
Node Type=Limit, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=1, Shared Read Blocks=0
  Node Type=Index Only Scan, Index Name=LiteLLM_EndUserTable_restricted_idx, Actual Rows=0, Actual Loops=1, Shared Hit Blocks=1, Shared Read Blocks=0, Heap Fetches=0
EXPLAIN execution_ms=0.017

The empty partial index was 8,192 bytes. A held writer kept the concurrent build in waiting for writers before build. An independent insert and update completed in 1.823 ms with a one-second lock timeout, before releasing that writer. The build then succeeded

/v1/chat/completions

  1. Repeat the before requests with real provider calls and response caching bypassed
  2. Observe the same HTTP 200, 403, and 422 statuses. The running proxy's recorded registry query selects only user_id

/v1/responses

  1. Repeat the before requests with response caching bypassed
  2. Observe the same HTTP 200, 403, and 422 statuses

/v1/messages

  1. Repeat the before requests with response caching bypassed
  2. Observe the same HTTP 200, 403, and 422 statuses

Missing index, active build, and overflow

The live state harness dropped the index, created a new model-restricted customer through /customer/new, then submitted a denied request and an unrestricted provider request. It repeated this while a concurrent build waited on an open writer. Finally, it inserted 5,001 restricted rows and created a restricted customer sorting beyond the first 5,001 IDs

index missing      denied=403 unrestricted=200 registry rows=5    mean_exec_time_ms=93.395031
index building     denied=403 unrestricted=200 registry rows=6    mean_exec_time_ms=87.543064
registry overflow  denied=403 unrestricted=200 registry rows=5001 mean_exec_time_ms=1.146630
overflow per-user SELECTs: calls=2, rows=2

The overflow case proves a customer outside the capped result still reaches the per-user check. Missing or invalid indexes affect performance only. Management-created restrictions were picked up without waiting for TTL expiry

Upgrade and index ownership

Before any implementation, a real PostgreSQL probe created a baseline Prisma schema, manually added the partial index, introduced a pending ADD COLUMN migration, deployed it, and ran LiteLLM's actual reconciliation path. Prisma emitted an empty diff, contrary to the expected DROP

INDEX BEFORE UPGRADE ('"LiteLLM_EndUserTable_restricted_idx"',)
Applying migration `20260102000000_add_alias`
-- This is an empty migration.
FILTERED DIFF -- This is an empty migration.
INDEX AFTER SANITY CHECK ('"LiteLLM_EndUserTable_restricted_idx"',)
MIGRATION LEDGER [('20260101000000_baseline', True), ('20260102000000_add_alias', True)]

The added real-database regressions also apply the repository's pending migrations using both v1 and v2 resolvers and assert the workaround index keeps its OID. The drift filter independently removes a generated DROP of this builder-owned partial index, while leaving spend-log DROP behavior unchanged

The builder keeps the workaround's OID under the managed name. It also renames a matching differently named partial index without rebuilding or making a second copy. Full indexes and partial indexes with blocked or NOT blocked predicates are not mistaken for equivalents

If the build fails, already-applied schema migrations stay applied. The synchronous migration job returns False, so its process reports failure and the Job can retry. A deployment waiting on that Job can therefore remain held even though the schema upgrade succeeded. The serving proxy's existing daemon-thread path does not wait for the build before readiness. A failed build is retried at the next boot or migration job, not on a new timer introduced here

Verified versus not established

The literal selector matched the previous Prisma OR filter on all 1,458 combinations of blocked false/true/null, four nullable restriction fields with null/empty/non-empty values, and models null/empty/empty-string/non-empty/null-element/mixed arrays. This was checked before and after index creation. The old selector now lives as the fixed reference filter in the integration test rather than unused production helpers

Model and budget enforcement were proven through all three live endpoints. Blocked-flag inclusion was proven through database parity, but end-to-end blocked-callback denial was not established. This PR makes no claim to repair that separate behavior

The proxy was tested with the workspace extras package. The normal release process bumps extras with LiteLLM and updates core's pin, so released proxies include the updated query and index. An older package lacking the query keeps the existing registry-error per-user fallback but does not receive this optimization. Cross-version PostgreSQL predicate deparsing, real deployment-Job retry policy, and production latency were not measured

Full captured plans and statement statistics
{
  "rows": 2100000,
  "before_auto": {
    "pg_stat_statements": [
      [
        "SELECT \"public\".\"LiteLLM_EndUserTable\".\"user_id\", \"public\".\"LiteLLM_EndUserTable\".\"alias\", \"public\".\"LiteLLM_EndUserTable\".\"spend\", \"public\".\"LiteLLM_EndUserTable\".\"allowed_model_region\", \"public\".\"LiteLLM_EndUserTable\".\"default_model\", \"public\".\"LiteLLM_EndUserTable\".\"models\", \"public\".\"LiteLLM_EndUserTable\".\"budget_id\", \"public\".\"LiteLLM_EndUserTable\".\"object_permission_id\", \"public\".\"LiteLLM_EndUserTable\".\"blocked\" FROM \"public\".\"LiteLLM_EndUserTable\" WHERE (\"public\".\"LiteLLM_EndUserTable\".\"blocked\" = $1 OR \"public\".\"LiteLLM_EndUserTable\".\"budget_id\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"allowed_model_region\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"default_model\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"object_permission_id\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"models\" <> $4) ORDER BY \"public\".\"LiteLLM_EndUserTable\".\"user_id\" ASC LIMIT $2 OFFSET $3 /* traceparent=00-00000000000000000000000000000000-0000000000000000-01 */",
        10,
        0,
        2518.4053080000003,
        251.84053079999998,
        82511,
        155492
      ]
    ],
    "explain": [
      {
        "Plan": {
          "Node Type": "Limit",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 31564.61,
          "Total Cost": 31564.61,
          "Plan Rows": 1,
          "Plan Width": 197,
          "Actual Startup Time": 91.333,
          "Actual Total Time": 94.145,
          "Actual Rows": 0,
          "Actual Loops": 1,
          "Shared Hit Blocks": 11733,
          "Shared Read Blocks": 8195,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Sort",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 31564.61,
              "Total Cost": 31564.61,
              "Plan Rows": 1,
              "Plan Width": 197,
              "Actual Startup Time": 91.332,
              "Actual Total Time": 94.144,
              "Actual Rows": 0,
              "Actual Loops": 1,
              "Sort Key": [
                "user_id"
              ],
              "Sort Method": "quicksort",
              "Sort Space Used": 25,
              "Sort Space Type": "Memory",
              "Shared Hit Blocks": 11733,
              "Shared Read Blocks": 8195,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Gather",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1000.0,
                  "Total Cost": 31564.6,
                  "Plan Rows": 1,
                  "Plan Width": 197,
                  "Actual Startup Time": 91.304,
                  "Actual Total Time": 94.116,
                  "Actual Rows": 0,
                  "Actual Loops": 1,
                  "Workers Planned": 2,
                  "Workers Launched": 2,
                  "Single Copy": false,
                  "Shared Hit Blocks": 11730,
                  "Shared Read Blocks": 8195,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Seq Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": true,
                      "Async Capable": false,
                      "Relation Name": "LiteLLM_EndUserTable",
                      "Alias": "LiteLLM_EndUserTable",
                      "Startup Cost": 0.0,
                      "Total Cost": 30564.5,
                      "Plan Rows": 1,
                      "Plan Width": 197,
                      "Actual Startup Time": 89.103,
                      "Actual Total Time": 89.104,
                      "Actual Rows": 0,
                      "Actual Loops": 3,
                      "Filter": "(blocked OR (budget_id IS NOT NULL) OR (allowed_model_region IS NOT NULL) OR (default_model IS NOT NULL) OR (object_permission_id IS NOT NULL) OR (models <> '{}'::text[]))",
                      "Rows Removed by Filter": 700000,
                      "Shared Hit Blocks": 11730,
                      "Shared Read Blocks": 8195,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Workers": []
                    }
                  ]
                }
              ]
            }
          ]
        },
        "Planning": {
          "Shared Hit Blocks": 72,
          "Shared Read Blocks": 19,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0
        },
        "Planning Time": 0.324,
        "Triggers": [],
        "Execution Time": 94.178
      }
    ]
  },
  "before_generic": {
    "pg_stat_statements": [
      [
        "SELECT \"public\".\"LiteLLM_EndUserTable\".\"user_id\", \"public\".\"LiteLLM_EndUserTable\".\"alias\", \"public\".\"LiteLLM_EndUserTable\".\"spend\", \"public\".\"LiteLLM_EndUserTable\".\"allowed_model_region\", \"public\".\"LiteLLM_EndUserTable\".\"default_model\", \"public\".\"LiteLLM_EndUserTable\".\"models\", \"public\".\"LiteLLM_EndUserTable\".\"budget_id\", \"public\".\"LiteLLM_EndUserTable\".\"object_permission_id\", \"public\".\"LiteLLM_EndUserTable\".\"blocked\" FROM \"public\".\"LiteLLM_EndUserTable\" WHERE (\"public\".\"LiteLLM_EndUserTable\".\"blocked\" = $1 OR \"public\".\"LiteLLM_EndUserTable\".\"budget_id\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"allowed_model_region\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"default_model\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"object_permission_id\" IS NOT NULL OR \"public\".\"LiteLLM_EndUserTable\".\"models\" <> $4) ORDER BY \"public\".\"LiteLLM_EndUserTable\".\"user_id\" ASC LIMIT $2 OFFSET $3 /* traceparent=00-00000000000000000000000000000000-0000000000000000-01 */",
        10,
        0,
        4407.154369,
        440.71543690000004,
        96,
        276654
      ]
    ],
    "explain": [
      {
        "Plan": {
          "Node Type": "Limit",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 9398.63,
          "Total Cost": 18796.83,
          "Plan Rows": 210000,
          "Plan Width": 197,
          "Actual Startup Time": 393.04,
          "Actual Total Time": 393.041,
          "Actual Rows": 0,
          "Actual Loops": 1,
          "Shared Hit Blocks": 3,
          "Shared Read Blocks": 27675,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Index Scan",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Scan Direction": "Forward",
              "Index Name": "LiteLLM_EndUserTable_pkey",
              "Relation Name": "LiteLLM_EndUserTable",
              "Alias": "LiteLLM_EndUserTable",
              "Startup Cost": 0.43,
              "Total Cost": 93982.43,
              "Plan Rows": 2100000,
              "Plan Width": 197,
              "Actual Startup Time": 393.038,
              "Actual Total Time": 393.038,
              "Actual Rows": 0,
              "Actual Loops": 1,
              "Filter": "((blocked = $1) OR (budget_id IS NOT NULL) OR (allowed_model_region IS NOT NULL) OR (default_model IS NOT NULL) OR (object_permission_id IS NOT NULL) OR (models <> $4))",
              "Rows Removed by Filter": 2100000,
              "Shared Hit Blocks": 3,
              "Shared Read Blocks": 27675,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0
            }
          ]
        },
        "Planning": {
          "Shared Hit Blocks": 66,
          "Shared Read Blocks": 19,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0
        },
        "Planning Time": 0.377,
        "Triggers": [],
        "Execution Time": 393.07
      }
    ]
  },
  "concurrent_writes": {
    "phase": [
      [
        "waiting for writers before build"
      ]
    ],
    "insert_update_ms": 1.8230530000096223
  },
  "after_auto": {
    "pg_stat_statements": [
      [
        "SELECT user_id FROM \"LiteLLM_EndUserTable\" WHERE (blocked OR (budget_id IS NOT NULL) OR (allowed_model_region IS NOT NULL) OR (default_model IS NOT NULL) OR (object_permission_id IS NOT NULL) OR (models <> $2::text[])) ORDER BY user_id LIMIT $1",
        10,
        0,
        0.047097,
        0.0047097,
        10,
        0
      ]
    ],
    "explain": [
      {
        "Plan": {
          "Node Type": "Limit",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 0.12,
          "Total Cost": 4.14,
          "Plan Rows": 1,
          "Plan Width": 15,
          "Actual Startup Time": 0.006,
          "Actual Total Time": 0.007,
          "Actual Rows": 0,
          "Actual Loops": 1,
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Index Only Scan",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Scan Direction": "Forward",
              "Index Name": "LiteLLM_EndUserTable_restricted_idx",
              "Relation Name": "LiteLLM_EndUserTable",
              "Alias": "LiteLLM_EndUserTable",
              "Startup Cost": 0.12,
              "Total Cost": 4.14,
              "Plan Rows": 1,
              "Plan Width": 15,
              "Actual Startup Time": 0.006,
              "Actual Total Time": 0.006,
              "Actual Rows": 0,
              "Actual Loops": 1,
              "Heap Fetches": 0,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0
            }
          ]
        },
        "Planning": {
          "Shared Hit Blocks": 104,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0
        },
        "Planning Time": 0.239,
        "Triggers": [],
        "Execution Time": 0.017
      }
    ]
  },
  "after_generic": {
    "pg_stat_statements": [
      [
        "SELECT user_id FROM \"LiteLLM_EndUserTable\" WHERE (blocked OR (budget_id IS NOT NULL) OR (allowed_model_region IS NOT NULL) OR (default_model IS NOT NULL) OR (object_permission_id IS NOT NULL) OR (models <> $2::text[])) ORDER BY user_id LIMIT $1",
        10,
        0,
        0.053526000000000004,
        0.0053526,
        10,
        0
      ]
    ],
    "explain": [
      {
        "Plan": {
          "Node Type": "Limit",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 0.12,
          "Total Cost": 4.14,
          "Plan Rows": 1,
          "Plan Width": 15,
          "Actual Startup Time": 0.007,
          "Actual Total Time": 0.007,
          "Actual Rows": 0,
          "Actual Loops": 1,
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Index Only Scan",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Scan Direction": "Forward",
              "Index Name": "LiteLLM_EndUserTable_restricted_idx",
              "Relation Name": "LiteLLM_EndUserTable",
              "Alias": "LiteLLM_EndUserTable",
              "Startup Cost": 0.12,
              "Total Cost": 4.14,
              "Plan Rows": 1,
              "Plan Width": 15,
              "Actual Startup Time": 0.006,
              "Actual Total Time": 0.006,
              "Actual Rows": 0,
              "Actual Loops": 1,
              "Heap Fetches": 0,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0
            }
          ]
        },
        "Planning": {
          "Shared Hit Blocks": 104,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0
        },
        "Planning Time": 0.226,
        "Triggers": [],
        "Execution Time": 0.017
      }
    ]
  },
  "index_size": "8192 bytes"
}

Regression checks

Focused unit tests passed, 1,745 tests, including request-flow and custom-auth budgets, the Prisma span inventory, and database-span behavior tests. Real PostgreSQL adoption and upgrade tests passed, seven cases. Build-failure, concurrency, and selector parity tests passed, three cases. The failed-build upgrade case also passed again on the final tree. The final parity and generic-plan run passed, two cases. Spend-log upgrade, adoption, duplicate-index, and generic-plan regressions passed, 14 cases. make check passed, including formatting, strict Ruff, type discipline, basedpyright, test quality, OpenAPI documentation, and generated dashboard API type checks

Two deliberate mutations were killed. Removing partial-index DROP protection fails the drift regression. Broadening the literal query to include NOT blocked fails the forced-generic-plan regression, which observes a sequential scan instead of the partial index

Reproduce the live proxy cases

Set DATABASE_URL, LITELLM_MASTER_KEY, ANTHROPIC_API_KEY, and LITELLM_LOCAL_MODEL_COST_MAP=True. These examples replace the local QA database URL and artifact paths with environment variables and local filenames. Use an isolated database with the repository schema applied and dedicated Redis on port 6395

model_list:
  - model_name: qa-haiku
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
router_settings:
  redis_host: 127.0.0.1
  redis_port: 6395
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  database_url: os.environ/DATABASE_URL
  coordination_redis:
    host: 127.0.0.1
    port: 6395
  use_redis_transaction_buffer: true
litellm_settings:
  callbacks: [blocked_user_check]
  cache: true
  cache_params:
    type: redis
    host: 127.0.0.1
    port: 6395

Start the base and tip in their respective checkouts. The first before chat leg used port 4195, then the after leg used 4195. The sibling-endpoint comparison ran base at 4196 and tip at 4195

DISABLE_SCHEMA_UPDATE=true python litellm/proxy/proxy_cli.py \
  --config config.yaml --port 4195 --num_workers 2 --detailed_debug \
  --reload --use_v2_migration_resolver

The database had these isolated customers, created with the management API

import os, httpx
with httpx.Client(base_url="http://127.0.0.1:4195", timeout=90) as c:
    h = {"Authorization": "Bearer " + os.environ["LITELLM_MASTER_KEY"]}
    for path, body in [
        ("/customer/new", {"user_id": "qa-live-blocked", "blocked": True}),
        ("/customer/new", {"user_id": "qa-live-models", "models": ["denied-model"]}),
        ("/customer/new", {"user_id": "qa-live-budget", "max_budget": 0.01}),
        ("/customer/update", {"user_id": "qa-live-budget", "spend": 1.0}),
    ]:
        r = c.post(path, headers=h, json=body)
        r.raise_for_status()

Save the following as live.py and run python live.py before against the base, then python live.py after against the tip. The blocked-row request records existing behavior, not a successful denial assertion

import json
import os
import sys
import time

import httpx
import psycopg

label = sys.argv[1]
url = os.environ['DATABASE_URL']
master = os.environ['LITELLM_MASTER_KEY']
results = {}
with httpx.Client(base_url='http://127.0.0.1:4195', timeout=90) as client:
    admin = {'Authorization': 'Bearer '+master}
    generated = client.post('/key/generate', headers=admin, json={'models':['qa-haiku']})
    generated.raise_for_status()
    auth = {'Authorization': 'Bearer '+generated.json()['key']}
    def call(user, expected):
        start = time.monotonic()
        response = client.post('/v1/chat/completions', headers=auth, json={
            'model':'qa-haiku', 'messages':[{'role':'user','content':'Reply OK.'}],
            'max_tokens':16, 'user':user, 'cache':{'no-cache': True},
        })
        value = {'status':response.status_code, 'seconds':round(time.monotonic()-start,4)}
        if response.status_code != 200:
            value['error'] = response.json().get('error',{}).get('message','')[:350]
        else:
            value['content'] = response.json()['choices'][0]['message']['content']
        print(user, json.dumps(value), flush=True)
        results[user] = value
        assert response.status_code == expected, response.text
    def create(suffix, **kwargs):
        user = 'qa-'+label+'-'+suffix
        response = client.post('/customer/new', headers=admin, json={'user_id':user, **kwargs})
        assert response.status_code == 200, response.text
        return user
    with psycopg.connect(url,autocommit=True) as conn:
        conn.execute('SELECT pg_stat_statements_reset()')
    call('anon-000000001',200)
    blocked = 'qa-live-blocked'
    call(blocked,200)
    models = 'qa-live-models'
    call(models,403)
    budget = 'qa-live-budget'
    call(budget,422)
    with psycopg.connect(url,autocommit=True) as conn:
        stats=conn.execute('''SELECT calls, rows, mean_exec_time, shared_blks_hit, shared_blks_read, query
        FROM pg_stat_statements WHERE query LIKE 'SELECT%' AND query LIKE '%LiteLLM_EndUserTable%'
        AND query LIKE '% OR %' AND query LIKE '%blocked%' ''').fetchall()
    results['registry_stats']=stats
    print('registry_stats',json.dumps(stats),flush=True)
with open('live_'+label+'.json','w') as stream:
    json.dump(results,stream,indent=2)

Save and run the sibling-endpoint client with both proxies available

import json
import os
import httpx

results = {}
for name, port in [('before',4196),('after',4195)]:
    results[name]={}
    with httpx.Client(base_url=f'http://127.0.0.1:{port}',timeout=90) as client:
        response=client.post('/key/generate',headers={'Authorization':'Bearer '+os.environ['LITELLM_MASTER_KEY']},json={'models':['qa-haiku']})
        response.raise_for_status()
        auth={'Authorization':'Bearer '+response.json()['key']}
        for route in ['/v1/responses','/v1/messages']:
            values=[]
            for user, expected in [('anon-000000003',200),('qa-live-models',403),('qa-live-budget',422)]:
                if route=='/v1/responses':
                    body={'model':'qa-haiku','input':'Reply OK.','max_output_tokens':16,'user':user}
                else:
                    body={'model':'qa-haiku','messages':[{'role':'user','content':'Reply OK.'}],'max_tokens':16,'metadata':{'user_id':user}}
                body['cache']={'no-cache':True}
                response=client.post(route,headers=auth,json=body)
                value={'user':user,'status':response.status_code,'body':response.json()}
                values.append(value)
                print(name,route,user,response.status_code,response.text[:350],flush=True)
                assert response.status_code==expected, response.text
            results[name][route]=values
with open('endpoints_results.json','w') as stream:
    json.dump(results,stream,indent=2)
Reproduce 2.1M-row plans, statistics, and concurrent writes

Use a fresh isolated database with the schema applied, no restricted customers, no restricted partial index, and pg_stat_statements preloaded and created. The code below is the recorded harness with local paths and credentials replaced, and the previous Prisma filter inlined because the unused production helper was removed

LITELLM_LOCAL_MODEL_COST_MAP=True python perf.py
import asyncio
import json
import os
import threading
import time
from pathlib import Path
from types import SimpleNamespace

import psycopg
from prisma import Prisma
def _restricted_end_user_where():
    return {"OR": [{"blocked": True}, {"budget_id": {"not": None}},
        {"allowed_model_region": {"not": None}}, {"default_model": {"not": None}},
        {"object_permission_id": {"not": None}}, {"models": {"is_empty": False}}]}
from litellm.repositories.table_repositories import EndUserRepository
from litellm_proxy_extras.request_log_indexes import REQUEST_LOG_INDEXES, END_USER_RESTRICTED_QUERY, ensure_request_log_indexes

URL = os.environ['DATABASE_URL']
INDEX = next(i for i in REQUEST_LOG_INDEXES if i.table == 'LiteLLM_EndUserTable')
OUT = Path('perf_results.json')
results = {}
OLD = '''SELECT user_id, alias, spend, allowed_model_region, default_model, models, budget_id, object_permission_id, blocked
FROM "LiteLLM_EndUserTable" WHERE (blocked = $1 OR budget_id IS NOT NULL OR allowed_model_region IS NOT NULL
OR default_model IS NOT NULL OR object_permission_id IS NOT NULL OR models <> $4) ORDER BY user_id ASC LIMIT $2 OFFSET $3'''

def explain(conn, query, parameters, arguments):
    conn.execute('DEALLOCATE ALL')
    conn.execute('PREPARE probe (' + parameters + ') AS ' + query)
    return conn.execute('EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) EXECUTE probe (' + arguments + ')').fetchone()[0]

async def measure(label):
    with psycopg.connect(URL, autocommit=True) as conn:
        conn.execute('SELECT pg_stat_statements_reset()')
    async with Prisma(datasource={'url': URL+'?connection_limit=1'}) as db:
        await db.execute_raw('SET plan_cache_mode = force_generic_plan' if 'generic' in label else 'SET plan_cache_mode = auto')
        for _ in range(10):
            if label.startswith('before'):
                rows = await db.litellm_endusertable.find_many(where=dict(_restricted_end_user_where()),take=5001)
            else:
                rows = await EndUserRepository(SimpleNamespace(db=db)).find_restricted_ids(5001)
            assert not rows, rows
    with psycopg.connect(URL, autocommit=True) as conn:
        stats = conn.execute('''SELECT query,calls,rows,total_exec_time,mean_exec_time,shared_blks_hit,shared_blks_read
        FROM pg_stat_statements WHERE query LIKE 'SELECT%' AND query LIKE '%LiteLLM_EndUserTable%' AND query LIKE '%blocked%' ''').fetchall()
        conn.execute('SET plan_cache_mode = force_generic_plan' if 'generic' in label else 'SET plan_cache_mode = auto')
        plan = explain(conn, OLD, 'boolean, bigint, bigint, text[]', "true, 5001, 0, '{}'::text[]") if label.startswith('before') else explain(conn,END_USER_RESTRICTED_QUERY,'bigint','5001')
        results[label]={'pg_stat_statements':stats,'explain':plan}
        print(label, json.dumps(results[label]),flush=True)
        OUT.write_text(json.dumps(results,indent=2))

async def main():
    with psycopg.connect(URL,autocommit=True) as conn:
        conn.execute('''INSERT INTO "LiteLLM_EndUserTable" (user_id) SELECT 'anon-' || lpad(n::text, 9, '0')
        FROM generate_series(1,2100000) n ON CONFLICT DO NOTHING''')
        conn.execute('ANALYZE "LiteLLM_EndUserTable"')
        results['rows']=conn.execute('SELECT count(*) FROM "LiteLLM_EndUserTable"').fetchone()[0]
    await measure('before_auto')
    await measure('before_generic')
    with psycopg.connect(URL) as writer:
        writer.execute('INSERT INTO "LiteLLM_EndUserTable" (user_id) VALUES (\'open-before-build\')')
        outcome=[]
        thread=threading.Thread(target=lambda:outcome.append(ensure_request_log_indexes(URL,'public',indexes=(INDEX,))))
        thread.start()
        try:
            deadline=time.monotonic()+30
            with psycopg.connect(URL,autocommit=True) as observer:
                while time.monotonic()<deadline:
                    progress=observer.execute('SELECT phase FROM pg_stat_progress_create_index WHERE relid=\'"LiteLLM_EndUserTable"\'::regclass').fetchall()
                    if progress:
                        break
                    await asyncio.sleep(.05)
                else:
                    raise AssertionError('build never visible')
                observer.execute("SET lock_timeout='1s'")
                start=time.monotonic()
                observer.execute('INSERT INTO "LiteLLM_EndUserTable" (user_id) VALUES (\'insert-during-build\')')
                observer.execute('UPDATE "LiteLLM_EndUserTable" SET alias=\'updated\' WHERE user_id=\'insert-during-build\'')
                results['concurrent_writes']={'phase':progress,'insert_update_ms':(time.monotonic()-start)*1000}
        finally:
            writer.commit()
            thread.join(60)
        assert outcome==[True],outcome
    await measure('after_auto')
    await measure('after_generic')
    with psycopg.connect(URL,autocommit=True) as conn:
        results['index_size']=conn.execute("SELECT pg_size_pretty(pg_relation_size('\"LiteLLM_EndUserTable_restricted_idx\"'))").fetchone()[0]
    OUT.write_text(json.dumps(results,indent=2))

asyncio.run(main())

The statistics columns are query,calls,rows,total_exec_time,mean_exec_time,shared_blks_hit,shared_blks_read. The plan captures use PREPARE and EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) EXECUTE under the same planning mode as the ten Prisma or repository reloads

Reproduce missing-index, building-index, and overflow requests

Run after the live customers exist and the partial index is present, with the tip proxy on port 4195. Save as states.py

LITELLM_LOCAL_MODEL_COST_MAP=True python states.py
import json
import os
import threading
import time

import httpx
import psycopg
from litellm_proxy_extras.request_log_indexes import REQUEST_LOG_INDEXES, ensure_request_log_indexes

URL = os.environ['DATABASE_URL']
INDEX = next(i for i in REQUEST_LOG_INDEXES if i.table == 'LiteLLM_EndUserTable')
results = {}
with httpx.Client(base_url='http://127.0.0.1:4195', timeout=90) as client:
    admin = {'Authorization':'Bearer '+os.environ['LITELLM_MASTER_KEY']}
    response = client.post('/key/generate', headers=admin,json={'models':['qa-haiku']})
    response.raise_for_status()
    auth = {'Authorization':'Bearer '+response.json()['key']}
    def check(phase):
        user = 'zz-qa-'+phase
        response = client.post('/customer/new',headers=admin,json={'user_id':user,'models':['denied-model']})
        assert response.status_code == 200, response.text
        with psycopg.connect(URL,autocommit=True) as observer:
            observer.execute('SELECT pg_stat_statements_reset()')
        statuses = []
        for customer, expected in [(user,403),('anon-000000002',200)]:
            response = client.post('/v1/chat/completions',headers=auth,json={
                'model':'qa-haiku','messages':[{'role':'user','content':'Reply OK.'}],
                'max_tokens':16,'user':customer,'cache':{'no-cache':True},
            })
            statuses.append(response.status_code)
            assert response.status_code == expected, response.text
        with psycopg.connect(URL,autocommit=True) as observer:
            stats=observer.execute('''SELECT calls, rows, mean_exec_time, query FROM pg_stat_statements
            WHERE dbid = (SELECT oid FROM pg_database WHERE datname = current_database())
            AND query LIKE 'SELECT%' AND query LIKE '%LiteLLM_EndUserTable%'
            ORDER BY query''').fetchall()
        results[phase]={'statuses':statuses,'stats':stats}
        print(phase, json.dumps(results[phase]),flush=True)
    with psycopg.connect(URL,autocommit=True) as observer:
        observer.execute('DROP INDEX CONCURRENTLY "LiteLLM_EndUserTable_restricted_idx"')
    check('missing')
    with psycopg.connect(URL) as writer:
        writer.execute('INSERT INTO "LiteLLM_EndUserTable" (user_id) VALUES (\'qa-builder-open\')')
        outcome=[]
        builder=threading.Thread(target=lambda:outcome.append(ensure_request_log_indexes(URL,'public',indexes=(INDEX,))))
        builder.start()
        try:
            deadline = time.monotonic()+30
            with psycopg.connect(URL,autocommit=True) as observer:
                while time.monotonic()<deadline:
                    progress=observer.execute('SELECT phase FROM pg_stat_progress_create_index WHERE relid=\'"LiteLLM_EndUserTable"\'::regclass').fetchall()
                    if progress:
                        break
                    time.sleep(.05)
                else:
                    raise AssertionError('builder not active')
            check('building')
            results['build_phase']=progress
        finally:
            writer.commit()
            builder.join(60)
        assert outcome == [True], outcome
    with psycopg.connect(URL,autocommit=True) as observer:
        observer.execute('''INSERT INTO "LiteLLM_EndUserTable" (user_id,blocked)
        SELECT 'overflow-' || lpad(n::text,5,'0'), true FROM generate_series(1,5001) n''')
    check('overflow')
    assert any(row[1]==5001 and 'ORDER BY user_id LIMIT' in row[3] for row in results['overflow']['stats'])
    with psycopg.connect(URL,autocommit=True) as observer:
        observer.execute('DELETE FROM "LiteLLM_EndUserTable" WHERE user_id LIKE \'overflow-%\'')
with open('states_results.json','w') as stream:
    json.dump(results,stream,indent=2)
Focused database regression commands
LITELLM_LOCAL_MODEL_COST_MAP=True python -m pytest \
  tests/unit/proxy/db/test_prisma_query_span.py \
  tests/unit/proxy/db/test_db_span.py \
  tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py \
  tests/unit/proxy/auth/test_custom_auth_end_user_budget.py \
  tests/unit/proxy/auth/test_user_api_key_auth_request_flow.py \
  tests/unit/litellm_proxy_extras/test_request_log_indexes.py \
  tests/unit/repositories -q

LITELLM_LOCAL_MODEL_COST_MAP=True python -m pytest \
  tests/integration/database/migrations/test_request_log_indexes.py \
  -k 'partial_workaround or different_partial_predicate or pending_migration_upgrade or failed_end_user or end_user_writes or literal_restricted_ids or generic_registry' -q

LITELLM_LOCAL_MODEL_COST_MAP=True python -m pytest \
  tests/integration/database/migrations/test_request_log_indexes.py \
  -k 'generic_registry or plain_spend_logs_upgrade or partitioned_spend_logs_upgrade or valid_index_of_the_same or another_definition or second_copy' -q

make check

These integration cases run locally here and in the existing scheduled integration group. They are not enabled on this PR by adding run-ci

Type

Bug Fix

Caveats

Release packaging

The normal release process bumps litellm-proxy-extras with LiteLLM and updates core's extras pin. Released proxies therefore include this query and index without a separate publication or manual pin change for this PR. QA used the updated workspace package

CI image smoke investigation

The verify (migrations) and verify (backend) image checks fail in the admin MCP tools/list probe with KeyError: 'result'. Database migration itself passed. Two CI reruns were requested, with no test disabled or weakened

The downloaded runtime image reproduces the failure both at the tip and after mounting merge-base versions of all three changed production files, auth_checks.py, table_repositories.py, and request_log_indexes.py. Both unified and backend startup reproduce it with the merge-base files. A diagnostic print reveals the same RPC error in each case

MCP-DISCOVERY 200 {'code': -32001, 'message': 'Gateway operation changed for create_budget; update the connector before using it.'}
KeyError: 'result'

This isolates the connector-schema mismatch from this PR's runtime changes. The source, registry, auth, index-builder, type, lint, unit, and build checks pass. See the image workflow for the final retry status

Medium

  • Failed builds keep scan cost until an existing retry succeeds
  • Blocked-callback denial was not established end to end

Low

  • PostgreSQL versions beyond 14 were not tested locally

Final Attestation

  • The tests cover every possible regression in real-world use

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@veria-ai

veria-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 44 untouched benchmarks


Comparing litellm_restricted_end_user_index (506cd87) with main (01de1a6)

Open in CodSpeed

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach end-user authentication queries and the database upgrade path.

Publish updated extras and update the core pin before merging.

Findings

  1. P1 Older extras disable the shortcut ▶

Summary

The PR adds a partial index for restricted customers and changes registry refreshes to read only their IDs.

  • Restricted-user refreshes read only IDs through a matching partial index.
  • Database upgrades keep the restricted-user index available.

Reviews (1) · Last reviewed commit: "test(auth): update end-user registry dat..." · Reviewed by Greptile

Comment on lines +278 to +279
module: Final = import_module("litellm_proxy_extras.request_log_indexes")
query: Final = _END_USER_QUERY.validate_python(module.END_USER_RESTRICTED_QUERY)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Older extras disable the shortcut

litellm[proxy] still pins litellm-proxy-extras==0.4.116, but this read now requires the newly added END_USER_RESTRICTED_QUERY. If the installed wheel predates this constant, every registry refresh raises AttributeError and falls back to individual customer reads. Publish updated extras and update the core pin before shipping.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We bump litellm-proxy-extras together with litellm on every release, so a released proxy always installs the extras version that has this query.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That release coupling addresses the concern for shipped versions. An older extras package would miss the optimization and use the existing per-user fallback, but it would not break auth; since you bump extras alongside LiteLLM, this isn’t a release blocker. I should have framed it as release-packaging coordination, which the PR already documents, rather than as an outstanding issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I overstated this risk. Releases update extras and core together, so no separate publication is needed. I’ll correct the PR description.

Written by Devin

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Image smoke tests reproduce the same connector-schema failure with all three production files restored to their merge-base versions. CI

Written by Devin

@kerry-berri
kerry-berri merged commit c4b915b into main Nov 17, 2026
114 of 121 checks passed
@kerry-berri
kerry-berri deleted the litellm_restricted_end_user_index branch November 17, 2026 23:15
yuneng-berri added a commit that referenced this pull request Nov 24, 2026
…08_x

fix(auth): backport #51772 restricted end-user index to lts/1.108.x
yuneng-berri added a commit that referenced this pull request Nov 24, 2026
fix(auth): backport #51772 restricted end-user index to rc/1.111.0
mateo-berri pushed a commit to norkelbyte/litellm that referenced this pull request Nov 24, 2026
Backport of BerriAI#51772 to lts/1.108.x, adapted to the line's EndUserRepository (no _selected_database there).
Cherry-picked from c4b915b (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
yuneng-berri added a commit that referenced this pull request Nov 24, 2026
…1_110_x

fix(auth): backport #51772 restricted end-user index to stable/1.110.x for v1.110.4
yuneng-berri added a commit that referenced this pull request Nov 25, 2026
…1_109_x

fix(auth): backport #51772 restricted end-user index to stable/1.109.x for v1.109.5
DeoLeung pushed a commit to aiyou178/litellm that referenced this pull request Nov 25, 2026
* fix(auth): index restricted end-user registry refreshes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(auth): retain named database spans for registry reloads

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(auth): update end-user registry database doubles

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit c4b915b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants