MCPcopy Index your code
hub / github.com/freecodexyz/free-code / getModelOptionsBase

Function getModelOptionsBase

src/utils/model/modelOptions.ts:300–415  ·  view source on GitHub ↗
(fastMode = false)

Source from the content-addressed store, hash-verified

298// @[MODEL LAUNCH]: Update the model picker lists below to include/reorder options for the new model.
299// Each user tier (ant, Max/Team Premium, Pro/Team Standard/Enterprise, PAYG 1P, PAYG 3P) has its own list.
300function getModelOptionsBase(fastMode = false): ModelOption[] {
301 if (process.env.USER_TYPE === 'ant') {
302 // Build options from antModels config
303 const antModelOptions: ModelOption[] = getAntModels().map(m => ({
304 value: m.alias,
305 label: m.label,
306 description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`,
307 }))
308
309 return [
310 getDefaultOptionForUser(),
311 ...antModelOptions,
312 getMergedOpus1MOption(fastMode),
313 getSonnet46Option(),
314 getSonnet46_1MOption(),
315 getHaiku45Option(),
316 ]
317 }
318
319 // Codex subscribers get OpenAI model options
320 if (isCodexSubscriber()) {
321 return [
322 getDefaultOptionForUser(),
323 getGpt54Option(),
324 getGpt53CodexOption(),
325 getGpt54MiniOption(),
326 ]
327 }
328
329 if (isClaudeAISubscriber()) {
330 if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
331 // Max and Team Premium users: Opus is default, show Sonnet as alternative
332 const premiumOptions = [getDefaultOptionForUser(fastMode)]
333 if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
334 premiumOptions.push(getMaxOpus46_1MOption(fastMode))
335 }
336
337 premiumOptions.push(MaxSonnet46Option)
338 if (checkSonnet1mAccess()) {
339 premiumOptions.push(getMaxSonnet46_1MOption())
340 }
341
342 premiumOptions.push(MaxHaiku45Option)
343 return premiumOptions
344 }
345
346 // Pro/Team Standard/Enterprise users: Sonnet is default, show Opus as alternative
347 const standardOptions = [getDefaultOptionForUser(fastMode)]
348 if (checkSonnet1mAccess()) {
349 standardOptions.push(getMaxSonnet46_1MOption())
350 }
351
352 if (isOpus1mMergeEnabled()) {
353 standardOptions.push(getMergedOpus1MOption(fastMode))
354 } else {
355 standardOptions.push(getMaxOpusOption(fastMode))
356 if (checkOpus1mAccess()) {
357 standardOptions.push(getMaxOpus46_1MOption(fastMode))

Callers 1

getModelOptionsFunction · 0.85

Calls 15

getAntModelsFunction · 0.85
getDefaultOptionForUserFunction · 0.85
getMergedOpus1MOptionFunction · 0.85
getSonnet46OptionFunction · 0.85
getSonnet46_1MOptionFunction · 0.85
getHaiku45OptionFunction · 0.85
isCodexSubscriberFunction · 0.85
getGpt54OptionFunction · 0.85
getGpt53CodexOptionFunction · 0.85
getGpt54MiniOptionFunction · 0.85
isMaxSubscriberFunction · 0.85
isTeamPremiumSubscriberFunction · 0.85

Tested by

no test coverage detected