Skip to content

[Infra] Merging RC Branch with Main#23786

Merged
12 commits merged intomainfrom
litellm_rc_branch
Mar 16, 2026
Merged

[Infra] Merging RC Branch with Main#23786
12 commits merged intomainfrom
litellm_rc_branch

Conversation

@yuneng-jiang
Copy link
Copy Markdown
Contributor

@yuneng-jiang yuneng-jiang commented Mar 16, 2026

Relevant issues

Fully Passing CI/CD: https://app.circleci.com/pipelines/github/BerriAI/litellm?branch=litellm_rc_branch

Pre-Submission checklist

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

  • I have Added testing in the tests/test_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
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

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

🚄 Infrastructure

Changes

cursoragent and others added 12 commits March 1, 2026 00:17
The test was missing mocks for extract_mcp_auth_context and set_auth_context,
causing the handler to fail silently in the except block instead of reaching
session_manager.handle_request. This mirrors the fix already applied to the
sibling test_sse_mcp_handler_mock.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
… tests

The test_anthropic_messages_openai_model_streaming_cost_injection test fails
because the OpenAI Responses API returns 400 for requests routed through the
Anthropic Messages endpoint. Setting LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES=true
routes OpenAI models through the stable chat completions path instead.
Cost injection still works since it happens at the proxy level.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
1. custom_auth_basic.py: Add user_role='proxy_admin' so the custom auth
   user can access management endpoints like /key/generate. The test
   test_assemblyai_transcribe_with_non_admin_key was hidden behind an
   earlier -x failure and was never reached before.

2. test_router_utils.py: Add flaky(retries=3) and increase sleep from 1s
   to 2s for test_router_get_model_group_usage_wildcard_routes. The async
   callback needs time to write usage to cache, and 1s is insufficient on
   slower CI hardware.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
…auth_basic

Fixes mypy error: Argument 'user_role' has incompatible type 'str'; expected 'LitellmUserRoles | None'

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
* fix: don't close HTTP/SDK clients on LLMClientCache eviction

Removing the _remove_key override that eagerly called aclose()/close()
on evicted clients. Evicted clients may still be held by in-flight
streaming requests; closing them causes:

  RuntimeError: Cannot send a request, as the client has been closed.

This is a regression from commit fb72979. Clients that are no longer
referenced will be garbage-collected naturally. Explicit shutdown cleanup
happens via close_litellm_async_clients().

Fixes production crashes after the 1-hour cache TTL expires.

* test: update LLMClientCache unit tests for no-close-on-eviction behavior

Flip the assertions: evicted clients must NOT be closed. Replace
test_remove_key_closes_async_client → test_remove_key_does_not_close_async_client
and equivalents for sync/eviction paths.

Add test_remove_key_removes_plain_values for non-client cache entries.
Remove test_background_tasks_cleaned_up_after_completion (no more _background_tasks).
Remove test_remove_key_no_event_loop variant that depended on old behavior.

* test: add e2e tests for OpenAI SDK client surviving cache eviction

Add two new e2e tests using real AsyncOpenAI clients:
- test_evicted_openai_sdk_client_stays_usable: verifies size-based eviction
  doesn't close the client
- test_ttl_expired_openai_sdk_client_stays_usable: verifies TTL expiry
  eviction doesn't close the client

Both tests sleep after eviction so any create_task()-based close would
have time to run, making the regression detectable.

Also expand the module docstring to explain why the sleep is required.

* docs(AGENTS.md): add rule — never close HTTP/SDK clients on cache eviction

* docs(CLAUDE.md): add HTTP client cache safety guideline
The security_scans.sh script uses `column` to format vulnerability
output, but the package wasn't installed in the CI environment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When callbacks are configured as a plain string (e.g., `callbacks: "my_callback"`)
instead of a list, the proxy crashes on startup with:
  TypeError: can only concatenate str (not "list") to str

Normalize each callback setting to a list before concatenating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nforcement

The --enforce_prisma_migration_check flag is now required to trigger
sys.exit(1) on DB migration failure, after #23675 flipped the default
behavior to warn-and-continue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hen router_model_id has no pricing

When custom pricing is passed as per-request kwargs (input_cost_per_token/output_cost_per_token),
completion() registers pricing under the model name, but _select_model_name_for_cost_calc was
selecting the router deployment hash (which has no pricing data), causing response_cost to be 0.0.

Now checks whether the router_model_id entry actually has pricing before preferring it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Mar 23, 2026 5:16pm

