# AI CodeFix

*AI CodeFix is only available in SonarQube Server* [*Enterprise and Data Center editions*](https://www.sonarsource.com/plans-and-pricing/sonarqube/) to provide AI-generated fixes for your issues.

Sonar’s AI CodeFix uses a large language model (LLM) to automatically generate AI-driven code fixes for the issues discovered by SonarQube Server. AI CodeFix must be enabled by an Instance Admin and is defined for **All projects** or for **Only selected projects**.

See the [Enable AI CodeFix](/sonarqube-server/2025.1/instance-administration/ai-features/enable-ai-codefix.md) page for the full details.

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

AI-generated fix suggestions are available 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, see the list of [Rules for AI CodeFix](/sonarqube-server/2025.1/user-guide/rules/rules-for-ai-codefix.md#ai-codefix-rules).

When an Instance Admin enables AI CodeFix for your project, you can get an AI-generated fix suggestion for eligible issues. To learn how to get fix suggestions in SonarQube Server, see [Fixing issues](/sonarqube-server/2025.1/user-guide/issues/fixing.md#getting-ai-generated-fix-suggestions). Then use the [Fixing issues](/sonarqube-server/2025.1/user-guide/issues/fixing.md#opening-in-ide) feature to apply the fix.

If you’re using SonarQube for IntelliJ or SonarQube for VS Code and running in [Connected mode](/sonarqube-server/2025.1/user-guide/connected-mode.md) with SonarQube Server, it’s possible to use AI CodeFix directly in your IDE.

* See the IntelliJ page for [AI CodeFix](/sonarqube-for-intellij/ai-capabilities/ai-codefix.md#ai-codefix)
* See the VS Code page for [AI CodeFix](/sonarqube-for-vs-code/ai-capabilities/ai-codefix.md#ai-codefix)

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Overview](/sonarqube-server/2025.1/ai-capabilities/overview.md) of AI capabilities
* [Rules for AI CodeFix](/sonarqube-server/2025.1/user-guide/rules/rules-for-ai-codefix.md#ai-codefix-rules)
* [Set your AI standards](/sonarqube-server/2025.1/instance-administration/analysis-functions/ai-code-assurance/overview.md)
* [Autodetect AI code](/sonarqube-server/2025.1/instance-administration/ai-features/autodetect-ai-code.md)


---

# 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.1/project-administration/ai-features/enable-ai-codefix.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.
