Skip to content

Commit 5478539

Browse files
committed
feat: add Model Registry feature with catalog pipeline, dashboard pages, and TSQL schema
- Add llm-model-catalog package (renamed from llm-pricing) with Claude CLI research pipeline - Add Prisma schema: catalog columns + baseModelName on LlmModel - Add ClickHouse: llm_model_aggregates MV + base_response_model column - Add TSQL llm_models schema for query page integration - Add ModelRegistryPresenter with catalog, metrics, and comparison queries - Add 3 dashboard pages: catalog (cards+table+filters), detail (overview+metrics+cost estimator), compare - Add sidebar navigation under AI section with hasAiAccess feature flag - Add admin dashboard sync/seed for catalog metadata - Add model variant grouping (dated snapshots under base models) - Add shared formatters and design system component usage refs TRI-7941
1 parent c00dae0 commit 5478539

File tree

56 files changed

+8494
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+8494
-163
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ClockIcon,
1111
Cog8ToothIcon,
1212
CogIcon,
13+
CubeIcon,
1314
ExclamationTriangleIcon,
1415
PuzzlePieceIcon,
1516
FolderIcon,
@@ -78,6 +79,7 @@ import {
7879
v3LogsPath,
7980
v3ErrorsPath,
8081
v3PromptsPath,
82+
v3ModelsPath,
8183
v3ProjectAlertsPath,
8284
v3ProjectPath,
8385
v3ProjectSettingsGeneralPath,
@@ -457,35 +459,46 @@ export function SideMenu({
457459
/>
458460
</div>
459461

460-
<SideMenuSection
461-
title="AI"
462-
isSideMenuCollapsed={isCollapsed}
463-
itemSpacingClassName="space-y-0"
464-
initialCollapsed={getSectionCollapsed(
465-
user.dashboardPreferences.sideMenu,
466-
"ai"
467-
)}
468-
onCollapseToggle={handleSectionToggle("ai")}
469-
>
470-
<SideMenuItem
471-
name="Prompts"
472-
icon={DocumentTextIcon}
473-
activeIconColor="text-purple-500"
474-
inactiveIconColor="text-purple-500"
475-
to={v3PromptsPath(organization, project, environment)}
476-
data-action="prompts"
477-
isCollapsed={isCollapsed}
478-
/>
479-
<SideMenuItem
480-
name="AI Metrics"
481-
icon={SparklesIcon}
482-
activeIconColor="text-purple-500"
483-
inactiveIconColor="text-purple-500"
484-
to={v3BuiltInDashboardPath(organization, project, environment, "llm")}
485-
data-action="ai-metrics"
486-
isCollapsed={isCollapsed}
487-
/>
488-
</SideMenuSection>
462+
{(user.admin || user.isImpersonating || featureFlags.hasAiAccess) && (
463+
<SideMenuSection
464+
title="AI"
465+
isSideMenuCollapsed={isCollapsed}
466+
itemSpacingClassName="space-y-0"
467+
initialCollapsed={getSectionCollapsed(
468+
user.dashboardPreferences.sideMenu,
469+
"ai"
470+
)}
471+
onCollapseToggle={handleSectionToggle("ai")}
472+
>
473+
<SideMenuItem
474+
name="Prompts"
475+
icon={DocumentTextIcon}
476+
activeIconColor="text-purple-500"
477+
inactiveIconColor="text-purple-500"
478+
to={v3PromptsPath(organization, project, environment)}
479+
data-action="prompts"
480+
isCollapsed={isCollapsed}
481+
/>
482+
<SideMenuItem
483+
name="Models"
484+
icon={CubeIcon}
485+
activeIconColor="text-purple-500"
486+
inactiveIconColor="text-purple-500"
487+
to={v3ModelsPath(organization, project, environment)}
488+
data-action="models"
489+
isCollapsed={isCollapsed}
490+
/>
491+
<SideMenuItem
492+
name="AI Metrics"
493+
icon={SparklesIcon}
494+
activeIconColor="text-purple-500"
495+
inactiveIconColor="text-purple-500"
496+
to={v3BuiltInDashboardPath(organization, project, environment, "llm")}
497+
data-action="ai-metrics"
498+
isCollapsed={isCollapsed}
499+
/>
500+
</SideMenuSection>
501+
)}
489502

490503
{(user.admin || user.isImpersonating || featureFlags.hasQueryAccess) && (
491504
<SideMenuSection

apps/webapp/app/env.server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,9 @@ const EnvironmentSchema = z
12221222
// Query feature flag
12231223
QUERY_FEATURE_ENABLED: z.string().default("1"),
12241224

1225+
// AI features (Prompts, Models, AI Metrics sidebar section)
1226+
AI_FEATURES_ENABLED: z.string().default("0"),
1227+
12251228
// Logs page ClickHouse URL (for logs queries)
12261229
LOGS_CLICKHOUSE_URL: z
12271230
.string()

0 commit comments

Comments
 (0)