MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / getDefaultMainLoopModelSetting

Function getDefaultMainLoopModelSetting

src/utils/model/model.ts:195–217  ·  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 // Max users get Opus as default
205 if (isMaxSubscriber()) {
206 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
207 }
208
209 // Team Premium gets Opus (same as Max)
210 if (isTeamPremiumSubscriber()) {
211 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
212 }
213
214 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default
215 // Note that PAYG (3P) may default to an older Sonnet model
216 return getDefaultSonnetModel()
217}
218
219/**
220 * Synchronous operation to get the default main loop model to use

Callers 10

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