MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getUserSpecifiedModelSetting

Function getUserSpecifiedModelSetting

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

Source from the content-addressed store, hash-verified

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