MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getModelOptionsBase

Function getModelOptionsBase

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

Source from the content-addressed store, hash-verified

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

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
isMaxSubscriberFunction · 0.85
isTeamPremiumSubscriberFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85
checkOpus1mAccessFunction · 0.85
getMaxOpus46_1MOptionFunction · 0.85
checkSonnet1mAccessFunction · 0.85

Tested by

no test coverage detected