1import type { ModelSelection } from "@t3tools/contracts";
2import {
3 getModelSelectionBooleanOptionValue,
4 getModelSelectionStringOptionValue,
5} from "@t3tools/shared/model";
6
7export function getCodexServiceTierOptionValue(
8 modelSelection: ModelSelection | null | undefined,
9): string | undefined {
10 return (
11 getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??
12 (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined)
13 );
14}