Add option to fallback for capacity errors in ProQuotaDi… (#16050)

This commit is contained in:
Sehoon Shon
2026-01-07 16:59:48 -05:00
committed by GitHub
parent d5996fea99
commit 0be8b5b1ed
2 changed files with 11 additions and 1 deletions
@@ -169,7 +169,7 @@ describe('ProQuotaDialog', () => {
}); });
describe('when it is a capacity error', () => { 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( const { unmount } = render(
<ProQuotaDialog <ProQuotaDialog
failedModel="gemini-2.5-pro" failedModel="gemini-2.5-pro"
@@ -190,6 +190,11 @@ describe('ProQuotaDialog', () => {
value: 'retry_once', value: 'retry_once',
key: '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' }, { label: 'Stop', value: 'retry_later', key: 'retry_later' },
], ],
}), }),
@@ -91,6 +91,11 @@ export function ProQuotaDialog({
value: 'retry_once' as const, value: 'retry_once' as const,
key: 'retry_once', key: 'retry_once',
}, },
{
label: `Switch to ${fallbackModel}`,
value: 'retry_always' as const,
key: 'retry_always',
},
{ {
label: 'Stop', label: 'Stop',
value: 'retry_later' as const, value: 'retry_later' as const,