MCPcopy
hub / github.com/codeaashu/claude-code / getDefaultMainLoopModelSetting

Function getDefaultMainLoopModelSetting

src/utils/model/model.ts:178–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 * @returns The default model setting to use
177 */
178export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
179 // Ants default to defaultModel from flag config, or Opus 1M if not configured
180 if (process.env.USER_TYPE === 'ant') {
181 return (
182 getAntModelOverrideConfig()?.defaultModel ??
183 getDefaultOpusModel() + '[1m]'
184 )
185 }
186
187 // Max users get Opus as default
188 if (isMaxSubscriber()) {
189 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
190 }
191
192 // Team Premium gets Opus (same as Max)
193 if (isTeamPremiumSubscriber()) {
194 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
195 }
196
197 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default
198 // Note that PAYG (3P) may default to an older Sonnet model
199 return getDefaultSonnetModel()
200}
201
202/**
203 * Synchronous operation to get the default main loop model to use

Callers 10

getModelCostsFunction · 0.85
getDefaultOptionForUserFunction · 0.85
getDefaultMainLoopModelFunction · 0.85
modelDisplayStringFunction · 0.85
callFunction · 0.85
renderModelLabelFunction · 0.85
migrateOpusToOpus1mFunction · 0.85
useMainLoopModelFunction · 0.85

Calls 6

getDefaultOpusModelFunction · 0.85
isMaxSubscriberFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85
isTeamPremiumSubscriberFunction · 0.85
getDefaultSonnetModelFunction · 0.85

Tested by

no test coverage detected