MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / setFastModelSlot

Function setFastModelSlot

apps/cli/src/ai/llm-config.ts:220–233  ·  view source on GitHub ↗
(aiDataDir: string, slot: ModelSlot | null)

Source from the content-addressed store, hash-verified

218}
219
220export function setFastModelSlot(aiDataDir: string, slot: ModelSlot | null): { success: boolean; error?: string } {
221 const storeForSave = loadRawConfigStore(aiDataDir)
222
223 if (slot !== null) {
224 const config = storeForSave.configs.find((c) => c.id === slot.configId)
225 if (!config) {
226 return { success: false, error: 'Config not found' }
227 }
228 }
229
230 storeForSave.fastModel = slot
231 saveLlmConfig(aiDataDir, storeForSave)
232 return { success: true }
233}
234
235function loadRawConfigStore(aiDataDir: string): AIConfigStore {
236 const configPath = path.join(aiDataDir, 'llm-config.json')

Callers

nothing calls this directly

Calls 2

loadRawConfigStoreFunction · 0.85
saveLlmConfigFunction · 0.85

Tested by

no test coverage detected