From ca9111ea318c696d79a62663efa1c5fbca0fb47d Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Sat, 21 Feb 2026 16:56:30 -0800 Subject: [PATCH] feat: add disable_show_blog to UISettings Co-Authored-By: Claude Sonnet 4.6 --- .../ui_crud_endpoints/proxy_setting_endpoints.py | 6 ++++++ .../test_proxy_setting_endpoints.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/proxy_unit_tests/test_proxy_setting_endpoints.py diff --git a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py index b465d13bc7..f6795f12bb 100644 --- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py +++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -93,6 +93,11 @@ class UISettings(BaseModel): description="If enabled, forwards client headers (e.g. Authorization) to the LLM API. Required for Claude Code with Max subscription.", ) + disable_show_blog: bool = Field( + default=False, + description="If true, hides the Blog dropdown from the UI navbar.", + ) + class UISettingsResponse(SettingsResponse): """Response model for UI settings""" @@ -107,6 +112,7 @@ ALLOWED_UI_SETTINGS_FIELDS = { "enabled_ui_pages_internal_users", "require_auth_for_public_ai_hub", "forward_client_headers_to_llm_api", + "disable_show_blog", } diff --git a/tests/proxy_unit_tests/test_proxy_setting_endpoints.py b/tests/proxy_unit_tests/test_proxy_setting_endpoints.py new file mode 100644 index 0000000000..1bc5091968 --- /dev/null +++ b/tests/proxy_unit_tests/test_proxy_setting_endpoints.py @@ -0,0 +1,13 @@ +def test_ui_settings_has_disable_show_blog_field(): + """UISettings model must include disable_show_blog.""" + from litellm.proxy.ui_crud_endpoints.proxy_setting_endpoints import UISettings + + settings = UISettings() + assert hasattr(settings, "disable_show_blog") + assert settings.disable_show_blog is False # default + + +def test_allowed_ui_settings_fields_contains_disable_show_blog(): + from litellm.proxy.ui_crud_endpoints.proxy_setting_endpoints import ALLOWED_UI_SETTINGS_FIELDS + + assert "disable_show_blog" in ALLOWED_UI_SETTINGS_FIELDS