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

Function withModelTarget

bin/config.js:222–233  ·  view source on GitHub ↗
(config, target)

Source from the content-addressed store, hash-verified

220}
221
222function withModelTarget(config, target) {
223 return {
224 ...config,
225 model: {
226 ...config.model,
227 name: target.model || target.name || config.model.name,
228 baseUrl: target.baseUrl || config.model.baseUrl,
229 provider: target.provider || config.model.provider,
230 },
231 activeModelTarget: target,
232 };
233}
234
235/**
236 * Auto-append `/v1` to known OpenAI-compatible endpoints when the user

Callers 6

chatCompletionFunction · 0.85
streamFinalResponseFunction · 0.85
sendToModelFunction · 0.85
chatCompletionFunction · 0.85
streamFinalResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected