Class OpenAiCompatibleProviderConfig
java.lang.Object
hudson.model.AbstractDescribableImpl<AiProviderConfig>
io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
io.jenkins.plugins.changeinvestigator.ai.provider.OpenAiCompatibleProviderConfig
- All Implemented Interfaces:
Describable<AiProviderConfig>,Serializable
Any endpoint that speaks the OpenAI "chat completions" HTTP shape - OpenRouter, LiteLLM,
vLLM, LM Studio, and similar gateways/proxies not otherwise listed as a first-class provider.
This is the direct successor to the plugin's original (pre-multi-provider) configuration:
an arbitrary base URL, a free-text model, and a credential.
Unlike OpenAiProviderConfig, the credential here is optional: many self-hosted
OpenAI-compatible servers (a local proxy with no auth in front of it, for instance) never
check the Authorization header at all. Existing saved configurations always had a
credential set, so this relaxation is additive and does not change their behavior - see
ChangeInvestigatorGlobalConfiguration
for the migration that produces instances of this class from the plugin's pre-1.x config
format.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested classes/interfaces inherited from class io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
AiProviderConfig.AiProviderConfigDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionOpenAiCompatibleProviderConfig(String baseUrl, String model, String credentialsId) -
Method Summary
Modifier and TypeMethodDescriptioncreateProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int timeoutSeconds) Builds a provider bound to this configuration's resolved settings, ready to make one (or more)AiProvider.chatCompletion(io.jenkins.plugins.changeinvestigator.ai.AiAnalysisRequest)calls.getModel()The model identifier this configuration will request, for display purposes.Methods inherited from class io.jenkins.plugins.changeinvestigator.ai.provider.AiProviderConfig
testConnectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
OpenAiCompatibleProviderConfig
-
-
Method Details
-
getBaseUrl
-
getModel
Description copied from class:AiProviderConfigThe model identifier this configuration will request, for display purposes.- Specified by:
getModelin classAiProviderConfig
-
getCredentialsId
-
createProvider
public AiProvider createProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, int timeoutSeconds) Description copied from class:AiProviderConfigBuilds a provider bound to this configuration's resolved settings, ready to make one (or more)AiProvider.chatCompletion(io.jenkins.plugins.changeinvestigator.ai.AiAnalysisRequest)calls. Resolving the credential happens inside this method, not before it, so the plaintext secret's lifetime is limited to the call that actually needs it.- Specified by:
createProviderin classAiProviderConfig- Parameters:
objectMapper- shared Jackson mapper for building/parsing request and response JSONtimeoutSeconds- administrator-configured connect/request timeout (a global, not per-provider, setting - seeChangeInvestigatorGlobalConfiguration)
-