Class BaseAIProvider.BaseProviderDescriptor

java.lang.Object
hudson.model.Descriptor<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider.BaseProviderDescriptor
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Direct Known Subclasses:
AnthropicProvider.DescriptorImpl, AzureOpenAIProvider.DescriptorImpl, BedrockProvider.DescriptorImpl, CustomOktaAIProvider.DescriptorImpl, DeepSeekProvider.DescriptorImpl, GeminiProvider.DescriptorImpl, LangGraphProvider.DescriptorImpl, MicrosoftFoundryProvider.DescriptorImpl, OllamaProvider.DescriptorImpl, OpenAICompatibleProvider.DescriptorImpl, OpenAIProvider.DescriptorImpl, QwenProvider.DescriptorImpl
Enclosing class:
BaseAIProvider

public abstract static class BaseAIProvider.BaseProviderDescriptor extends Descriptor<BaseAIProvider>
  • Constructor Details

    • BaseProviderDescriptor

      public BaseProviderDescriptor()
  • Method Details

    • getDefaultModel

      public abstract String getDefaultModel()
    • checkConfigurePermission

      protected static void checkConfigurePermission(@CheckForNull AccessControlled context)
      Check that the user has permission to configure the plugin. When called from an item context (folder, job), checks Item.CONFIGURE. When called from a global context, checks Jenkins.ADMINISTER.
      Parameters:
      context - the access-controlled context, or null for global context
    • runConfigurationTest

      protected final FormValidation runConfigurationTest(@CheckForNull AccessControlled context, BaseAIProvider provider)
      Template for the "Test Configuration" button: checks the caller's permission, sends a canned prompt through the fully-constructed provider, and renders either the standard success message or the failure response with connection diagnostics. Descriptors only construct the provider from their form fields and delegate here.
      Parameters:
      context - the item context of the form, or null for global configuration
      provider - the provider instance built from the submitted form values
      Returns:
      the outcome to render next to the button
    • testConfigurationFailed

      protected final FormValidation testConfigurationFailed(BaseAIProvider provider, Exception failure)
      Builds the failure response for a "Test Configuration" call: the provider error plus a layer-by-layer connection diagnostics report (proxy decision, DNS, TCP, HTTP probe, error cause chain) so admins can see where the connection breaks.
      Parameters:
      provider - the provider instance the test was run against
      failure - the exception the test failed with
      Returns:
      a form validation error carrying the diagnostics report
    • doCheckUrl

      @POST public FormValidation doCheckUrl(@QueryParameter String value)