Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ This allows you to manage the plugin configuration alongside your other Jenkins
- **Note**: Claude Opus 4.7 and newer models have deprecated the `temperature` parameter. See [model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) for migration details.

### AWS Bedrock
- **Requires**: the [AWS SDK 2.x](https://plugins.jenkins.io/aws-java-sdk2/) plugin (`aws-java-sdk2-core`). This dependency is intentionally **optional** so installations that don't use Bedrock are not forced to carry the AWS SDK. As a result, **AWS Bedrock appears in the AI Provider list only after you install that plugin**. To enable it: **Manage Jenkins → Plugins → Available plugins**, search for `AWS SDK`, install the AWS SDK 2.x plugin, and restart Jenkins.
- **Models**: `anthropic.claude-3-5-sonnet-20240620-v1:0`, `eu.anthropic.claude-3-5-sonnet-20240620-v1:0` (EU cross-region), `meta.llama3-8b-instruct-v1:0`, `us.amazon.nova-lite-v1:0`, etc.
- **API Key**: Not required — uses AWS credential chain (instance profiles, environment variables, etc.)
- **Region**: AWS region (e.g., `us-east-1`, `eu-west-1`). Optional — defaults to AWS SDK region resolution
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package io.jenkins.plugins.explain_error.provider;

import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

/**
* Guards that the AWS Bedrock provider is wired up as a selectable AI provider
* when its dependency is available.
*
* <p>The System configuration dropdown is populated by descriptor discovery over
* {@link BaseAIProvider}. The Bedrock descriptor is registered only when the
* {@code aws-java-sdk2-core} plugin is present — an intentionally optional
* dependency, so instances that do not use Bedrock are not forced to carry the
* AWS SDK. The test harness provides that dependency, so this test verifies the
* descriptor is correctly registered (via {@code @OptionalExtension} and
* {@code @Symbol}) whenever the AWS SDK plugin is installed.
*/
@WithJenkins
class BedrockProviderRegistrationTest {

@Test
void bedrockProviderIsSelectable(JenkinsRule jenkins) {
Comment thread
github-code-quality[bot] marked this conversation as resolved.
Fixed
boolean registered = jenkins.jenkins.getDescriptorList(BaseAIProvider.class).stream()
.anyMatch(descriptor -> descriptor instanceof BedrockProvider.DescriptorImpl);
assertTrue(registered,
"AWS Bedrock provider descriptor must be registered and selectable in the AI Provider list");
}
}