MCPcopy Create free account
hub / github.com/continuedev/continue / llmsFromModelConfig

Function llmsFromModelConfig

core/config/yaml/models.ts:189–222  ·  view source on GitHub ↗
({
  model,
  uniqueId,
  llmLogger,
  config,
}: {
  model: ModelConfig;
  uniqueId: string;
  llmLogger: ILLMLogger;
  config: ContinueConfig;
})

Source from the content-addressed store, hash-verified

187}
188
189export async function llmsFromModelConfig({
190 model,
191 uniqueId,
192 llmLogger,
193 config,
194}: {
195 model: ModelConfig;
196 uniqueId: string;
197 llmLogger: ILLMLogger;
198 config: ContinueConfig;
199}): Promise<BaseLLM[]> {
200 const baseLlm = await modelConfigToBaseLLM({
201 model,
202 uniqueId,
203 llmLogger,
204 config,
205 });
206 if (!baseLlm) {
207 return [];
208 }
209
210 if (model.model === AUTODETECT) {
211 const models = await autodetectModels({
212 llm: baseLlm,
213 model,
214 uniqueId,
215 llmLogger,
216 config,
217 });
218 return models;
219 } else {
220 return [baseLlm];
221 }
222}

Callers 2

models.vitest.tsFile · 0.90

Calls 2

modelConfigToBaseLLMFunction · 0.85
autodetectModelsFunction · 0.85

Tested by

no test coverage detected