-
Notifications
You must be signed in to change notification settings - Fork 198
Support AWS_SESSION_TOKEN
in BedrockClient
#456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
670c7b2
to
5358ec4
Compare
5358ec4
to
842274c
Compare
AWS_SESSION_TOKEN
in BedrockClient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for AWS session tokens in the BedrockClient to enable the use of temporary AWS credentials. The changes primarily focus on enabling Bedrock integration tests that were previously disabled.
- Adds
awsSessionToken
parameter to BedrockLLMClient constructors and related factory functions - Updates integration tests to use proper AWS environment variables and enables previously disabled Bedrock tests
- Adds a smoke test to verify Bedrock credentials before running full integration tests
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
SimplePromptExecutors.jvm.kt | Adds awsSessionToken parameter to simpleBedrockExecutor function |
BedrockLLMClient.kt | Updates constructor to accept and use awsSessionToken for authentication |
TestUtils.kt | Fixes AWS environment variable name and adds session token utility function |
SingleLLMPromptExecutorIntegrationTest.kt | Enables Bedrock tests and updates to use session token |
BedrockCredentialsSmokeTest.kt | New smoke test to verify Bedrock credentials |
env.template.properties | Adds AWS credential environment variables template |
build.gradle.kts | Adds AWS SDK dependencies for Bedrock tests |
libs.versions.toml | Adds bedrock and sts SDK library definitions |
heavy-tests.yml | Updates workflow to run Bedrock smoke test |
Comments suppressed due to low confidence (1)
integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/utils/TestUtils.kt:42
- The warning message is misleading. When AWS_SESSION_TOKEN is not set, null is returned, not a 'default session token'. Consider changing to 'using null (no session token)' or removing the message entirely since returning null for optional session tokens is expected behavior.
println("WARNING: environment variable `AWS_SESSION_TOKEN` is not set, using default session token")
...tests/src/jvmTest/kotlin/ai/koog/integration/tests/SingleLLMPromptExecutorIntegrationTest.kt
Show resolved
Hide resolved
d83fcaa
to
44c92b7
Compare
Qodana for JVM368 new problems were found
@@ Code coverage @@
+ 64% total lines covered
7978 lines analyzed, 5180 lines covered
# Calculated according to the filters of your coverage tool ☁️ View the detailed Qodana report Contact Qodana teamContact us at [email protected]
|
44c92b7
to
e7b3731
Compare
5895a3f
to
18c3dbd
Compare
zarechneva/enable-bedrock-tests