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

Function normalizeModelTiers

bin/config.js:188–198  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

186}
187
188function normalizeModelTiers(config) {
189 if (!config.models) return;
190 for (const tier of Object.keys(config.models)) {
191 const entry = coerceModelEntry(config.models[tier]);
192 config.models[tier] = {
193 name: entry.name || config.model.name,
194 baseUrl: normalizeBaseUrl(entry.baseUrl || config.model.baseUrl),
195 provider: entry.provider || config.model.provider,
196 };
197 }
198}
199
200function getModelTarget(config, tier = 'default') {
201 const entry = config?.models?.[tier] ? coerceModelEntry(config.models[tier]) : {};

Callers 1

loadConfigFunction · 0.85

Calls 2

coerceModelEntryFunction · 0.85
normalizeBaseUrlFunction · 0.85

Tested by

no test coverage detected