From 0be8b5b1ed2928a08818c725284e6ca56bdd2116 Mon Sep 17 00:00:00 2001 From: Sehoon Shon Date: Wed, 7 Jan 2026 16:59:48 -0500 Subject: [PATCH] =?UTF-8?q?Add=20option=20to=20fallback=20for=20capacity?= =?UTF-8?q?=20errors=20in=20ProQuotaDi=E2=80=A6=20(#16050)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli/src/ui/components/ProQuotaDialog.test.tsx | 7 ++++++- packages/cli/src/ui/components/ProQuotaDialog.tsx | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/components/ProQuotaDialog.test.tsx b/packages/cli/src/ui/components/ProQuotaDialog.test.tsx index 42746678e2..2520036246 100644 --- a/packages/cli/src/ui/components/ProQuotaDialog.test.tsx +++ b/packages/cli/src/ui/components/ProQuotaDialog.test.tsx @@ -169,7 +169,7 @@ describe('ProQuotaDialog', () => { }); describe('when it is a capacity error', () => { - it('should render keep trying and stop options', () => { + it('should render keep trying, switch, and stop options', () => { const { unmount } = render( { value: 'retry_once', key: 'retry_once', }, + { + label: 'Switch to gemini-2.5-flash', + value: 'retry_always', + key: 'retry_always', + }, { label: 'Stop', value: 'retry_later', key: 'retry_later' }, ], }), diff --git a/packages/cli/src/ui/components/ProQuotaDialog.tsx b/packages/cli/src/ui/components/ProQuotaDialog.tsx index cda3937a7f..0dbf134c5b 100644 --- a/packages/cli/src/ui/components/ProQuotaDialog.tsx +++ b/packages/cli/src/ui/components/ProQuotaDialog.tsx @@ -91,6 +91,11 @@ export function ProQuotaDialog({ value: 'retry_once' as const, key: 'retry_once', }, + { + label: `Switch to ${fallbackModel}`, + value: 'retry_always' as const, + key: 'retry_always', + }, { label: 'Stop', value: 'retry_later' as const,