MCPcopy Create free account
hub / github.com/arctic-cli/interface / codexBaseModelId

Function codexBaseModelId

packages/arctic/src/provider/pricing.ts:122–134  ·  view source on GitHub ↗
(modelId: string)

Source from the content-addressed store, hash-verified

120 }
121
122 function codexBaseModelId(modelId: string): string | null {
123 if (!modelId.includes("codex")) {
124 return null
125 }
126
127 const withoutEffort = modelId.replace(/-codex(-max)?-(low|medium|high|xhigh)$/i, "-codex$1")
128 const stripped = withoutEffort.replace(/-codex(-max)?$/i, "")
129 if (!stripped || stripped === modelId) {
130 return null
131 }
132
133 return stripped
134 }
135
136 /**
137 * Normalize model ID for matching (handle version number formats)

Callers 2

getModelPricingFunction · 0.85
getModelPricingAsyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected