Skip to content

refactor: implement LLMProvider as proper Describable ExtensionPoint#6

Merged
saurabh-oss merged 1 commit intomainfrom
jenkins-hosting-compliance
Apr 17, 2026
Merged

refactor: implement LLMProvider as proper Describable ExtensionPoint#6
saurabh-oss merged 1 commit intomainfrom
jenkins-hosting-compliance

Conversation

@saurabh-oss
Copy link
Copy Markdown
Owner

LLMProvider is now an abstract class implementing ExtensionPoint and Describable. Each provider has:

  • @DataBoundConstructor with sensible defaults (endpoint, modelId)
  • An @extension DescriptorImpl with getDisplayName() and doTestConnection()
  • Its own config.jelly rendered inline via f:hetero-radio

Common fields (endpoint, modelId, apiKeyCredentialId) live in LLMProvider base. Common LLM call settings (temperature, timeout, maxTokens) remain in ForgeAIGlobalConfiguration and are read at call time — no duplication.

ForgeAIGlobalConfiguration now stores a single LLMProvider instance selected via f:hetero-radio. Removed: providerType string, llmEndpoint, modelId, apiKeyCredentialId, doFillProviderTypeItems, resolveApiKey, doFillApiKeyCredentialIdItems (moved to LLMProviderDescriptor base class).

LLMProviderFactory is kept as a deprecated pass-through for backward compatibility but is no longer the canonical way to obtain a provider.

Third-party plugins can now add new LLM backends by extending LLMProvider and annotating their Descriptor with @extension — no changes required here.

LLMProvider is now an abstract class implementing ExtensionPoint and
Describable<LLMProvider>. Each provider has:
- @DataBoundConstructor with sensible defaults (endpoint, modelId)
- An @extension DescriptorImpl with getDisplayName() and doTestConnection()
- Its own config.jelly rendered inline via f:hetero-radio

Common fields (endpoint, modelId, apiKeyCredentialId) live in LLMProvider base.
Common LLM call settings (temperature, timeout, maxTokens) remain in
ForgeAIGlobalConfiguration and are read at call time — no duplication.

ForgeAIGlobalConfiguration now stores a single LLMProvider instance
selected via f:hetero-radio. Removed: providerType string, llmEndpoint,
modelId, apiKeyCredentialId, doFillProviderTypeItems, resolveApiKey,
doFillApiKeyCredentialIdItems (moved to LLMProviderDescriptor base class).

LLMProviderFactory is kept as a deprecated pass-through for backward
compatibility but is no longer the canonical way to obtain a provider.

Third-party plugins can now add new LLM backends by extending LLMProvider
and annotating their Descriptor with @extension — no changes required here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@saurabh-oss saurabh-oss merged commit 2795e53 into main Apr 17, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant