import type { ModelSelection } from "@t3tools/contracts"; import { getModelSelectionBooleanOptionValue, getModelSelectionStringOptionValue, } from "@t3tools/shared/model"; export function getCodexServiceTierOptionValue( modelSelection: ModelSelection | null | undefined, ): string | undefined { return ( getModelSelectionStringOptionValue(modelSelection, "serviceTier") ?? (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined) ); }