Request Review

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ishaan-jaff
✅ yuneng-jiang
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq bot commented Mar 16, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing litellm_rc_branch (6140927) with main (3dccdde)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR merges the RC branch into main as a v1.82.3 release, bundling two bug fixes, a test stabilisation pass, CI improvements, and a large set of pre-built frontend assets.

Key changes:

  • litellm/cost_calculator.py – Fixes a regression where per-request custom pricing passed via Router returned 0.0 cost. The router registers each deployment under a hash ID in model_cost (without pricing fields); the fix now checks whether that entry actually carries pricing data before using it over the raw model name.
  • litellm/proxy/proxy_cli.py – Fixes a TypeError crash in the Prometheus multiproc-dir auto-setup when callbacks/success_callback/failure_callback are configured as a plain string instead of a list.
  • tests/test_litellm/proxy/test_proxy_cli.py – The test_startup_fails_when_db_setup_fails test now requires --enforce_prisma_migration_check to trigger the exit-on-failure path, reflecting an intentional (but backwards-incompatible) default-behavior change: the proxy now continues startup when DB migration fails unless the flag is explicitly set.
  • tests/mcp_tests/test_mcp_server.py – Adds a missing mock for set_auth_context so the streamable-HTTP handler test does not crash when a None auth context is returned by the already-mocked auth extractor.
  • CI / infra – Adds bsdmainutils to the security scan dependency list, adds an Anthropic pass-through env flag to the CI job, and bumps the version to 1.82.3.

Confidence Score: 4/5

  • PR is safe to merge with one notable concern: the DB-migration-failure default behavior was flipped from exit-on-failure to continue-on-failure, which is a backwards-incompatible default change.
  • Both code bug fixes are well-reasoned and accompanied by regression tests. The flaky-test stabilisation and mock additions are legitimate. The main risk is the silent behavior change to DB migration failure handling — users who relied on the proxy exiting when migration fails will now see it continue without opting in to --enforce_prisma_migration_check.
  • tests/test_litellm/proxy/test_proxy_cli.py — the updated test now requires --enforce_prisma_migration_check to assert exit-on-failure, masking the default-behavior regression for existing users.

Important Files Changed

Filename Overview
litellm/cost_calculator.py Bug fix: when router_model_id is present in model_cost but has no pricing fields, fall back to the model name. Minor: only checks input_cost_per_token / input_cost_per_second, skipping output_cost_per_token.
litellm/proxy/proxy_cli.py Bug fix: normalizes string callbacks/success_callback/failure_callback values to lists before concatenation, preventing TypeError when Prometheus multiproc dir auto-setup runs.
tests/test_litellm/proxy/test_proxy_cli.py Test updated to add --enforce_prisma_migration_check flag, which reflects a backwards-incompatible default behavior change: the proxy no longer exits on DB setup failure without the explicit flag.
tests/test_litellm/proxy/test_prometheus_cleanup.py New parametrized test verifies that string-typed callback values (not lists) are handled without a TypeError — good regression coverage for the proxy_cli.py fix.
tests/test_litellm/test_cost_calculator.py New regression test for per-request custom pricing with Router correctly exercises the cost_calculator fix and verifies the router_model_id is not used when it has no pricing data.
tests/local_testing/test_router_utils.py Adds @pytest.mark.flaky(retries=3, delay=1) and increases sleep to 2 s for a timing-sensitive test — reasonable stabilisation for a mock-based async test.
litellm/proxy/example_config_yaml/custom_auth_basic.py Adds user_role=LitellmUserRoles.PROXY_ADMIN to the example custom auth handler, improving the example's completeness.
.circleci/config.yml Adds LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES=true env var to the pass-through CI job, enabling the Anthropic messages route test.
ci_cd/security_scans.sh Adds bsdmainutils to the apt-get install list, which provides the column utility needed by the security scanning script on Debian/Ubuntu CI runners.
pyproject.toml Version bump from 1.82.2 to 1.82.3 in both [tool.poetry] and [tool.commitizen] sections.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Router.acompletion / completion] --> B{custom_pricing=True?}
    B -- No --> C[Use completion_response model / base_model / model]
    B -- Yes --> D{router_model_id in model_cost?}
    D -- No --> E[return_model = model]
    D -- Yes --> F{entry has input_cost_per_token\nor input_cost_per_second?}
    F -- Yes --> G[return_model = router_model_id]
    F -- No --> E
    G --> H[cost_calculator uses router_model_id pricing]
    E --> I[cost_calculator uses model-name pricing]

    subgraph proxy_cli fix
        J[litellm_settings callbacks value] --> K{is string?}
        K -- Yes --> L[wrap in list]
        K -- No --> M[use as-is]
        L --> N[check 'prometheus' in all_callbacks]
        M --> N
    end
