# Overview

SonarQube Server provides a series of tools to help you manage and use AI-generated code in your projects. Existing capabilities include:

* Quality gates and unique project badge support to AI Code Assurance,
* a series of unique project overview and portfolio labels to identify projects containing AI-generated code,
* as well as AI-generated fix suggestions using Sonar’s AI CodeFix service.

## AI Code Assurance <a href="#ai-code-assurance" id="ai-code-assurance"></a>

AI Code Assurance features help you make sure that the AI-generated code in your project is clean. A new recommended quality gate, *Sonar way for AI Code*, is available to use on projects. In addition, it’s possible to qualify any quality gate for [ai-code-assurance](https://docs.sonarsource.com/sonarqube-server/2025.6/ai-capabilities/ai-code-assurance "mention") and start using it on your projects to ensure security and code quality while boosting team productivity with AI tools.

To learn more about protecting AI-generated code in your project, see the [#label-projects-with-ai-code](https://docs.sonarsource.com/sonarqube-server/2025.6/quality-standards-administration/ai-code-assurance/overview#label-projects-with-ai-code "mention") article.

### Ratings for AI Code Assurance projects in portfolios <a href="#ai-code-assurance-in-portfolios" id="ai-code-assurance-in-portfolios"></a>

*Portfolios are available starting in* [*Enterprise edition*](https://www.sonarsource.com/plans-and-pricing/enterprise/)*.*

It’s possible to view ratings for projects with AI Code Assurance in your portfolios. There, you will see a breakdown of projects, applications, and nested portfolios that include the standards you’ve set for AI-generated code. See the [#portfolio-breakdown](https://docs.sonarsource.com/sonarqube-server/2025.6/user-guide/viewing-reports/portfolios#portfolio-breakdown "mention") article for more information.

## Autodetect AI-generated code <a href="#autodetect-ai-code" id="autodetect-ai-code"></a>

Knowing if your project contains AI-generated code helps raise awareness of code ownership and code security. To help build this awareness, SonarQube Server can autodetect AI-generated code in projects on GitHub using GitHub Copilot. For the full details, see the [autodetect-ai-code](https://docs.sonarsource.com/sonarqube-server/2025.6/ai-capabilities/autodetect-ai-code "mention") page.

If turned on, the feature alerts Instance Admins when project contributors recently used GitHub Copilot so that such projects can be protected with [ai-code-assurance](https://docs.sonarsource.com/sonarqube-server/2025.6/ai-capabilities/ai-code-assurance "mention").

## AI-generated fix suggestions <a href="#ai-generated-fix-suggestions" id="ai-generated-fix-suggestions"></a>

In SonarQube Server Enterprise and Data Center editions, when an Instance Admin enables AI CodeFix for your project, you can get an AI-generated fix suggestion for eligible issues. The suggestions are generated using <code class="expression">space.vars.SQS\_20256\_Supported\_LLM\_version</code> your own Azure OpenAI LLM.

To enable the feature, see the [#enabling-ai-generated-fix-suggestions](https://docs.sonarsource.com/sonarqube-server/2025.6/ai-codefix#enabling-ai-generated-fix-suggestions "mention") article in the administration section.

To learn how to use this feature, read the [#getting-ai-generated-fix-suggestions](https://docs.sonarsource.com/sonarqube-server/2025.6/user-guide/issues/fixing#getting-ai-generated-fix-suggestions "mention") article on the *Fixing issues* page.

AI-generated fix suggestions are available with SonarQube Server, Enterprise and Data Center editions for a select set of rules in Java, JavaScript, TypeScript, Python, HTML, CSS, C#, and C++. To learn more about which rules are eligible for AI CodeFix, please see the list of [#ai-codefix-rules](https://docs.sonarsource.com/sonarqube-server/2025.6/user-guide/rules/rules-for-ai-codefix#ai-codefix-rules "mention").


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2025.6/ai-capabilities/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
