Skip to content

Commit

Permalink
Litellm dev 01 23 2025 p2 (#7962)
Browse files Browse the repository at this point in the history
* fix(ui/): revert user team key view

* fix(view_key_table.tsx): fix default team view - show all personal keys

* fix(navbar.tsx): fix custom logo

Fixes #7895

---------

Co-authored-by: Ishaan Jaff <[email protected]>
  • Loading branch information
krrishdholakia and ishaan-jaff authored Jan 24, 2025
1 parent 70a3683 commit 744b770
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ tests/llm_translation/log.txt
venv/
tests/local_testing/log.txt

.codegpt
.codegpt
litellm/proxy/_new_new_secret_config.yaml
1 change: 1 addition & 0 deletions litellm/proxy/_new_secret_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ model_list:
api_base: http://0.0.0.0:8090
timeout: 2
num_retries: 0


litellm_settings:
success_callback: ["langfuse"]
Binary file modified litellm/proxy/cached_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const DashboardTeam: React.FC<DashboardTeamProps> = ({
value={String(index)}
onClick={() => {
setSelectedTeam(team);
setKeys(team["keys"]);
// setKeys(team["keys"]);
}}
>
{team["team_alias"]}
Expand Down
9 changes: 7 additions & 2 deletions ui/litellm-dashboard/src/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ const Navbar: React.FC<NavbarProps> = ({
{/* Left side - Just Logo */}
<div className="flex items-center">
<Link href="/" className="flex items-center">
<span className="text-xl">🚅</span>
<span className="ml-2 text-base font-medium text-gray-700">LiteLLM</span>
<button className="text-gray-800 rounded text-center">
<img
src={imageUrl}
alt="LiteLLM Brand"
className="h-10 w-40 object-contain"
/>
</button>
</Link>
</div>

Expand Down
4 changes: 2 additions & 2 deletions ui/litellm-dashboard/src/components/user_dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ const UserDashboard: React.FC<UserDashboardProps> = ({

setUserSpendData(response["user_info"]);
console.log(`userSpendData: ${JSON.stringify(userSpendData)}`)
setKeys(response["keys"]); // Assuming this is the correct path to your data
const teamsArray = [...response["teams"]];
if (teamsArray.length > 0) {
console.log(`response['teams']: ${JSON.stringify(teamsArray)}`);
setSelectedTeam(teamsArray[0]);
setKeys(teamsArray[0]["keys"]); // Assuming this is the correct path to your data
} else {
setSelectedTeam(defaultTeam);
setKeys(response["keys"]); // Assuming this is the correct path to your data

}
sessionStorage.setItem(
"userData" + userID,
Expand Down
2 changes: 1 addition & 1 deletion ui/litellm-dashboard/src/components/view_key_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
});

// If no team is selected, show all accessible keys
if (!selectedTeam && data) {
if ((!selectedTeam || selectedTeam.team_alias === "Default Team") && data) {
const personalKeys = data.filter(key => !key.team_id || key.team_id === "default-team");
const adminTeamKeys = teams
.filter(team => isUserTeamAdmin(team))
Expand Down

0 comments on commit 744b770

Please sign in to comment.