Loading

Last reviewed commit: 6140927

Comment on lines 718 to 722
with pytest.raises(SystemExit) as exc_info:
run_server.main(
["--local", "--skip_server_startup"], standalone_mode=False
["--local", "--skip_server_startup", "--enforce_prisma_migration_check"], standalone_mode=False
)
assert exc_info.value.code == 1
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.

Backwards-incompatible default behavior change

The test was updated to add --enforce_prisma_migration_check to the invocation, reflecting a change in proxy_cli.py where the proxy now continues running when PrismaManager.setup_database returns False (unless the new flag is explicitly set). This is a backwards-incompatible change to the default behavior per rule b48b7341.

Previously, a failed DB setup caused a sys.exit(1) unconditionally. Now the proxy will silently continue with a warning unless --enforce_prisma_migration_check / ENFORCE_PRISMA_MIGRATION_CHECK=true is set. Users who relied on the proxy exiting to signal a broken DB migration (e.g., in health checks or orchestration scripts) will no longer get that signal by default.

Consider whether the old default (exit on failure) should be preserved, with an opt-out flag like --ignore_prisma_migration_failure instead of an opt-in flag.

Rule Used: What: avoid backwards-incompatible changes without... (source)

Comment on lines 661 to 672
if custom_pricing is True:
if router_model_id is not None and router_model_id in litellm.model_cost:
return_model = router_model_id
entry = litellm.model_cost[router_model_id]
if (
entry.get("input_cost_per_token") is not None
or entry.get("input_cost_per_second") is not None
):
return_model = router_model_id
else:
return_model = model
else:
return_model = model
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.

Missing check for output_cost_per_token

The pricing-existence check only gates on input_cost_per_token or input_cost_per_second, but a router entry could theoretically have only output_cost_per_token set (e.g., a model where input is free but output is charged). In that scenario, the entry would be treated as "no pricing" and fall back to the raw model name.

Consider extending the guard to cover additional pricing fields for completeness:

Suggested change
if custom_pricing is True:
if router_model_id is not None and router_model_id in litellm.model_cost:
return_model = router_model_id
entry = litellm.model_cost[router_model_id]
if (
entry.get("input_cost_per_token") is not None
or entry.get("input_cost_per_second") is not None
):
return_model = router_model_id
else:
return_model = model
else:
return_model = model
if (
entry.get("input_cost_per_token") is not None
or entry.get("input_cost_per_second") is not None
or entry.get("output_cost_per_token") is not None
):
return_model = router_model_id
else:
return_model = model

@ghost ghost merged commit 278c9ba into main Mar 16, 2026
104 of 109 checks passed
ishaan-jaff added a commit that referenced this pull request Mar 17, 2026
…3382)

* fix: langfuse trace leak key on model params

* fix: pop sensitive keys from langfuse

* fixes

* fix: set oauth2_flow when building MCPServer in _execute_with_mcp_client

* fix: add oauth2_flow to NewMCPServerRequest and guard auto-detect with token_url

* fix: narrow oauth2_flow type to Literal in NewMCPServerRequest

* fix: align DefaultInternalUserParams Pydantic default with runtime fallback

The Pydantic default for user_role was INTERNAL_USER, but all runtime
provisioning paths (SSO, SCIM, JWT) fall back to INTERNAL_USER_VIEW_ONLY
when no settings are saved. This caused the UI to show "Internal User"
on fresh instances while new users actually got "Internal Viewer".

* test: add regression test for fresh-instance default role sync

Asserts that GET /get/internal_user_settings returns
INTERNAL_USER_VIEW_ONLY on a fresh DB with no saved settings,
matching the runtime fallback in SSO/SCIM/JWT provisioning.

* Update tests/test_litellm/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Add unit tests for 5 previously untested UI dashboard files

Tests added for: UiLoadingSpinner, HashicorpVaultEmptyPlaceholder,
PageVisibilitySettings, errorUtils, and mcpToolCrudClassification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove skip decorators from m2m tests now that oauth2_flow is set

* [Fix] Privilege escalation: restrict /key/block, /key/unblock, and max_budget updates to admins

Non-admin users (INTERNAL_USER) could call /key/block and /key/unblock on
arbitrary keys, and modify max_budget on their own keys via /key/update.
These endpoints are now restricted to proxy admins, team admins, or org admins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(ui): migrate DefaultUserSettings buttons from Tremor to antd

