MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / isModelAllowed

Method isModelAllowed

src/shared/ProfileValidator.ts:34–50  ·  view source on GitHub ↗
(providerName: string, modelId: string, allowList: OrganizationAllowList)

Source from the content-addressed store, hash-verified

32 }
33
34 private static isModelAllowed(providerName: string, modelId: string, allowList: OrganizationAllowList): boolean {
35 if (allowList.allowAll) {
36 return true
37 }
38
39 const providerAllowList = allowList.providers[providerName]
40
41 if (!providerAllowList) {
42 return false
43 }
44
45 if (providerAllowList.allowAll) {
46 return true
47 }
48
49 return providerAllowList.models?.includes(modelId) ?? false
50 }
51
52 private static getModelIdFromProfile(profile: ProviderSettings): string | undefined {
53 switch (profile.apiProvider) {

Callers 1

isProfileAllowedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected