PR Reviewer with LLM Task for Azure Pipelines
English | 繁體中文 | 日本語
This task uses LLMs — OpenAI, Azure OpenAI, Anthropic (Claude), Google Gemini, or DeepSeek — to review code changes and post feedback as comments in the PR process.
English
Features
- Multiple LLM providers: OpenAI, Azure OpenAI, Anthropic (Claude), Google Gemini, DeepSeek
- Customizable system prompt: edit the review instructions directly in the task UI; leave empty to use the built-in default
- Multi-language review comments: 22 languages (English, Traditional Chinese, Simplified Chinese, Japanese, Korean, French, German, Spanish, and more)
- Runs on Node 20
Setup
Before using this task, ensure that the build service has permission to contribute to Pull Requests in your repository, and allow the task to access the system token.
Give permission to the build service agent
In order for the pipeline to add PR comments, grant the Pipeline (Build Service) the following permission in the repository permission settings:

Allow the task to access the system token
For YAML pipelines, add a checkout section with persistCredentials set to true:
steps:
- checkout: self
persistCredentials: true
For Classic editors, enable the option "Allow scripts to access the OAuth token" in the "Agent job" properties.

How to use it
- Install the extension in your Azure DevOps organization.
- Add the task to your build pipeline: click the "+" icon, search for "Review PR by GPT", and add it.
- Configure the task:
- API Endpoint Type: choose OpenAI, AzureOpenAI, Anthropic (Claude), Google Gemini, or DeepSeek.
- API KEY: the API key of the selected provider.
- Azure OpenAI Endpoint (Azure OpenAI only), in this format:
https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions?api-version=2024-02-01
- Model Name: e.g.
gpt-4o, claude-sonnet-4-20250514, gemini-2.0-flash, deepseek-chat.
- Custom System Prompt (optional): your own review instructions. The comment language instruction and the PR patch are appended automatically.
- Comment Language: the language used for review comments.
When the build is triggered from a Pull Request, the task reviews the changed files and adds comments to the PR. If the build is triggered manually, the task is skipped.
The task can execute on all supported build agent operating systems including Linux and macOS.
繁體中文
功能特色
- 支援多種 LLM 供應商:OpenAI、Azure OpenAI、Anthropic (Claude)、Google Gemini、DeepSeek
- 可自訂 System Prompt:直接在任務 UI 中編輯審查指示,留空則使用內建預設值
- 多語言審查留言:支援 22 種語言(繁體中文、簡體中文、日文、韓文、英文、法文、德文、西班牙文等)
- 以 Node 20 執行
設定
使用此任務前,請確認 Build Service 具有對 Repo 的 Pull Request 貢獻權限,並允許任務存取 System Token。
授予 Build Service 權限
為了讓 Pipeline 有權限加入 PR 留言,必須在 Repo 的權限設定中,將 Pipeline (Build Service) 設為允許以下權限:

允許任務存取 System Token
YAML 管線:在 checkout 區段加上 persistCredentials: true:
steps:
- checkout: self
persistCredentials: true
傳統編輯器:在「Agent job」屬性中啟用「Allow scripts to access the OAuth token」選項。

使用方式
- 在您的 Azure DevOps 組織中安裝擴充套件。
- 在建置管線中加入任務:點選「+」圖示,搜尋「Review PR by GPT」並加入。
- 設定任務:
- API Endpoint Type:選擇 OpenAI、AzureOpenAI、Anthropic (Claude)、Google Gemini 或 DeepSeek。
- API KEY:所選供應商的 API 金鑰。
- Azure OpenAI Endpoint(僅 Azure OpenAI 需要),格式如下:
https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions?api-version=2024-02-01
- Model Name:例如
gpt-4o、claude-sonnet-4-20250514、gemini-2.0-flash、deepseek-chat。
- Custom System Prompt(選填):自訂審查指示。留言語言指示與 PR patch 會自動附加。
- Comment Language:審查留言使用的語言。
當建置由 Pull Request 觸發時,任務會審查變更的檔案並在 PR 中加入留言;手動觸發建置時,任務會自動略過。
此任務可在所有支援的建置代理程式作業系統上執行,包含 Linux 與 macOS。
日本語
主な機能
- 複数の LLM プロバイダーに対応:OpenAI、Azure OpenAI、Anthropic (Claude)、Google Gemini、DeepSeek
- システムプロンプトのカスタマイズ:タスク UI 上でレビュー指示を直接編集可能。空欄の場合は組み込みのデフォルトを使用
- 多言語レビューコメント:22 言語に対応(日本語、繁体字中国語、簡体字中国語、韓国語、英語、フランス語、ドイツ語、スペイン語など)
- Node 20 で実行
セットアップ
このタスクを使用する前に、Build Service がリポジトリの Pull Request に貢献できる権限を持っていることを確認し、タスクにシステムトークンへのアクセスを許可してください。
Build Service にアクセス許可を付与する
パイプラインが PR コメントを追加できるように、リポジトリの権限設定で Pipeline (Build Service) に以下の権限を許可してください:

タスクにシステムトークンへのアクセスを許可する
YAML パイプラインの場合、checkout セクションに persistCredentials: true を追加します:
steps:
- checkout: self
persistCredentials: true
クラシックエディターの場合、「Agent job」のプロパティで「Allow scripts to access the OAuth token」オプションを有効にします。

使い方
- Azure DevOps 組織に拡張機能をインストールします。
- ビルドパイプラインにタスクを追加します:「+」アイコンをクリックし、「Review PR by GPT」を検索して追加します。
- タスクを設定します:
- API Endpoint Type:OpenAI、AzureOpenAI、Anthropic (Claude)、Google Gemini、DeepSeek から選択。
- API KEY:選択したプロバイダーの API キー。
- OpenAI:https://platform.openai.com/account/api-keys
- Azure OpenAI:https://portal.azure.com/#create/Microsoft.CognitiveServicesOpenAI からサービスを作成
- Anthropic:https://console.anthropic.com/
- Google Gemini:https://aistudio.google.com/apikey
- DeepSeek:https://platform.deepseek.com/
- Azure OpenAI Endpoint(Azure OpenAI のみ必須)、形式は以下の通り:
https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions?api-version=2024-02-01
- Model Name:例:
gpt-4o、claude-sonnet-4-20250514、gemini-2.0-flash、deepseek-chat。
- Custom System Prompt(任意):独自のレビュー指示。コメント言語の指示と PR パッチは自動的に追加されます。
- Comment Language:レビューコメントの言語。
ビルドが Pull Request からトリガーされた場合、タスクは変更されたファイルをレビューし、PR にコメントを追加します。手動でトリガーされた場合、タスクはスキップされます。
このタスクは、Linux や macOS を含む、サポートされているすべてのビルドエージェント OS で実行できます。
Referenced Original Project
This project is based on the MIT-licensed original project, with Azure OpenAI / Anthropic / Gemini / DeepSeek support, customizable system prompt, and multi-language support added.
Original Project:
https://github.com/mlarhrouch/azure-pipeline-gpt-pr-review