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

Function getUserSpecifiedModelSetting

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

Source from the content-addressed store, hash-verified

76 * 4. Settings (from user's saved settings)
77 */
78export function getUserSpecifiedModelSetting(): ModelSetting | undefined {
79 let specifiedModel: ModelSetting | undefined
80
81 const modelOverride = getMainLoopModelOverride()
82 if (modelOverride !== undefined) {
83 specifiedModel = modelOverride
84 } else {
85 const settings = getSettings_DEPRECATED() || {}
86 specifiedModel = process.env.ANTHROPIC_MODEL || settings.model || undefined
87 }
88
89 // Ignore the user-specified model if it's not in the availableModels allowlist.
90 if (specifiedModel && !isModelAllowed(specifiedModel)) {
91 return undefined
92 }
93
94 return specifiedModel
95}
96
97/**
98 * 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 2

getMainLoopModelOverrideFunction · 0.85
isModelAllowedFunction · 0.85

Tested by

no test coverage detected