[PATCH v5] devtools: support local opencode agent for patch review
fengchengwen
fengchengwen at huawei.com
Fri Aug 7 05:32:53 CEST 2026
On 8/7/2026 11:11 AM, Chengwen Feng wrote:
> From: Chengwen Feng <fengchengwen at huawei.com>
>
> Currently review-patch.py only supports cloud AI providers
> (Anthropic, OpenAI, xAI, Google) via REST API, requiring API keys.
>
> Add a --via option that invokes the locally installed opencode CLI as
> the review runner instead of making HTTP calls. opencode reads
> AGENTS.md from the DPDK project directory automatically, needing no
> configuration beyond opencode on PATH.
>
> The --via and -p/--provider options are independent -- via routes to
> the local agent mode while -p continues to use the cloud API path.
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
> ---
> v5: Use linux.dev mailbox to send email and update mailmap
> v4: Fix AI review comments with Claude Opus which provided by Stephen
> v3: Rebase main to fix apply error
> v2: Address comments from Stephen, including: not arise
> FileNotFoundError and more clarify.
>
> ---
> .mailmap | 2 +-
> devtools/ai/review-patch.py | 305 ++++++++++++++++++++++------
> doc/guides/contributing/patches.rst | 10 +
> 3 files changed, 249 insertions(+), 68 deletions(-)
>
> diff --git a/.mailmap b/.mailmap
> index fcb3d1bb3f..d86a09b5b3 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -270,7 +270,7 @@ Chengfei Han <han.chengfei at zte.com.cn>
> Chengfeng Ye <cyeaa at connect.ust.hk>
> Chenghu Yao <yao.chenghu at zte.com.cn>
> Chenglian Sun <sunchenglian at loongson.cn>
> -Chengwen Feng <fengchengwen at huawei.com>
> +Chengwen Feng <fengchengwen at huawei.com> <chengwen.feng at linux.dev>
For this new email address:
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
More information about the dev
mailing list