Merge pull request #3081 from BerriAI/litellm_ui_fixes_2

build(ui): view_key_table.tsx
This commit is contained in:
Krish Dholakia 2024-04-16 17:19:41 -07:00 committed by GitHub
commit 1cdf733341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 15 deletions

View file

@ -2765,10 +2765,12 @@ async def generate_key_helper_fn(
"model_max_budget": model_max_budget_json,
"budget_id": budget_id,
}
if (
general_settings.get("allow_user_auth", False) == True
or _has_user_setup_sso() == True
):
litellm.get_secret("DISABLE_KEY_NAME", False) == True
): # allow user to disable storing abbreviated key name (shown in UI, to help figure out which key spent how much)
pass
else:
key_data["key_name"] = f"sk-...{token[-4:]}"
saved_token = copy.deepcopy(key_data)
if isinstance(saved_token["aliases"], str):