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

Function getDefaultMainLoopModelSetting

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

Source from the content-addressed store, hash-verified

193 * @returns The default model setting to use
194 */
195export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
196 // Ants default to defaultModel from flag config, or Opus 1M if not configured
197 if (process.env.USER_TYPE === 'ant') {
198 return (
199 getAntModelOverrideConfig()?.defaultModel ??
200 getDefaultOpusModel() + '[1m]'
201 )
202 }
203
204 const configuredDefaultModel = getConfiguredProviderModel('defaultModel')
205 if (configuredDefaultModel) {
206 return configuredDefaultModel
207 }
208
209 // Max users get Opus as default
210 if (isMaxSubscriber()) {
211 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
212 }
213
214 // Team Premium gets Opus (same as Max)
215 if (isTeamPremiumSubscriber()) {
216 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
217 }
218
219 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default
220 // Note that PAYG (3P) may default to an older Sonnet model
221 return getDefaultSonnetModel()
222}
223
224/**
225 * 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 7

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

Tested by

no test coverage detected