MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / resolvePreferringDefault

Function resolvePreferringDefault

test/model-resolve.test.ts:103–109  ·  view source on GitHub ↗
(index: Map<string, Val>, modelId: string, defProvider: string, providers: Set<string>)

Source from the content-addressed store, hash-verified

101 return { provider: direct.provider, resolvedId };
102 };
103 const resolvePreferringDefault = (index: Map<string, Val>, modelId: string, defProvider: string, providers: Set<string>) => {
104 if (!modelId.includes('/')) {
105 const q = resolveExact(index, `${defProvider}/${modelId}`, providers);
106 if (q) return q;
107 }
108 return resolveExact(index, modelId, providers);
109 };
110
111 // Two providers serve glm-5.2; api-203668-xyz registers LAST so it owns the bare key.
112 const idx = buildIndex([

Callers 1

Calls 1

resolveExactFunction · 0.85

Tested by

no test coverage detected