[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/gemini-enterprise-agent-platform/models/control-model-access [Back]  [Original]

Control access to Model Garden models  |  Gemini Enterprise Agent Platform  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Control access to Model Garden models Stay organized with collections Save and categorize content based on your preferences.

Model Garden's organization policy lets you centrally control the models your users can access and the actions they can take. By default, anyone with permissions to use Gemini Enterprise Agent Platform can use Model Garden to discover, customize, and deploy a wide variety of Google and third-party models.

Setting a Model Garden policy might be useful, for example, if you have a set of approved Google and third-party models that can be used in production environments. You can define a policy at the organization, folder, or project level so that your users can only access the approved models. A policy applies to all principals. An organization policy is not a per-user policy. For more information, see Introduction to the Organization Policy Service.

Policy evaluations

At evaluation time, all policies that contribute to a particular resource are reviewed, and only the applicable policies are merged and then evaluated. Any explicit deny value takes precedence over any explicit allow value.

For example, imagine you have a folder policy that denies a specific model and a project policy that allows that same model. Assuming that the policies are merged, access to the model is denied at the project level because the explicit deny policy at the folder level takes precedence. However, if you set the project policy to override all parent policies, then access to the model is allowed at the project level.

For more information, see Understanding hierarchy evaluation in the Resource Manager documentation.

Considerations

Policy details

When you set a policy, you define one of the following actions:

By default, if no policy is set or inherited, all models and actions are allowed.

For a custom deny policy, you explicitly deny a list of models and implicitly allow all other models. Similarly, for a custom allow policy, you explicitly allow a list of models and implicitly deny all other models.

To specify models in a custom policy and a model action, use the following format:

publishers/PUBLISHER/models/MODEL_NAME:ACTION

Replace the following:

For example, to define a policy rule on predictions against the Gemini 3.5 Flash model, specify publishers/google/models/gemini-3.5-flash:predict.

The fully qualified ID (publishers/PUBLISHER/models/MODEL_NAME) is also known as the model ID. To find the model ID for a model, go to its model card in Model Garden. For links to model cards, see the list of models in Explore AI models in Model Garden.

Model actions

For each model, you can allow or deny the following actions:

Set a policy for model actions

You can set a policy for Model Garden by using the Google Cloud console or the Google Cloud CLI. The name of the constraint is vertexai.allowedModels. For more information about setting policies, see the the following topics in the Resource Manager documentation:

Partner model features

For partner models, you can allow or deny the following actions:

Set a policy for partner model features

You can allow or deny web_search and structured_outputs for partner models by using the vertexai.allowedPartnerModelFeatures constraint.

Example policies

The following example policies are in the YAML format, which you use when setting a policy through the gcloud CLI.

Deny a set of models and allow all other models

The following example denies actions on a specific set of models.

name: organizations/ORGANIZATION_ID/policies/vertexai.allowedModels
spec:
  rules:
    values:
      deniedValues:
      - publishers/meta/models/llama3:deploy
      - publishers/google/models/gemini-3.5-flash:tune
      - publishers/hf-google/models/gemma-2b:deploy

Replace ORGANIZATION_ID with the ID of your Google Cloud organization. For more information, see Getting an organization resource.

Allow a set of models and deny all other models

The following example allows actions on a specific set of models.

name: organizations/ORGANIZATION_ID/policies/vertexai.allowedModels
spec:
  rules:
    values:
      allowedValues:
      - publishers/meta/models/llama3:deploy
      - publishers/google/models/gemini-3.5-flash:tune
      - publishers/hf-google/models/gemma-2b:deploy

To enable the web_search feature for partner models, you can specify the following:

The following example enables web_search for all models from Anthropic:

name: organizations/ORGANIZATION_ID/policies/vertexai.allowedPartnerModelFeatures
spec:
  rules:
    values:
      allowedValues:
      # Allow all features of this publisher
      - publishers/anthropic
      # Allow all features of this model
      - publishers/anthropic/models/MODEL_NAME
      # Allow this feature
      - publishers/anthropic/models/MODEL_NAME:web_search

Enable structured_outputs for partner models

To enable the structured_outputs feature for partner models, you can specify the following:

The following example enables structured_outputs for all models from Anthropic:

name: organizations/ORGANIZATION_ID/policies/vertexai.allowedPartnerModelFeatures
spec:
  rules:
    values:
      allowedValues:
      # Allow all features of this publisher
      - publishers/anthropic
      # Allow all features of this model
      - publishers/anthropic/models/MODEL_NAME
      # Allow this feature
      - publishers/anthropic/models/MODEL_NAME:structured_outputs

What's next

Guide

Use generative models from Model Garden in the .

Guide

Quickly view and test what various models can do using demos in Model Garden.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page