From f23cabda3e80739d99885288be501ef0bef72959 Mon Sep 17 00:00:00 2001 From: Badcuban <108198679+badcuban@users.noreply.github.com> Date: Mon, 16 Nov 2026 05:32:48 -0500 Subject: [PATCH 1/3] feat(web): the model picker marks a provider near its plan's limit, and a model's own limit shows on its row --- apps/web/src/components/chat/ModelListRow.tsx | 30 ++++++- .../components/chat/ModelPickerContent.tsx | 51 +++++++++-- apps/web/src/lib/providerUsage.test.ts | 61 ++++++++++++++ apps/web/src/lib/providerUsage.ts | 84 ++++++++++++++++++- 4 files changed, 216 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/chat/ModelListRow.tsx b/apps/web/src/components/chat/ModelListRow.tsx index 1e4ca5977..6aa713f40 100644 --- a/apps/web/src/components/chat/ModelListRow.tsx +++ b/apps/web/src/components/chat/ModelListRow.tsx @@ -33,6 +33,15 @@ export const ModelListRow = memo(function ModelListRow(props: { useProviderScopedLabel?: boolean; useTriggerLabel?: boolean; jumpLabel?: string | null; + /** + * The model's own usage limit, when its account reports one (modelUsageLimitLabel): + * in the row's grey slot, amber near it, red with a grey name once reached. + */ + usageLimit?: { + readonly text: string; + readonly tone: "normal" | "warning" | "reached"; + readonly title: string; + } | null; /** What picking it does when that is not "use this model" (ModelPickerContent rowAction). */ action?: { readonly kind: "add" | "switch"; readonly label: string } | null; /** Set while no model can be picked; the list says why on hover. */ @@ -74,7 +83,10 @@ export const ModelListRow = memo(function ModelListRow(props: {