AI-Powered Pull Request Review for Azure Pipelines
This Azure DevOps extension uses advanced AI models to automatically review Pull Requests, providing actionable feedback directly as comments in your PRs. By identifying potential bugs, code quality issues, and best practices violations, it helps improve code quality and accelerate the review process.
Key Features
- Intelligent Code Analysis: Reviews code changes for bugs, performance issues, and best practices violations
- PR Summaries: Generates concise summaries of the entire PR review with actionable insights
- Selective File Review: Ignore specific file types or patterns using glob patterns
- Custom Review Instructions: Tailor the AI reviewer's behavior with custom guidelines
- Multiple AI Models: Support for the latest models from OpenAI and Azure OpenAI (2025)
Setup
Before using this extension, ensure that:
- The build service has permissions to contribute to Pull Requests
- The task has access to the system token
Granting Permissions to the Build Service
The build service needs permissions to add comments to PRs:

Configuring Token Access
YAML Pipelines
Add a checkout section with persistCredentials set to true:
steps:
- checkout: self
persistCredentials: true
Classic Editors
Enable "Allow scripts to access the OAuth token" in the Agent job properties:

Configuration Options
AI Provider Selection
The extension supports both OpenAI and Azure OpenAI:
- OpenAI: Provide your API key and optionally select a model
- Azure OpenAI: Provide your endpoint URL and API key
Azure OpenAI Configuration
When using Azure OpenAI, your endpoint URL should follow this format:
https://{YOUR_RESOURCE_NAME}.openai.azure.com/openai/deployments/{DEPLOYMENT_NAME}/chat/completions?api-version={API_VERSION}
AI Models (2025)
The extension supports the latest AI models:
- GPT-4o (2024) - Default, most powerful general model
- GPT-4 Turbo - Advanced reasoning capabilities
- GPT-4o Mini - Faster reviews for lower complexity codebases
- GPT-3.5 Turbo - Legacy support
File Filtering
Exclude specific files from review using glob patterns:
**/*.md
**/*.json
package-lock.json
Custom Review Guidelines
Provide custom instructions to tailor the AI reviewer to your team's coding standards and priorities.
Example Pipeline Configuration
steps:
- checkout: self
persistCredentials: true
- task: AzurePRBot@1
displayName: 'AI PR Review'
inputs:
api_key: $(OPENAI_API_KEY)
model: 'gpt-4o-2024'
ignore_patterns: |
**/*.md
**/*.json
**/*.lock
Compatibility
The extension works with:
- All Azure DevOps Services environments
- All Azure DevOps Server versions from 2020 and newer
- All build agent operating systems (Windows, Linux, and macOS)
Support and Feedback
For issues, feature requests, or contributions, please visit the GitHub repository.