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

Function resolveSlot

packages/node-runtime/src/ai/llm-config-store.ts:65–69  ·  view source on GitHub ↗
(slot: ModelSlot | null | undefined, configs: AIServiceConfig[])

Source from the content-addressed store, hash-verified

63}
64
65function resolveSlot(slot: ModelSlot | null | undefined, configs: AIServiceConfig[]): ModelSlot | null {
66 if (slot && configs.some((c) => c.id === slot.configId)) return slot
67 const fallback = configs[0]
68 return fallback ? { configId: fallback.id, modelId: fallback.model || '' } : null
69}
70
71function getAuthProfile(config: AIServiceConfig): string | undefined {
72 return (config as unknown as Record<string, unknown>).authProfile as string | undefined

Callers 5

loadStoreMethod · 0.70
getFastModelSlotMethod · 0.70
getFastModelConfigMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected