fix(web): show standard for untouched Codex service tier (#1010)

This commit is contained in:
SSU-WEI HUANG
2026-07-11 10:41:49 +08:00
committed by GitHub
parent a2465c782b
commit 58cfc330f9
3 changed files with 32 additions and 5 deletions
@@ -49,3 +49,12 @@ export function codexModelAdvertisesFastTier(
export function isFastServiceTier(serviceTier?: string | null): boolean {
return serviceTier?.trim().toLowerCase() === 'fast'
}
/**
* The persisted null tier means the user has not chosen an override. The
* current two-option control still needs a visible selection, so display that
* untouched state as Standard without changing the value sent to the backend.
*/
export function getDisplayedCodexServiceTier(serviceTier?: string | null): 'standard' | 'fast' {
return isFastServiceTier(serviceTier) ? 'fast' : 'standard'
}