* [Infra] Merging RC Branch with Main (#23786)

* fix(test): add missing mocks for test_streamable_http_mcp_handler_mock

The test was missing mocks for extract_mcp_auth_context and set_auth_context,
causing the handler to fail silently in the except block instead of reaching
session_manager.handle_request. This mirrors the fix already applied to the
sibling test_sse_mcp_handler_mock.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix(ci): route OpenAI models through chat completions in pass-through tests

The test_anthropic_messages_openai_model_streaming_cost_injection test fails
because the OpenAI Responses API returns 400 for requests routed through the
Anthropic Messages endpoint. Setting LITELLM_USE_CHAT_COMPLETIONS_URL_FOR_ANTHROPIC_MESSAGES=true
routes OpenAI models through the stable chat completions path instead.
Cost injection still works since it happens at the proxy level.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix(ci): fix assemblyai custom auth and router wildcard test flakiness

1. custom_auth_basic.py: Add user_role='proxy_admin' so the custom auth
   user can access management endpoints like /key/generate. The test
   test_assemblyai_transcribe_with_non_admin_key was hidden behind an
   earlier -x failure and was never reached before.

2. test_router_utils.py: Add flaky(retries=3) and increase sleep from 1s
   to 2s for test_router_get_model_group_usage_wildcard_routes. The async
   callback needs time to write usage to cache, and 1s is insufficient on
   slower CI hardware.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* ci: retrigger CI pipeline

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix(mypy): use LitellmUserRoles enum instead of raw string in custom_auth_basic

Fixes mypy error: Argument 'user_role' has incompatible type 'str'; expected 'LitellmUserRoles | None'

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix: don't close HTTP/SDK clients on LLMClientCache eviction (#22926)

* fix: don't close HTTP/SDK clients on LLMClientCache eviction

Removing the _remove_key override that eagerly called aclose()/close()
on evicted clients. Evicted clients may still be held by in-flight
streaming requests; closing them causes:

  RuntimeError: Cannot send a request, as the client has been closed.

This is a regression from commit fb72979. Clients that are no longer
referenced will be garbage-collected naturally. Explicit shutdown cleanup
happens via close_litellm_async_clients().

Fixes production crashes after the 1-hour cache TTL expires.

* test: update LLMClientCache unit tests for no-close-on-eviction behavior

Flip the assertions: evicted clients must NOT be closed. Replace
test_remove_key_closes_async_client → test_remove_key_does_not_close_async_client
and equivalents for sync/eviction paths.

Add test_remove_key_removes_plain_values for non-client cache entries.
Remove test_background_tasks_cleaned_up_after_completion (no more _background_tasks).
Remove test_remove_key_no_event_loop variant that depended on old behavior.

* test: add e2e tests for OpenAI SDK client surviving cache eviction

Add two new e2e tests using real AsyncOpenAI clients:
- test_evicted_openai_sdk_client_stays_usable: verifies size-based eviction
  doesn't close the client
- test_ttl_expired_openai_sdk_client_stays_usable: verifies TTL expiry
  eviction doesn't close the client

Both tests sleep after eviction so any create_task()-based close would
have time to run, making the regression detectable.

Also expand the module docstring to explain why the sleep is required.

* docs(AGENTS.md): add rule — never close HTTP/SDK clients on cache eviction

* docs(CLAUDE.md): add HTTP client cache safety guideline

* [Fix] Install bsdmainutils for column command in security scans

The security_scans.sh script uses `column` to format vulnerability
output, but the package wasn't installed in the CI environment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: handle string callback values in prometheus multiproc setup

When callbacks are configured as a plain string (e.g., `callbacks: "my_callback"`)
instead of a list, the proxy crashes on startup with:
  TypeError: can only concatenate str (not "list") to str

Normalize each callback setting to a list before concatenating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* bump: version 1.82.2 → 1.82.3

* fix(test): update test_startup_fails_when_db_setup_fails for opt-in enforcement

The --enforce_prisma_migration_check flag is now required to trigger
sys.exit(1) on DB migration failure, after #23675 flipped the default
behavior to warn-and-continue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cost_calculator): use model name for per-request custom pricing when router_model_id has no pricing

When custom pricing is passed as per-request kwargs (input_cost_per_token/output_cost_per_token),
completion() registers pricing under the model name, but _select_model_name_for_cost_calc was
selecting the router deployment hash (which has no pricing data), causing response_cost to be 0.0.

Now checks whether the router_model_id entry actually has pricing before preferring it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Update litellm/proxy/management_endpoints/key_management_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix: clear oauth2_flow when client_credentials set without token_url

