C3 AI Documentation Home

Set up C3 AI Model Approval Service on the C3 Agentic AI Platform

C3 AI Model Registry enables sharing of models across applications with capabilities to register, load, and search models. C3 AI Model Registry includes a C3 AI Model Approval Service, enabling your organization to manage the approval status of registered models.

Deploy C3 AI Model Approval Service

The C3 AI Model Approval Service is typically deployed in the c3 environment when C3 AI Studio is deployed in the cluster.

Connect to C3 AI Model Approval Service

First, check if the C3 AI Model Approval Service is deployed and accessible from your environment.

JavaScript
# List models in the C3 AI Model Approval Service
c3.ModelApproval.list() # Error indicates the C3 AI Model Approval is not accessible

You can also check the configuration of the C3 AI Model Approval Service from your application to understand where the C3 AI Model Approval Service is expected to be running.

JavaScript
# View the config for the C3 AI Model Approval Service
c3.Microservice.Config.forName('ModelApproval')

# Example results showing the `appId` for the C3 AI Model Approval Service
# {
#   "type" : "Microservice.Config",
#   "configOverride" : "CLUSTER",
#   "name" : "ModelApproval",
#   "appId" : "plat-c3-modelapprovalservice"
# }

Setup a new C3 AI Model Approval Service

A cluster can support many C3 AI Model Approval Services. For example, you can provide two separate C3 AI Model Approval Services for two user groups that do not want to share models. If you want to create a new C3 AI Model Approval Service within the cluster, do the following.

  1. In C3 AI Studio, create or select an environment in which you desire the C3 AI Model Approval Service to run.

  2. Start an application within the environment with the rootPkg as modelApprovalService to start C3 AI Model Approval Service. To complete this action from thec3 console of the environment, use the following code snippet.

    JavaScript
    var ENV_NAME = \\ Your Env
    var rootPkg = "modelApprovalService";
    Env.forName(ENV_NAME).startApp({"rootPkg": rootPkg});
  3. Navigate to the c3 console of the newly created modelApprovalService application to configure the C3 AI Model Approval Service. Run the following code snippet to allow C3 AI Model Approval Service access to all applications.

    JavaScript
    appId = App.inst().id
    // Application role for connecting to the C3 AI Model Approval Service
    var MS_ROLE = 'ModelApproval.Client';
    
    //  All applications in the cluster are granted access to the current application via provided roles
    AppIdentity.forId(AppIdentity.DEFAULT).withRoles([MS_ROLE]).setConfig();
    
    //  Give access to specific applications
    ModelApprovalService.allowAccess(<App.id value>)
  4. To use the configured C3 AI Model Approval Service, update the microservice configurations for specific applications, environments, or cluster by running the following code snippet in the appropriate c3 console specific to where you want to use the C3 AI Model Approval Service instance.

    JavaScript
    // Use ConfigOverride.ENV to update config for specific ENVS
    var override = ConfigOverride.CLUSTER 
    
    Microservice.Config.forName('ModelApproval').setConfigValue('appId', appId, override)
  5. Verify there is access to the C3 AI Model Approval Service by navigating to the c3 console of the specific application by running the following code snippets.

    JavaScript
    # List models in the C3 AI Model Approval Service
    c3.ModelApproval.list() # Error indicates C3 AI Model Approval Service is not accessible
    
    # View the config for the C3 AI Model Approval Service
    c3.Microservice.Config.forName('ModelApproval')
    
    # Example Result showing the App ID for the C3 AI Model Approval Service
    # {
    #   "type" : "Microservice.Config",
    #   "configOverride" : "CLUSTER",
    #   "name" : "ModelApproval",
    #   "appId" : "plat-c3-modelapprovalservice"
    # }

See also

Was this page helpful?