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

Function getUserSpecifiedModelSetting

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

Source from the content-addressed store, hash-verified

115 * 4. Settings (from user's saved settings)
116 */
117export function getUserSpecifiedModelSetting(): ModelSetting | undefined {
118 let specifiedModel: ModelSetting | undefined
119
120 const modelOverride = getMainLoopModelOverride()
121 if (modelOverride !== undefined) {
122 specifiedModel = modelOverride
123 } else {
124 const settings = getSettings_DEPRECATED() || {}
125 specifiedModel = getConfiguredMainModelEnv() || settings.model || undefined
126 }
127
128 // Ignore the user-specified model if it's not in the availableModels allowlist.
129 if (specifiedModel && !isModelAllowed(specifiedModel)) {
130 return undefined
131 }
132
133 return specifiedModel
134}
135
136/**
137 * Get the main loop model to use for the current session.

Callers 6

runFunction · 0.85
getAvailableUpgradeFunction · 0.85
getModelOptionsFunction · 0.85
getMainLoopModelFunction · 0.85
getRuntimeMainLoopModelFunction · 0.85
isRelevantFunction · 0.85

Calls 3

getMainLoopModelOverrideFunction · 0.85
isModelAllowedFunction · 0.85

Tested by

no test coverage detected