Skip to content

fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set#7284

Merged
lifeizhou-ap merged 2 commits intoblock:mainfrom
ibaaaaal:fix/sagemaker-tgi-config-collision
Mar 12, 2026
Merged

fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set#7284
lifeizhou-ap merged 2 commits intoblock:mainfrom
ibaaaaal:fix/sagemaker-tgi-config-collision

Conversation

@ibaaaaal
Copy link
Copy Markdown
Contributor

@ibaaaaal ibaaaaal commented Feb 17, 2026

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_NAME was declared as required=false in the provider metadata, while AWS_REGION and AWS_PROFILE were required=true with defaults. When a user configures Bedrock, the shared AWS_REGION/AWS_PROFILE keys get stored globally. The check_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. The check_provider_configured() function returns false for providers with zero required keys, causing Bedrock to never appear as "configured" in the provider selection dropdown.

Fix

SageMaker TGI fix (sagemaker_tgi.rs):

  • Mark SAGEMAKER_ENDPOINT_NAME as required=true — it is already required at runtime
  • Mark AWS_REGION and AWS_PROFILE as required=false — consistent with Bedrock

Bedrock fix (bedrock.rs):

  • Mark AWS_REGION as required=true with default "us-east-1" — this ensures Bedrock is properly marked as configured when the region is set
  • Update test assertion to reflect correct expected behavior

Validation

  • cargo fmt --check — pass
  • cargo clippy -D warnings — pass
  • cargo test --release -p goose — 687 tests pass (4 unrelated failures in prompt_manager are pre-existing)

@ibaaaaal ibaaaaal force-pushed the fix/sagemaker-tgi-config-collision branch 3 times, most recently from c374dbb to 218824d Compare February 18, 2026 00:10
- 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 [email protected]
@ibaaaaal ibaaaaal force-pushed the fix/sagemaker-tgi-config-collision branch from 218824d to 8a13da5 Compare February 18, 2026 00:14
* main: (270 commits)
  test(acp): align provider and server test parity (block#7822)
  fix(acp): register MCP extensions when resuming a session (block#7806)
  fix(goose): load .gitignore in prompt_manager for hint file filtering (block#7795)
  fix: remap max_completion_tokens to max_tokens for OpenAI-compatible providers (block#7765)
  fix(openai): preserve Responses API tool call/output linkage (block#7759)
  chore(deps): bump @hono/node-server from 1.19.9 to 1.19.11 in /evals/open-model-gym/mcp-harness (block#7687)
  fix: return ContextLengthExceeded when prompt exceeds effective KV cache size (block#7815)
  feat: MCP Roots support (block#7790)
  fix(google): use `includeThoughts/part.thought` for thinking handling (block#7593)
  refactor: simplify tokenizer initialization — remove unnecessary Result wrapper (block#7744)
  Fix model selector showing wrong model in tabs (block#7784)
  Stop collecting goosed stderr after startup (block#7814)
  fix: avoid word splitting by space for windows shell commands (block#7781) (block#7810)
  Simplify and make it not break on linux (block#7813)
  Add preferred microphone selection  (block#7805)
  Remove dependency on posthog-rs (block#7811)
  feat: load hints in nested subdirs (block#7772)
  feat(acp): add read tool and delegate filesystem I/O to ACP clients (block#7668)
  Support secret interpolation in streamable HTTP extension URLs (block#7782)
  More logging for command injection classifier model training (block#7779)
  ...
Copy link
Copy Markdown
Collaborator

@lifeizhou-ap lifeizhou-ap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing it!

@lifeizhou-ap lifeizhou-ap added this pull request to the merge queue Mar 12, 2026
Merged via the queue into block:main with commit 1493174 Mar 12, 2026
21 checks passed
michaelneale added a commit that referenced this pull request Mar 15, 2026
* origin/main:
  Remove include from Cargo.toml in goose-mcp (#7838)
  Exit agent loop when tool call JSON fails to parse (#7840)
  chore: remove redundant husky prepare script (#7829)
  Add github actions workflow for unused deps (#7681)
  fix: prevent SSE connection drops from silently truncating responses (#7831)
  doc: Added notes in contribution guide for pnpm (#7833)
  add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828)
  fix: remove dead read handler from DeveloperClient (#7821)
  fix: prevent SageMaker TGI from being marked configured when only Bedrock keys are set (#7284)
  fix: disable some computercontroller functionality when no $DISPLAY detected (#7824)
  test(acp): align provider and server test parity (#7822)
  fix(acp): register MCP extensions when resuming a session (#7806)

# Conflicts:
#	ui/desktop/src/hooks/useChatStream.ts
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.

Bedrock Provider sets value on AWS Sage Manager

2 participants