litellm/tests/unit/proxy/management_endpoints/management_v1
moe-berri a435090b9d
feat(proxy): let each app decide whether it may create unknown customers (#52485)
* feat(customer-portal): set budgets per customer and gateway app

Let administrators choose Teams, Projects, or Virtual Keys as the gateway-wide app scope and assign customer budgets from existing budget groups.

Includes the shared budget-group integration from PR #52411 and builds on the existing app accounting implementation.

* fix(customer-portal): show app usage and resolve CI regressions

Use the existing dashboard controls and compact budget rows. Add app filtering to customer usage and retain trusted app context for budget rejections.

Update request-header handling, tracing registry coverage, bounded app discovery, and optional caller-metadata tests.

* feat(proxy): let each app decide whether it may create unknown customers

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

* style: sort imports

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

* fix(ui): lock the app customer switch while its save is pending

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

* fix(proxy): refuse an unknown organization alias sent with a known member

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

* fix(proxy): refuse an unknown customer before reporting its organization's budget

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

* refactor(ui): move the no-app customer switch into its own component

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

* feat(customer-portal): set budgets per customer and gateway app

Let administrators choose Teams, Projects, or Virtual Keys as the gateway-wide app scope and assign customer budgets from existing budget groups.

Includes the shared budget-group integration from PR #52411 and builds on the existing app accounting implementation.

* fix(customer-portal): show app usage and resolve CI regressions

Use the existing dashboard controls and compact budget rows. Add app filtering to customer usage and retain trusted app context for budget rejections.

Update request-header handling, tracing registry coverage, bounded app discovery, and optional caller-metadata tests.

* fix(customer-portal): enforce app caps and charge each window once

Enforce an authenticated app budget when optional customer and app headers are omitted. Normalize overlapping scalar and explicit budget windows to a single charge with the stricter cap and explicit reset time.

Cover all app primitives through native HTTP auth and use realistic empty gateway configuration in existing test doubles.

* fix(customer-portal): reuse budget controls and admission

Use shared customer budget controls for app forms and resolve member budgets at one owner. Remove unused app lifecycle and listing routes.

Parse request identity once, check each global and app scope once, and keep app counters alive through the existing database flush window.

* fix(customer-portal): preserve app attribution for deferred costs

Persist the original trusted customer and app billing context on managed jobs. Restore it in batch and background cost polling with the original request time, preserving admission windows and existing claim behavior.

Recognize the India Bedrock model prefix in dashboard model setup.

* fix(ci): make migration repeatable and await scoped callbacks

Set the required migration lock timeout and add the billing-context column only if it is absent.

Use per-request completion test callbacks and await the MCP panel failure notification. Keep response, pricing, and complete callback-sequence assertions.

* fix(ui): align Bedrock profile parsing with main

Use the upstream country-prefix handling to clear the model-setup merge conflict.

* refactor(proxy): resolve a customer under its registration rules in one helper

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

---------

Co-authored-by: ishaan-j-berri <ishaan.j@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-18 19:42:27 +00:00
..
__init__.py test(proxy): move management_endpoints, management_helpers and guardrails tests into tests/unit/proxy (#44003) 2026-10-01 10:52:03 -07:00
test_apps.py feat(proxy): let each app decide whether it may create unknown customers (#52485) 2026-11-18 19:42:27 +00:00
test_budgets.py feat(proxy): customer budget rollup, reset on the budget row's window, named templates, team overrides, multi-window limits and pause_allow_increase (#51582) 2026-11-13 16:05:35 +00:00
test_customer_budget_increase_requests.py feat(proxy): pick the customer organization's default budget template by name on create and by id on patch (#51636) 2026-11-13 17:10:04 +00:00
test_customer_usage.py feat(customer portal): set budgets per customer and gateway app (#52477) 2026-11-18 17:31:03 +00:00
test_customers.py feat(customer-portal): reuse budget groups for organizations (#52411) 2026-11-18 00:01:17 -08:00
test_spend_logs.py fix(proxy): share ownership permissions for spend logs and traces (#44239) 2026-10-03 01:38:54 +00:00
test_teams.py feat(proxy): page team members and stop loading full rosters for /team/info callers (#51885) 2026-11-17 16:30:52 -08:00
test_users.py test(proxy): move management_endpoints, management_helpers and guardrails tests into tests/unit/proxy (#44003) 2026-10-01 10:52:03 -07:00