fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set#7284
Open
ibaaaaal wants to merge 1 commit intoblock:mainfrom
Open
fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set#7284ibaaaaal wants to merge 1 commit intoblock:mainfrom
ibaaaaal wants to merge 1 commit intoblock:mainfrom
Conversation
c374dbb to
218824d
Compare
- SageMaker TGI: mark SAGEMAKER_ENDPOINT_NAME as required, AWS_REGION/AWS_PROFILE as optional - Bedrock: mark AWS_REGION as required with default to fix is_configured always returning false Signed-off-by: ibaaaaal rifaldi.51922721@mahasiswa.unikom.ac.id
218824d to
8a13da5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7268 — Configuring Amazon Bedrock causes Amazon SageMaker TGI to appear as configured.
This PR also fixes a related issue: Amazon Bedrock itself was not appearing in the provider selection dropdown because all its config keys were optional.
Root Cause
Issue 1: SageMaker TGI incorrectly marked as configured
SAGEMAKER_ENDPOINT_NAMEwas declared asrequired=falsein the provider metadata, whileAWS_REGIONandAWS_PROFILEwererequired=truewith defaults. When a user configures Bedrock, the sharedAWS_REGION/AWS_PROFILEkeys get stored globally. Thecheck_provider_configured()logic then sees SageMaker TGI's required keys are satisfied and marks it as configured, even though no SageMaker endpoint was actually set up.Issue 2: Bedrock not appearing in provider dropdown
Amazon Bedrock had all config keys marked as
required=false. Thecheck_provider_configured()function returnsfalsefor providers with zero required keys, causing Bedrock to never appear as "configured" in the provider selection dropdown.Fix
SageMaker TGI fix (
sagemaker_tgi.rs):SAGEMAKER_ENDPOINT_NAMEasrequired=true— it is already required at runtimeAWS_REGIONandAWS_PROFILEasrequired=false— consistent with BedrockBedrock fix (
bedrock.rs):AWS_REGIONasrequired=truewith default"us-east-1"— this ensures Bedrock is properly marked as configured when the region is setValidation
cargo fmt --check— passcargo clippy -D warnings— passcargo test --release -p goose— 687 tests pass (4 unrelated failures in prompt_manager are pre-existing)