feat(ui): Do not show Ultra users /upgrade hint (#22154) (#22156)

This commit is contained in:
Sehoon Shon
2026-03-12 09:46:58 -04:00
committed by GitHub
parent 45faf4d31b
commit 18e8dd768a
9 changed files with 137 additions and 2 deletions
@@ -9,6 +9,7 @@ import { Box, Text } from 'ink';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import { theme } from '../semantic-colors.js';
import { AuthType } from '@google/gemini-cli-core';
import { isUltraTier } from '../../utils/tierUtils.js';
interface ProQuotaDialogProps {
failedModel: string;
@@ -17,6 +18,7 @@ interface ProQuotaDialogProps {
isTerminalQuotaError: boolean;
isModelNotFoundError?: boolean;
authType?: AuthType;
tierName?: string;
onChoice: (
choice: 'retry_later' | 'retry_once' | 'retry_always' | 'upgrade',
) => void;
@@ -29,6 +31,7 @@ export function ProQuotaDialog({
isTerminalQuotaError,
isModelNotFoundError,
authType,
tierName,
onChoice,
}: ProQuotaDialogProps): React.JSX.Element {
let items;
@@ -47,6 +50,8 @@ export function ProQuotaDialog({
},
];
} else if (isModelNotFoundError || isTerminalQuotaError) {
const isUltra = isUltraTier(tierName);
// free users and out of quota users on G1 pro and Cloud Console gets an option to upgrade
items = [
{
@@ -54,7 +59,7 @@ export function ProQuotaDialog({
value: 'retry_always' as const,
key: 'retry_always',
},
...(authType === AuthType.LOGIN_WITH_GOOGLE
...(authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra
? [
{
label: 'Upgrade for higher limits',