Skip to content

fix: models loadbalancing billing issue by filter (#18891)#19220

Merged
krrishdholakia merged 2 commits intoBerriAI:litellm_oss_staging_01_31_2026from
Harshit28j:fix/model_load_balance_handle_v2
Jan 31, 2026
Merged

fix: models loadbalancing billing issue by filter (#18891)#19220
krrishdholakia merged 2 commits intoBerriAI:litellm_oss_staging_01_31_2026from
Harshit28j:fix/model_load_balance_handle_v2

Conversation

@Harshit28j
Copy link
Collaborator

@Harshit28j Harshit28j commented Jan 16, 2026

Relevant issues

Fixes #18333 (models loadbalancing billing issue by filter)

This PR re-applies the fix for models load balancing billing issue by filter (originally #18891, which was reverted in revert-18891-fix/model_load_balance_handle).

  • Cherry-picked the original commits cleanly onto the latest main
  • resolved merge conflicts, ensuring Prometheus metrics code is preserved
  • Both the Prometheus user spend/budget tracking AND the access groups filtering logic are now present

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🐛 Bug Fix

Testing:

All 10 tests in test_filter_deployments_by_access_groups.py pass


* fix: models loadbalancing billing issue by filter

* fix: separate key and team access groups in metadata
@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
litellm Error Error Jan 16, 2026 1:15pm

Review with Vercel Agent

@Harshit28j
Copy link
Collaborator Author

@Sameerlite please review this PR

Copy link
Collaborator

@Sameerlite Sameerlite left a comment

Choose a reason for hiding this comment

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

LGTM

@krrishdholakia krrishdholakia changed the base branch from main to litellm_oss_staging_01_31_2026 January 31, 2026 18:31
@krrishdholakia krrishdholakia merged commit f47fbb4 into BerriAI:litellm_oss_staging_01_31_2026 Jan 31, 2026
4 of 7 checks passed
Sameerlite pushed a commit that referenced this pull request Feb 2, 2026
* fix: models loadbalancing billing issue by filter (#18891)

* fix: models loadbalancing billing issue by filter

* fix: separate key and team access groups in metadata

* fix: lint issues
Sameerlite added a commit that referenced this pull request Feb 3, 2026
@greptile-apps greptile-apps bot mentioned this pull request Feb 3, 2026
6 tasks
Sameerlite added a commit that referenced this pull request Feb 3, 2026
@greptile-apps greptile-apps bot mentioned this pull request Feb 3, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CRITICAL - Models loadbalanced outside of Model Access Group

3 participants