15 lines · 552 B · TypeScript
RawDownload
import type { ModelSelection } from "@t3tools/contracts";import {  getModelSelectionBooleanOptionValue,  getModelSelectionStringOptionValue,} from "@t3tools/shared/model"; export function getCodexServiceTierOptionValue(  modelSelection: ModelSelection | null | undefined,): string | undefined {  const tier =    getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??    (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined);  if (tier === "default") return undefined;  return tier;}