Class OpenAICompatibleProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider
io.jenkins.plugins.explain_error.provider.ChatModelAIProvider
io.jenkins.plugins.explain_error.provider.OpenAICompatibleProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<BaseAIProvider>
Generic provider for any OpenAI-compatible endpoint: LiteLLM, OpenWebUI,
self-hosted AI proxies and enterprise API gateways.
Unlike OpenAIProvider, the API key is optional so that
unauthenticated local gateways and proxies can be used without one.
The model name is free text because gateway model names are defined by the
gateway (e.g. gpt-4o, azure/gpt-4o, claude-3-5-sonnet).
Requests use the Chat Completions API by default, or the Responses API for
gateways and models that only support that one.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe OpenAI API the gateway is called with.static classNested classes/interfaces inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
BaseAIProvider.Assistant, BaseAIProvider.BaseProviderDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
model, SYSTEM_PROMPT, url, USER_PROMPT_TEMPLATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected dev.langchain4j.model.chat.ChatModelcreateChatModel(Item item, org.springframework.security.core.Authentication authentication, Double temperature) Creates the chat model for one request.booleanisNotValid(TaskListener listener) voidMethods inherited from class io.jenkins.plugins.explain_error.provider.ChatModelAIProvider
createAssistant, createFixAssistantMethods inherited from class io.jenkins.plugins.explain_error.provider.BaseAIProvider
analyzeError, buildSystemPrompt, buildUserPrompt, createAssistant, createAssistant, createAssistant, createFixAssistant, explainError, explainError, explainError, explainError, explainError, getDescriptor, getEffectiveEndpointForDiagnostics, getModel, getProviderName, getProxyAuthorizationHeader, getUrl, isNotValid, newJenkinsHttpClientBuilder, newLangChainHttpClientBuilder
-
Constructor Details
-
OpenAICompatibleProvider
-
-
Method Details
-
getApiKey
-
getApiType
-
setApiType
-
createChatModel
protected dev.langchain4j.model.chat.ChatModel createChatModel(@CheckForNull Item item, @CheckForNull org.springframework.security.core.Authentication authentication, @CheckForNull Double temperature) Description copied from class:ChatModelAIProviderCreates the chat model for one request.- Specified by:
createChatModelin classChatModelAIProvider- Parameters:
item- the item defining the credentials scope, ornullauthentication- the authentication for credentials lookup, ornulltemperature- the temperature to use, ornullfor the provider default- Returns:
- the configured chat model
-
isNotValid
- Specified by:
isNotValidin classBaseAIProvider
-