MCPcopy
hub / github.com/Doorman11991/smallcode / getModelTarget

Function getModelTarget

bin/config.js:200–209  ·  view source on GitHub ↗
(config, tier = 'default')

Source from the content-addressed store, hash-verified

198}
199
200function getModelTarget(config, tier = 'default') {
201 const entry = config?.models?.[tier] ? coerceModelEntry(config.models[tier]) : {};
202 return {
203 tier,
204 model: entry.name || config?.model?.name || '',
205 name: entry.name || config?.model?.name || '',
206 baseUrl: normalizeBaseUrl(entry.baseUrl || config?.model?.baseUrl || ''),
207 provider: entry.provider || config?.model?.provider || 'openai',
208 };
209}
210
211function getModelTargetForModel(config, modelName, preferredTier = 'default') {
212 if (config?.models) {

Callers 9

runAgentLoopFunction · 0.85
chatCompletionFunction · 0.85
streamFinalResponseFunction · 0.85
sendToModelFunction · 0.85
chatCompletionFunction · 0.85
streamFinalResponseFunction · 0.85
getModelTargetForModelFunction · 0.85

Calls 2

coerceModelEntryFunction · 0.85
normalizeBaseUrlFunction · 0.85

Tested by

no test coverage detected