Merge pull request #2903 from BerriAI/litellm_set_new_callbacks_ui

ui - add langfuse modal
This commit is contained in:
Ishaan Jaff 2024-04-08 17:37:38 -07:00 committed by GitHub
commit 2a69650e8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 265 additions and 69 deletions

View file

@ -555,9 +555,6 @@ async def user_api_key_auth(
)
return _user_api_key_obj
elif route.startswith("/config/"):
raise Exception(f"Only admin can modify config")
if isinstance(
api_key, str
): # if generated token, make sure it starts with sk-.
@ -1078,6 +1075,7 @@ async def user_api_key_auth(
"/sso",
"/login",
"/key",
"/config",
"/spend",
"/user",
"/model/info",
@ -8064,13 +8062,8 @@ async def get_config():
try:
config_data = await proxy_config.get_config()
_environment_variables = config_data.get("environment_variables", {})
config_data = config_data["litellm_settings"]
config_data = config_data.get("litellm_settings", {})
# only store the keys and return the values as sk...***
for key, value in _environment_variables.items():
_environment_variables[key] = value[:5] + "*****"
config_data["environment_variables"] = _environment_variables
return {"data": config_data, "status": "success"}
except Exception as e:
traceback.print_exc()