litellm/tests/unit/proxy/common_utils
moe-berri 35b3e84b08
feat(proxy): opt-in response headers for app customer org and member budgets per window (#54483)
* feat(proxy): report app customer org and member budget windows in response headers

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

* fix(proxy): report only the calling app's customer budgets in response headers

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

* fix(proxy): read customer budget windows without a nested async comprehension, which Python 3.10 rejects

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

* feat(proxy): put customer budget response headers behind general_settings.customer_budget_response_headers

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

* chore(rust): add customer_budget_response_headers to the gateway's copy of the managed general settings keys

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

* fix(proxy): keep a budget rejection a 422 when a later customer window cannot be read, and strip whitespace from window header names

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

* fix(proxy): keep only letters and digits of a budget duration in customer budget header names

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

* fix(proxy): report the tighter budget when two windows share a customer budget header name

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>
2026-11-25 13:18:53 -08:00
..
html_forms
__init__.py
test_admin_ui_utils.py
test_budget_alerts.py
test_cache_aware_routing.py
test_cache_codec.py
test_cache_invalidation_pubsub.py refactor(auth_cache_invalidation): move the invalidation channel to the native client (#51135) 2026-11-21 18:58:27 +09:00
test_callback_config_validation.py fix(proxy): normalize metadata logging and tolerate malformed stored values (#51719) 2026-11-23 10:57:37 -08:00
test_callback_lifecycle.py
test_callback_utils.py feat(otel): add option to disable background service spans (#54478) 2026-11-25 12:28:04 -08:00
test_check_batch_cost.py fix(batches): keep the endpoint a batch was created for on retrieve, cancel and cost polling (#50784) 2026-11-24 05:42:08 -08:00
test_check_responses_cost.py
test_codex_catalog_source.py
test_codex_model_catalog.py
test_codex_model_translation.py
test_codex_version.py
test_config_sync_pubsub.py feat(rust-gateway): read the stored config again when the proxy announces a change on Redis (#54054) 2026-11-25 03:26:50 +00:00
test_credential_hydration.py
test_custom_openapi_spec.py
test_customer_budget_headers.py feat(proxy): opt-in response headers for app customer org and member budgets per window (#54483) 2026-11-25 13:18:53 -08:00
test_customer_usage.py
test_debug_utils.py
test_discoverable_model_filter.py
test_encrypt_decrypt_utils.py
test_error_body_call_id.py
test_expired_ui_session_key_cleanup_manager.py
test_fips.py
test_get_routes.py
test_hook_cache.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_http_parsing_utils.py fix(auth): enforce key budgets on Google generateContent calls that leave the model out of the URL (#53404) 2026-11-22 22:04:46 +00:00
test_json_merge_patch.py
test_key_expiry_alert_manager.py
test_key_rotation_e2e.py
test_key_rotation_integration.py
test_key_rotation_lock.py
test_key_rotation_manager.py
test_ldap_directory.py feat(proxy): sync LDAP groups to team memberships (#50130) 2026-11-24 11:13:49 -08:00
test_ldap_sync.py feat(proxy): sync LDAP groups to team memberships (#50130) 2026-11-24 11:13:49 -08:00
test_load_config_utils.py
test_model_deprecation.py
test_model_listing_utils.py
test_openai_endpoint_utils.py
test_openai_error_payload.py fix(proxy): redact credential-named provider error fields that the name check skipped (#54302) 2026-11-24 23:54:47 +00:00
test_openapi_route.py
test_openapi_schema_compat.py
test_periodic_reload_schedule.py
test_proxy_encrypt_decrypt.py
test_proxy_rate_limit_error.py
test_rbac_utils.py
test_realtime_cache.py
test_registry_read_through.py fix(openrouter): report the context window and output cap from OpenRouter's catalog (#54046) 2026-11-24 04:37:30 -08:00
test_request_tag_mappings.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_reset_budget_job.py feat(proxy)!: carry unused budget into the next period with a cap (#53309) 2026-11-22 02:05:03 -08:00
test_resource_ownership.py
test_scheduled_job_stagger.py
test_semantic_text_index.py
test_slow_gc_logger.py
test_sse_keepalive.py fix(guardrails): classify only the frames each read completes in Presidio's first-frame wait (#54379) 2026-11-25 11:15:49 +00:00
test_static_asset_utils.py
test_swagger_utils.py
test_timezone_utils.py
test_token_count_log.py
test_token_count_settings.py
test_upsert_budget_membership.py fix(proxy): keep a temp budget increase on a team default member following the team default (#54307) 2026-11-25 02:21:37 +00:00
test_user_api_key_cache.py perf(proxy): read only the needed team fields from the auth cache (#53909) 2026-11-23 12:53:14 -08:00
test_validation_error_body.py