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

Function getDefaultMainLoopModelSetting

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

Source from the content-addressed store, hash-verified

258 * @returns The default model setting to use
259 */
260export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
261 // Ants default to defaultModel from flag config, or Opus 1M if not configured
262 if (process.env.USER_TYPE === 'ant') {
263 return (
264 (getAntModelOverrideConfig()?.defaultModel as string) ??
265 getDefaultOpusModel() + '[1m]'
266 )
267 }
268
269 // Max users get Opus as default
270 if (isMaxSubscriber()) {
271 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
272 }
273
274 // Team Premium gets Opus (same as Max)
275 if (isTeamPremiumSubscriber()) {
276 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
277 }
278
279 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default
280 // Note that PAYG (3P) may default to an older Sonnet model
281 return getDefaultSonnetModel()
282}
283
284/**
285 * Synchronous operation to get the default main loop model to use

Callers 9

getModelCostsFunction · 0.85
getDefaultOptionForUserFunction · 0.85
getDefaultMainLoopModelFunction · 0.85
modelDisplayStringFunction · 0.85
callFunction · 0.85
renderModelLabelFunction · 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