Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ui/litellm-dashboard/src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ function withBase(path: string): string {
*
* Key = legacy page id used in leftnav, Value = route segment under (dashboard)/
*/
const MIGRATED_PAGES: Record<string, string> = {
"api-reference": "api-reference",
};
const MIGRATED_PAGES: Record<string, string> = {};

function LayoutContent({ children }: { children: React.ReactNode }) {
const router = useRouter();
Expand Down
8 changes: 4 additions & 4 deletions ui/litellm-dashboard/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import APIReferenceView from "@/app/(dashboard)/api-reference/APIReferenceView";
import SidebarProvider from "@/app/(dashboard)/components/SidebarProvider";
Comment on lines 1 to 4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Test plan items remain unchecked

The PR description's test plan has all three items as unchecked ([ ]), meaning there is no evidence that the fix was verified — including the primary user flow ("Click API Reference → lands on /ui?page=api_ref"). Per the team's review standards, a PR claiming to fix an issue should include evidence that the issue is resolved before merging.

Rule Used: What: Ensure that any PR claiming to fix an issue ... (source)

import OldModelDashboard from "@/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView";
import PlaygroundPage from "@/app/(dashboard)/playground/page";
Expand Down Expand Up @@ -73,10 +74,7 @@ interface ProxySettings {
* When a user visits ?page=<key>, they are redirected to /ui/<value>.
* Add entries here as pages are migrated from the if/else chain to path-based routes.
*/
const LEGACY_REDIRECTS: Record<string, string> = {
api_ref: "api-reference",
"api-reference": "api-reference",
};
const LEGACY_REDIRECTS: Record<string, string> = {};
Comment thread
ryan-crabbe-berri marked this conversation as resolved.
Resolved

function CreateKeyPageContent() {
const [userRole, setUserRole] = useState("");
Expand Down Expand Up @@ -553,6 +551,8 @@ function CreateKeyPageContent() {
<AdminPanel
proxySettings={proxySettings}
/>
) : page == "api_ref" ? (
<APIReferenceView proxySettings={proxySettings} />
) : page == "logging-and-alerts" ? (
<Settings userID={userID} userRole={userRole} accessToken={accessToken} premiumUser={premiumUser} />
) : page == "budgets" ? (
Expand Down
11 changes: 4 additions & 7 deletions ui/litellm-dashboard/src/components/leftnav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ const { Sider } = Layout;
/**
* Pages migrated to path-based routing under (dashboard)/.
* Key = legacy page id, Value = route segment.
* Keep in sync with MIGRATED_PAGES in (dashboard)/layout.tsx and
* LEGACY_REDIRECTS in app/page.tsx.
* Keep in sync with MIGRATED_PAGES in (dashboard)/layout.tsx.
*/
const MIGRATED_PAGES: Record<string, string> = {
"api-reference": "api-reference",
};
const MIGRATED_PAGES: Record<string, string> = {};

/** Build an absolute href for a migrated page, respecting base URL + serverRootPath. */
function migratedHref(routeSegment: string): string {
Expand Down Expand Up @@ -295,8 +292,8 @@ const menuGroups: MenuGroup[] = [
groupLabel: "DEVELOPER TOOLS",
items: [
{
key: "api-reference",
page: "api-reference",
key: "api_ref",
page: "api_ref",
label: "API Reference",
icon: <ApiOutlined />,
},
Expand Down
2 changes: 1 addition & 1 deletion ui/litellm-dashboard/src/components/page_metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const pageDescriptions: Record<string, string> = {
projects: "Manage projects within teams",
"access-groups": "Manage access groups for role-based permissions",
budgets: "Set and monitor spending budgets",
"api-reference": "Browse API documentation and endpoints",
api_ref: "Browse API documentation and endpoints",
"model-hub-table": "Explore available AI models and providers",
"learning-resources": "Access tutorials and documentation",
caching: "Configure response caching settings",
Expand Down
Loading