MCPcopy Create free account
hub / github.com/VPSDance/ai-proxy-rules / aggregateProviders

Function aggregateProviders

scripts/data.ts:64–79  ·  view source on GitHub ↗
(providers: ProviderSource[])

Source from the content-addressed store, hash-verified

62
63 const providers = await Promise.all(files.map((file) => parseProviderFile(file)));
64 return providers.sort((a, b) => a.provider.localeCompare(b.provider));
65}
66
67export function aggregateProviders(providers: ProviderSource[]): RenderTarget {
68 return aggregateProviderSet(providers, "all", "All AI Providers", "Aggregated AI provider rules.");
69}
70
71export function aggregateProvidersByScope(
72 providers: ProviderSource[],
73 scope: ProviderScope,
74 id: string,
75 name: string,
76 description: string
77): RenderTarget {
78 const scopedProviders = providers.filter((provider) => (provider.scope ?? "global") === scope);
79 return aggregateProviderSet(scopedProviders, id, name, description);
80}
81
82function aggregateProviderSet(

Callers 2

buildTargetsFunction · 0.85
generators.test.tsFile · 0.85

Calls 1

mergeRuleSetsFunction · 0.85

Tested by

no test coverage detected