litellm/litellm
devin-ai-integration[bot] c6c3881d7f
fix(proxy): share model rate-limit buckets between a model_group_alias and its target (#42516)
* fix(proxy): share model rate-limit buckets between a model_group_alias and its target

A request sent under a model_group_alias counted in its own per-key, per-team,
per-org, and per-project model bucket, so a key could double a deployment's
default_api_key_rpm_limit / tpm_limit by alternating the alias and the model
group name, and a metadata model_rpm_limit / model_tpm_limit keyed by the
model group never applied to alias requests. The limiter now resolves the
requested name to its model group before keying any model bucket, looks the
limit up by the requested name first and the model group second, and charges
post-call tokens to the same bucket.

* fix(proxy): charge the model group resolved at admission when reconciling reserved tokens

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-22 13:31:58 -07:00
..
a2a_protocol Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-21 12:57:38 -07:00
anthropic_interface feat(proxy): opt-in litellm_call_id in JSON error bodies (#42391) 2026-09-21 19:17:18 -07:00
assistants
batch_completion
batches Merge remote-tracking branch 'origin/main' into litellm_mistral_ocr_batches 2026-09-18 21:51:33 -07:00
caching refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
chat_completions feat(rust-bridge): add cache and secret migration foundations (#42328) 2026-09-22 03:41:04 +00:00
completion_extras Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-21 12:57:38 -07:00
compression merge: main into litellm_headroom_protect_cached_prefix 2026-09-15 04:12:28 +00:00
containers docs: stop advertising sk-1234 as the master key in shipped configs and examples 2026-09-19 12:59:48 -07:00
endpoints/speech/speech_to_completion_bridge
evals
experimental_mcp_client fix(mcp): restore legacy SSE and bounded cancellation cleanup (#42382) 2026-09-22 11:27:50 -07:00
files Merge remote-tracking branch 'origin/main' into litellm_mistral_ocr_batches 2026-09-18 21:51:33 -07:00
fine_tuning
google_genai fix(google_genai): drop non-object tool parameters instead of forwarding them 2026-09-19 19:19:33 -07:00
images Merge branch 'main' into litellm_add_edenai_provider 2026-09-21 19:34:49 +00:00
integrations fix(websearch_interception): keep intercepted searches under the parent request's session and trace (#41711) 2026-09-22 12:35:27 -07:00
interactions refactor(types): replace Any with proven types in 34 files 2026-09-20 10:16:48 +00:00
litellm_core_utils feat: add configurable provider affinity header mapping (#41033) 2026-09-22 13:31:33 -07:00
llms feat: add configurable provider affinity header mapping (#41033) 2026-09-22 13:31:33 -07:00
messages feat(rust-bridge): add cache and secret migration foundations (#42328) 2026-09-22 03:41:04 +00:00
models fix(mcp): keep config-defined servers read-only (#42299) 2026-09-21 22:56:21 -07:00
ocr feat(rust-bridge): add cache and secret migration foundations (#42328) 2026-09-22 03:41:04 +00:00
passthrough Merge pull request #41557 from BerriAI/litellm_azure_speech_passthrough 2026-09-18 14:05:55 -07:00
proxy fix(proxy): share model rate-limit buckets between a model_group_alias and its target (#42516) 2026-09-22 13:31:58 -07:00
proxy_auth
rag fix(types): read upstream headers through a typed helper 2026-09-21 13:16:58 -07:00
realtime_api Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-21 12:57:38 -07:00
repositories Merge remote-tracking branch 'origin/main' into litellm_decrease_anys_opus5_r5 2026-09-21 12:57:38 -07:00
rerank_api
responses feat: add configurable provider affinity header mapping (#41033) 2026-09-22 13:31:33 -07:00
router_strategy feat(router): native compact-to-fit across conversation APIs (#42074) 2026-09-21 22:52:29 -07:00
router_utils feat(router): add group-scoped priority routing strategy (#42378) 2026-09-22 13:09:38 -07:00
rust_bridge refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
sandbox
search
secret_managers fix(aws_secret_manager_v2): restore secret scheduled for deletion instead of failing CreateSecret (#42454) 2026-09-22 14:12:20 -05:00
skills
types feat: add configurable provider affinity header mapping (#41033) 2026-09-22 13:31:33 -07:00
vector_store_files
vector_stores refactor: replace Any with precise types across 54 modules 2026-09-14 11:13:39 +00:00
videos
__init__.py feat(fal_ai): add flux-lora-depth image edits and moondream3 chat completions (#42334) 2026-09-21 19:01:28 -07:00
_internal_context.py
_lazy_imports.py feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
_lazy_imports_registry.py feat(fal_ai): add flux-lora-depth image edits and moondream3 chat completions (#42334) 2026-09-21 19:01:28 -07:00
_logging.py refactor(types): replace Any with proven types in 32 files 2026-09-21 10:51:46 +00:00
_redis.py fix(redis): accept every truthy flag and sign serverless ElastiCache caches 2026-09-10 10:13:03 -04:00
_redis_credential_provider.py fix(redis): accept every truthy flag and sign serverless ElastiCache caches 2026-09-10 10:13:03 -04:00
_service_logger.py
_uuid.py
_version.py
anthropic_beta_headers_config.json feat(router): native compact-to-fit across conversation APIs (#42074) 2026-09-21 22:52:29 -07:00
anthropic_beta_headers_manager.py fix: drop a blank anthropic-beta header before it reaches the provider 2026-09-19 20:13:59 -07:00
blog_posts.json
budget_manager.py
constants.py Merge pull request #41213 from BerriAI/litellm_spend_log_cleanup_cancel_outcome 2026-09-21 17:03:25 -07:00
cost.json
cost_calculator.py fix(cost): honor deployment pricing for image generation (#39311) 2026-09-22 11:40:39 -07:00
exceptions.py feat(proxy): add budget_exceeded_status_code setting to restore 429 for budget refusals 2026-09-20 07:00:10 +00:00
main.py feat: add configurable provider affinity header mapping (#41033) 2026-09-22 13:31:33 -07:00
model_prices_and_context_window_backup.json chore(prices): sync Baseten prices: 12 models, 9 new [enrichment failed: Baseten, 15 held] (#42558) 2026-09-22 13:24:49 -07:00
policy_templates_backup.json
provider_endpoints_support_backup.json Merge pull request #41101 from hMED22/litellm_add_edenai_provider 2026-09-21 16:16:28 -05:00
py.typed
router.py feat(router): add group-scoped priority routing strategy (#42378) 2026-09-22 13:09:38 -07:00
scheduler.py
setup_wizard.py feat(anthropic): add Claude Opus 5.5 (#42489) 2026-09-22 09:52:35 -07:00
timeout.py
utils.py fix(utils): stop a nested additional_drop_params entry from crashing openai-compatible calls (#42492) 2026-09-22 10:50:49 -07:00