AI features

P4 Code Review includes AI-powered features that help users understand code changes, improve review quality, and reduce the time spent reviewing complex diffs.

AI features integrate with external AI models and are:

  • Disabled by default.

  • Configured by an administrator.

  • Available to users, administrators, and developers.

AI features at a glance

Feature Description

Documentation

Code analysis

Generates explanations for code diffs.

Use AI for code analysis

AI Assistant for comments

Helps create or improve review comments.

AI Assistant for comments

AI in checklists

Supports automated checklist validation.

Checklists

API integration

Enables programmatic AI analysis.

AiAnalysis: AI code analysis

When AI features are used:

  • Only the file diff or selected code is sent to the AI model.

  • Full files and repositories are not shared.

  • The AI model returns text-based analysis or suggestions.

Supported AI models

P4 Code Review supports integration with multiple AI providers, including:

Quick start: Enable AI features

To start using AI features:

  1. Obtain an API key or access to an AI model (For example, OpenAI, Claude, Gemini, or a local model).

  2. Enable AI features in P4 Code Review.

    • Go to System Information > Configuration.

    • Click AI Configuration to expand the section.

  3. Configure the AI model with your API key and other model details.

  4. Open a code review and test AI features such as:

    • Request a code analysis on a file diff.

    • Send a comment to your AI model for improvement.

For detailed setup instructions, see:

Who can use AI features

Users

Administrators

Developers (API users)