Skip to main content
  1. Posts/

Explain Error Plugin Major Update — AI Auto-Fix, Usage Management, and More AI Providers

·630 words·3 mins· ·
Xianpeng Shen
Author
Xianpeng Shen
Engineer. Builder. Maintainer.
Table of Contents
Explain Error Plugin - This article is part of a series.
Part 5: This Article

It’s been over two months since the last update article. The Explain Error Plugin iteration hasn’t stopped; instead, it has received a wave of intensive updates. Today, I’ll clarify them all at once.


AI Auto-Fix: Automatically Create Fix PRs After Build Failures
#

This is the biggest feature in the past two months.

Previously, the plugin’s positioning was “telling developers why the build failed.” AI analyzed logs, provided suggestions, but you still had to make the changes yourself.

AI Auto-Fix completes this closed loop—when enabled, upon a build failure, the plugin will automatically analyze errors, generate code fixes, create branches, and submit PRs. It supports GitHub, GitLab, Bitbucket Cloud, and their self-hosted versions.

Multiple layers of protection have been implemented for security: path traversal checks, skipping low-confidence changes, skipping empty changes. By default, it only allows modifications to build configuration files (pom.xml, *.properties, *.yml, etc.), and does not touch business code.

To use in Pipeline, only a few lines of configuration are needed:

explainError(
    autoFix: true,
    autoFixCredentialsId: 'github-token',
    autoFixAllowedPaths: 'pom.xml,*.properties,*.yml'
)

Usage Statistics and Quota Management
#

As the number of plugin users grows, a natural question arises: How many times has AI been invoked? How much did it cost?

Usage Statistics
#

Usage Statistics provides intuitive visualization on the Manage Jenkins → Explain Error Plugin - Usage Statistics page: total invocations, current month’s usage, and Top 10 project rankings.

Usage Quota
#

Usage Quota allows you to control costs. It supports both global and folder levels, with invocation limits configurable by hour or day. Logs will clearly indicate when the limit is exceeded, preventing additional costs.

Metrics Export
#

Through MetricsUsageRecorder, invocation statistics are automatically exposed to the Jenkins Metrics plugin, facilitating integration with external monitoring systems.


Four New AI Providers
#

Custom Okta AI
#

Submitted by community contributor @mapham via PR #138. Supports OAuth authentication flow for enterprise Okta gateways, adapting to corporate scenarios with Okta unified authentication.

Azure OpenAI
#

PR #147 adds support for Azure OpenAI Service. Simply configure Azure endpoint, deployment, and API version through Jenkins Credentials Management.

DeepSeek
#

PR #149 adds support for DeepSeek, with the default model deepseek-v4-flash. It integrates using an OpenAI-compatible API, offering high cost-performance.

Qwen
#

Also in PR #149, support for Tongyi Qianwen (Qwen) has been added, with the default model qwen-plus, integrated via Alibaba Cloud DashScope.

Current supported Providers:

ProviderDescription
OpenAIDefault provider
Google GeminiJoined in August 2025
OllamaLocal/intranet deployment
AWS BedrockAWS ecosystem
Custom Okta AIOkta enterprise gateway
Azure OpenAIAzure managed service
DeepSeekHigh cost-performance
QwenAlibaba Cloud DashScope

Bug Fixes and Experience Optimizations
#

Fixed log extraction failure in specific Pipeline patterns (PR #109): In scenarios combining catchError + sh(returnStatus: true) + error(), failed logs could not be extracted correctly previously. Fixed by community contributor @lidiams96.

Fixed NPE when Provider is not configured (PR #126): A null pointer exception is no longer thrown when the plugin is newly installed but no AI provider is configured.

Default Provider set to OpenAI (PR #137): Consistent with documentation behavior, OpenAI is automatically used when not configured. Submitted by community contributor @donhui.

Fixed connection issues in intranet proxy environments (PR #146): The plugin now reads Jenkins proxy configurations, allowing normal access to external AI services even in intranet environments.


Summary
#

FeatureType
AI Auto-FixMajor Feature
Usage Statistics + Quota + MetricsNew Features
Custom Okta AI / Azure OpenAI / DeepSeek / QwenNew Providers
catchError Log Fix / NPE Fix / Proxy Support / Default ProviderBug Fixes & Experience Optimizations

If you encounter any problems or have suggestions during use, feel free to raise an Issue on GitHub. Community contributions are also welcome—Custom Okta AI, catchError fix, and default Provider fix in this update all came from community contributors.

Explain Error Plugin - This article is part of a series.
Part 5: This Article

Related