Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Does context caching only work in one project per organization?

The very first project my org setup years ago succeeds running:

vertexai.preview.caching.CachedContent.create()

but any other project/service account i attempt the above in throws either a 500 internal server error or a 403 permissions error. We have verified about 10 times over that these other projects/service accounts have the exact same permissions/roles that the working project has.

Is this feature somehow organizationally limited because its in pre-GA?

1 1 154
1 REPLY 1

Hi @piercelamb,

Welcome to Google Cloud Community!

The issue you're encountering with

vertexai.preview.caching.CachedContent.create()

might indeed be related to the feature's pre-GA status or some organizational limitations.

Here are a few points to consider:

  1. Pre-GA Features: Features marked as "preview" or "pre-GA" (Generally Available) often have restrictions that are not present in fully released services. These might include limitations on which projects or organizations can access the feature, or additional steps required to enable it.
  2. Permissions and Roles: Even if permissions and roles are the same across projects, additional permissions or configurations might be needed for pre-GA features. Make sure the service accounts have the specific roles and permissions required for the preview feature, not just the general Vertex AI permissions.
  3. Organizational Restrictions: Sometimes, features in preview stages are restricted to certain organizations or require explicit enablement. It’s possible that the feature might only be available to specific projects or organizations, especially if it’s still in an early stage of deployment.
  4. API Quotas and Limits: Check if there are any quotas or limits that might be affecting the access. Sometimes, pre-GA features have stricter quotas or rate limits.
  5. Error Details: Look closely at the error messages. A 500 Internal Server Error typically might be caused by the request taking too long to load, or the CPU or memory utilization is high. A 403 Forbidden error when you run the executor can mean that the executor isn't able to access resources.
  6. Feature Availability: Ensure that the feature is enabled in the projects where you’re encountering issues. Sometimes, features need to be explicitly enabled, even if permissions are correctly set.

I hope the above information is helpful.