mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-17 04:34:25 +00:00
feat(ui): turn the Chat UI on by default (#46918)
Co-authored-by: Krrish Dholakia <krrishdholakia@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e45f2737d3
commit
e4dc696af8
2 changed files with 19 additions and 1 deletions
|
|
@ -343,7 +343,7 @@ class UISettings(LiteLLMBaseModel):
|
|||
)
|
||||
|
||||
enable_chat_ui: bool = Field(
|
||||
default=False,
|
||||
default=True,
|
||||
description="If true, shows the Chat page in the UI sidebar, letting users chat with an LLM and connect their own MCP server credentials via OAuth.",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3771,6 +3771,24 @@ class TestPtuCostAttributionUISetting:
|
|||
assert not mock_prisma.db.litellm_uisettings.upsert.called
|
||||
|
||||
|
||||
class TestEnableChatUISetting:
|
||||
def test_chat_ui_is_on_when_nothing_is_stored(self, mock_auth, monkeypatch):
|
||||
TestPtuCostAttributionUISetting._mock_prisma(monkeypatch)
|
||||
|
||||
response = client.get("/get/ui_settings")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["values"]["enable_chat_ui"] is True
|
||||
|
||||
def test_admin_can_still_turn_chat_ui_off(self, mock_auth, monkeypatch):
|
||||
TestPtuCostAttributionUISetting._mock_prisma(monkeypatch, stored={"enable_chat_ui": False})
|
||||
|
||||
response = client.get("/get/ui_settings")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["values"]["enable_chat_ui"] is False
|
||||
|
||||
|
||||
class TestApplyUserBudgetToTeamKeysUISetting:
|
||||
"""``apply_user_budget_to_team_keys`` mirrors general_settings on every GET.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue