MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getModelOptionsBase

Function getModelOptionsBase

source code/utils/model/modelOptions.ts:273–378  ·  view source on GitHub ↗
(fastMode = false)

Source from the content-addressed store, hash-verified

271// @[MODEL LAUNCH]: Update the model picker lists below to include/reorder options for the new model.
272// Each user tier (ant, Max/Team Premium, Pro/Team Standard/Enterprise, PAYG 1P, PAYG 3P) has its own list.
273function getModelOptionsBase(fastMode = false): ModelOption[] {
274 if (process.env.USER_TYPE === 'ant') {
275 // Build options from antModels config
276 const antModelOptions: ModelOption[] = getAntModels().map(m => ({
277 value: m.alias,
278 label: m.label,
279 description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`,
280 }))
281
282 return [
283 getDefaultOptionForUser(),
284 ...antModelOptions,
285 getMergedOpus1MOption(fastMode),
286 getSonnet46Option(),
287 getSonnet46_1MOption(),
288 getHaiku45Option(),
289 ]
290 }
291
292 if (isClaudeAISubscriber()) {
293 if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
294 // Max and Team Premium users: Opus is default, show Sonnet as alternative
295 const premiumOptions = [getDefaultOptionForUser(fastMode)]
296 if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
297 premiumOptions.push(getMaxOpus46_1MOption(fastMode))
298 }
299
300 premiumOptions.push(MaxSonnet46Option)
301 if (checkSonnet1mAccess()) {
302 premiumOptions.push(getMaxSonnet46_1MOption())
303 }
304
305 premiumOptions.push(MaxHaiku45Option)
306 return premiumOptions
307 }
308
309 // Pro/Team Standard/Enterprise users: Sonnet is default, show Opus as alternative
310 const standardOptions = [getDefaultOptionForUser(fastMode)]
311 if (checkSonnet1mAccess()) {
312 standardOptions.push(getMaxSonnet46_1MOption())
313 }
314
315 if (isOpus1mMergeEnabled()) {
316 standardOptions.push(getMergedOpus1MOption(fastMode))
317 } else {
318 standardOptions.push(getMaxOpusOption(fastMode))
319 if (checkOpus1mAccess()) {
320 standardOptions.push(getMaxOpus46_1MOption(fastMode))
321 }
322 }
323
324 standardOptions.push(MaxHaiku45Option)
325 return standardOptions
326 }
327
328 // PAYG 1P API: Default (Sonnet) + Sonnet 1M + Opus 4.6 + Opus 1M + Haiku
329 if (getAPIProvider() === 'firstParty') {
330 const payg1POptions = [getDefaultOptionForUser(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
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