MCPcopy Index your code
hub / github.com/Noumena-Network/code / getDefaultMainLoopModelSetting

Function getDefaultMainLoopModelSetting

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

Source from the content-addressed store, hash-verified

252 * @returns The default model setting to use
253 */
254export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
255 // Ants default to defaultModel from flag config, or Opus 1M if not configured
256 if (isInternalBuild()) {
257 return (
258 getAntModelOverrideConfig()?.defaultModel ??
259 getDefaultOpusModel() + '[1m]'
260 )
261 }
262
263 // Noumena-managed first-party sessions default to GLM 5.2.
264 if (getAPIProvider() === 'firstParty') {
265 return getDefaultOpusModel()
266 }
267
268 const session = getCurrentSubscriptionSessionState()
269
270 // Max users get Opus as default
271 if (session.isMaxSubscriber) {
272 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
273 }
274
275 // Team Premium gets Opus (same as Max)
276 if (session.isTeamPremiumSubscriber) {
277 return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '')
278 }
279
280 // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Flash as default.
281 // Note that PAYG (3P) may default to an older provider model.
282 return getDefaultFlashModel()
283}
284
285/**
286 * Synchronous operation to get the default main loop model to use

Callers 13

getModelCostsFunction · 0.85
getDefaultOptionForUserFunction · 0.85
getDefaultMainLoopModelFunction · 0.85
modelDisplayStringFunction · 0.85
model.auth.test.tsFile · 0.85
callFunction · 0.85
renderModelLabelFunction · 0.85
migrateOpusToOpus1mFunction · 0.85

Calls 7

isInternalBuildFunction · 0.85
getDefaultOpusModelFunction · 0.85
getAPIProviderFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85
getDefaultFlashModelFunction · 0.85

Tested by

no test coverage detected