* chore(ui): use antd danger prop instead of tailwind for Remove button

* feat: fetch blog posts from docs RSS feed instead of static JSON on GitHub

* fix: remove unused Any import from get_blog_posts

* [Fix] UI - Logs: Fix empty filter results showing stale data

Remove `.length > 0` check so that when a backend filter returns an
empty result set the table correctly shows no data instead of falling
back to the previous unfiltered logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [Fix] Reapply empty filter fix after merge with main

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [Fix] Prevent internal users from creating invalid keys via key/generate and key/update

Internal users could exploit key/generate and key/update to create unbound
keys (no user_id, no budget) or attach keys to non-existent teams. This
adds validation for non-admin callers: auto-assign user_id on generate,
reject invalid team_ids, and prevent removing user_id on update.

Closes LIT-1884

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Fix] Remove duplicate get_team_object call in _validate_update_key_data

Move the non-admin team validation into the existing get_team_object call
site to avoid an extra DB round-trip. The existing call already fetches
the team for limits checking — we now add the LIT-1884 guard there when
team_obj is None for non-admin callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Fix] Skip key_alias re-validation on update/regenerate when alias unchanged

When updating or regenerating a key without changing its key_alias, the
existing alias was being re-validated against current format rules. This
caused keys with legacy aliases (created before stricter validation) to
become uneditable. Now validation only runs when the alias actually changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Fix] Update log filter test to match empty-result behavior

The test expected fallback to all logs when backend filters return empty,
but the source was intentionally changed to show empty results instead of
stale data. Updated test to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Feature] Disable custom API key values via UI setting

Add disable_custom_api_keys UI setting that prevents users from specifying
custom key values during key generation and regeneration. When enabled, all
keys must be auto-generated, eliminating the risk of key hash collisions
in multi-tenant environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Fix] Add disable_custom_api_keys to UISettings Pydantic model

Without this field on the model, GET /get/ui_settings omits the setting
from the response and field_schema, preventing the UI from reading it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Register DynamoAI guardrail initializer and enum entry (#23752)

* fix: Register DynamoAI guardrail initializer and enum entry

Fix the "Unsupported guardrail: dynamoai" error by:
1. Adding DYNAMOAI to SupportedGuardrailIntegrations enum
2. Implementing initialize_guardrail() and registries in dynamoai/__init__.py

The DynamoAI guardrail was added in PR #15920 but never properly registered
in the initialization system. The __init__.py was missing the
guardrail_initializer_registry and guardrail_class_registry dictionaries
that the dynamic discovery mechanism looks for at module load time.

Fixes #22773

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Update litellm/proxy/guardrails/guardrail_hooks/dynamoai/__init__.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update litellm/proxy/guardrails/guardrail_hooks/dynamoai/__init__.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* test: Add tests for DynamoAI guardrail registration

Verifies enum entry, initializer registry, class registry,
instance creation, and global registry discovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* docs: add v1.82.3 release notes and update provider_endpoints_support.json (#23816)

* [Feature] Add disable_custom_api_keys toggle to UI Settings page

Adds a toggle switch to the admin UI Settings page so administrators can
enable/disable custom API key values without making direct API calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "docs: add v1.82.3 release notes and update provider_endpoints_support…" (#23817)

This reverts commit 9661249.

* [Fix] Rename toggle label to "Disable custom Virtual key values"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Fix] Remove "API" from custom key description text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ui): CSV export empty on Global Usage page

Aggregated endpoint returns empty breakdown.entities; fall back to
grouping breakdown.api_keys by team_id.

* Revert "fix: langfuse trace leak key on model params"

* fix: support served_model_name for Baseten dedicated deployments

Baseten dedicated deployments use an 8-char deployment ID for URL routing,
but the vLLM server may expect a different model name in the request body
(e.g. baseten-hosted/zai-org/GLM-5 vs wd1lndkw). Add served_model_name
litellm_param to override the model field in the request body, and declare
it in LiteLLMParamsTypedDict and GenericLiteLLMParams for IDE support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Harshit Jain <harshitjain0562@gmail.com>
Co-authored-by: Harshit Jain <48647625+Harshit28j@users.noreply.github.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: joereyna <joseph.reyna@gmail.com>
Co-authored-by: Ryan Crabbe <rcrabbe@berkeley.edu>
Co-authored-by: ryan-crabbe <128659760+ryan-crabbe@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: yuneng-jiang <yuneng.jiang@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
This pull request was closed.
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.

4 participants