MCPcopy Index your code
hub / github.com/freecodexyz/free-code / getDefaultMainLoopModelSetting

Function getDefaultMainLoopModelSetting

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

Source from the content-addressed store, hash-verified

179 * @returns The default model setting to use
180 */
181export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
182 if (isCodexSubscriber()) {
183 return getModelStrings().gpt53codex
184 }
185
186 // Ants default to defaultModel from flag config, or Opus 1M if not configured
187 if (process.env.USER_TYPE === 'ant') {
188 return (
189 getAntModelOverrideConfig()?.defaultModel ??
190 getDefaultOpusModel() + '[1m]'
191 )
192 }
193
194 // Max users get Opus as default
195 if (isMaxSubscriber()) {
196 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
197 }
198
199 // Team Premium gets Opus (same as Max)
200 if (isTeamPremiumSubscriber()) {
201 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
202 }
203
204 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default
205 // Note that PAYG (3P) may default to an older Sonnet model
206 return getDefaultSonnetModel()
207}
208
209/**
210 * 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 8

isCodexSubscriberFunction · 0.85
getDefaultOpusModelFunction · 0.85
isMaxSubscriberFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85
isTeamPremiumSubscriberFunction · 0.85
getDefaultSonnetModelFunction · 0.85
getModelStringsFunction · 0.70

Tested by

no test coverage detected