Code customization, a feature in Gemini Code Assist, lets you get code suggestions from Gemini Code Assist that are based on your organization's private repositories, and thus aligned to your organization's coding style.
Code customization gives Gemini Code Assist access to code in your private repositories by analyzing and storing it in a private index, as the following diagram shows:
As you code, Gemini Code Assist searches your private index for code that is similar to what you're trying to write. It then includes relevant matches in the code prompt and sends these matches to the Gemini Code Assist recommendations service. Code customization keeps recommendations fresh by reindexing your codebase every 24 hours to ensure that code suggestions remain up to date. Gemini Code Assist returns the generated code to you.
Unlike the full codebase awareness feature, which is limited to searching files in the current folder and open tabs in your IDE, code customization searches all repositories in your index. After code customization is set up, it works as part of the code completion and code generation features.
Both Gemini Code Assist and code customization are managed services. You license usage by seats per month.
Securing access and storage of private code
Google provides security of your stored private code in several ways:
- We index and store your code in a dedicated single-tenant environment.
- Administrative access controls help prevent Google employees from accessing your content without justification and, optionally, explicit approval.
- The Gemini model doesn't train on your private source code.
- Your results are private to you, and we don't share your results with other customers.
For further details on Google's security measures, see the Google security overview.
Here's how you can control access to your data:
- You can use Identity and Access Management (IAM) permissions to help control individuals who can get code suggestions from your codebase.
- You can
create an
.aiexclude
file to choose specific repositories or parts of repositories that Gemini Code Assist indexes.
To configure and use code customization in your IDE, see Configure and use Gemini Code Assist code customization.
Limitations
- Google limits the number of code repository indexes to one for each project and for each organization. If you need more code repository indexes, you can request a higher quota.
- The maximum number of repositories that can be indexed is 20,000.
- The maximum number of repositories per repository group is 500.
- Code customization is supported in the VS Code Gemini Code Assist extension (version 2.18.0+), the IntelliJ Gemini Code Assist plugin (version 1.1.0), Cloud Workstations, and the Cloud Shell Editor.
- Code customization doesn't support VPC Service Controls.
- Code customization doesn't index documentation, media, or other non-code files. For more information, see the Supported coding languages section of this document.
- Code customization only supports repositories hosted on GitLab.com or GitHub.com.
- Code customization doesn't support GitHub Enterprise Cloud IP restrictions.
- Code customization supports only Developer Connect connections
in the following locations (regions):
us-central1
europe-west1
asia-southeast1
Supported coding languages
Code customization supports the following coding languages:
- C, C++, and C#
- Golang
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Rust
- TypeScript
All other coding languages are not indexed or used in code customization. To request support for a coding language, click Send feedback on this page, and then select Product feedback.