From 5a5bec28c43ba45ef4d9d329fed748a43614abc2 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 27 Sep 2025 19:17:17 +0700 Subject: [PATCH] offer the user two routes forward when their keys run dry --- src/components/Quilly.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/Quilly.tsx b/src/components/Quilly.tsx index 88db0970..d17f63d4 100644 --- a/src/components/Quilly.tsx +++ b/src/components/Quilly.tsx @@ -118,11 +118,17 @@ export function Quilly({ error, onDismiss, onNewChat, onOpenModelSelector, onReq }], }; - case 'key_limit_exceeded': - return { - message: `It seems your API key has been used up. Check your API provider's settings, or try a different API key or different provider/model combo`, - actions: [], - }; + case 'key_limit_exceeded': + return { + message: `It seems your API key has been used up. Check your API provider's settings, or try a different API key or different provider/model combo:`, + actions: [{ + label: 'Check API settings', + onClick: () => navigate('/settings/ai'), + }, { + label: 'Change model', + onClick: onOpenModelSelector, + }], + }; case 'bad_request': return {