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

Function getProfile

src/model/profiles.js:117–131  ·  view source on GitHub ↗

* Get the effective profile for a model, with defaults for unknowns. * @param {string} modelName * @param {number} detectedContextWindow - From endpoint auto-detection (0 if unknown) * @returns {object}

(modelName, detectedContextWindow = 0)

Source from the content-addressed store, hash-verified

115 * @returns {object}
116 */
117function getProfile(modelName, detectedContextWindow = 0) {
118 const matched = matchProfile(modelName);
119
120 const profile = {
121 context_length: detectedContextWindow || matched?.context_length || 32768,
122 max_output: matched?.max_output || 4096,
123 supports_tool_calling: matched?.supports_tool_calling ?? true,
124 tool_format: matched?.tool_format || 'native',
125 strengths: matched?.strengths || [],
126 weaknesses: matched?.weaknesses || [],
127 matched_key: matched?.matched_key || null,
128 };
129
130 return profile;
131}
132
133module.exports = { KNOWN_PROFILES, matchProfile, getProfile };

Callers 3

constructorMethod · 0.85
mainFunction · 0.85
commands.jsFile · 0.85

Calls 1

matchProfileFunction · 0.85

Tested by

no test coverage detected