Class ChangeInvestigatorGlobalConfiguration

java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.changeinvestigator.config.ChangeInvestigatorGlobalConfiguration
All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension public class ChangeInvestigatorGlobalConfiguration extends GlobalConfiguration
Administrator-controlled, instance-wide settings for AI-assisted regression analysis. Deterministic evidence collection (the "OBSERVED EVIDENCE" section of an investigation) never depends on any setting here; these settings only affect the optional "AI ASSESSMENT" section.

Which AI provider is used, and that provider's own settings (endpoint, deployment, region, credential, ...), live on providerConfig - one of the AiProviderConfig subclasses selected from the "AI Provider" dropdown. Settings that apply identically regardless of provider - temperature, timeout, max log context characters - stay here as global "Advanced settings" rather than being duplicated onto every provider.

  • Field Details

    • DEFAULT_MAX_LOG_CONTEXT_CHARS

      public static final int DEFAULT_MAX_LOG_CONTEXT_CHARS
      See Also:
    • DEFAULT_TIMEOUT_SECONDS

      public static final int DEFAULT_TIMEOUT_SECONDS
      See Also:
    • DEFAULT_TEMPERATURE

      public static final double DEFAULT_TEMPERATURE
      See Also:
  • Constructor Details

    • ChangeInvestigatorGlobalConfiguration

      public ChangeInvestigatorGlobalConfiguration()
  • Method Details

    • get

    • readResolve

      protected Object readResolve()
      Migrates a pre-multi-provider config.xml (flat baseUrl/model/ credentialsId fields directly on this class) into an equivalent OpenAiCompatibleProviderConfig - the closest match to what those flat fields always meant: an arbitrary OpenAI-compatible endpoint. Runs on load, before any AI call could possibly be triggered, and makes no network call itself. The migrated credential ID is carried over unchanged - the secret it points to lives in the Jenkins Credentials store either way and is never touched by this migration.
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException
      Binding the whole form calls every @DataBoundSetter, each of which would otherwise save() on its own - BulkChange defers all of those into the single save() that bc.commit() performs, so submitting this form persists once instead of once per changed field. Individual setter calls made outside form binding (script console, init scripts) are unaffected and still save immediately, since they run with no BulkChange in scope.
      Overrides:
      configure in class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • isAiEnabled

      public boolean isAiEnabled()
    • setAiEnabled

      @DataBoundSetter public void setAiEnabled(boolean aiEnabled)
    • getProviderConfig

      public AiProviderConfig getProviderConfig()
    • setProviderConfig

      @DataBoundSetter public void setProviderConfig(AiProviderConfig providerConfig)
    • getMaxLogContextChars

      public int getMaxLogContextChars()
    • setMaxLogContextChars

      @DataBoundSetter public void setMaxLogContextChars(int maxLogContextChars)
    • getTimeoutSeconds

      public int getTimeoutSeconds()
    • setTimeoutSeconds

      @DataBoundSetter public void setTimeoutSeconds(int timeoutSeconds)
    • getTemperature

      public double getTemperature()
    • setTemperature

      @DataBoundSetter public void setTemperature(double temperature)
    • doTestConnection

      @POST public FormValidation doTestConnection()
      Delegates to the selected provider's own lightweight validation call - see AiProviderConfig.testConnection(com.fasterxml.jackson.databind.ObjectMapper, int). Never sends any real build evidence, only a fixed instruction-only exchange, regardless of which provider is selected.