Skip to content

feat: add Amazon Bedrock Mantle (OpenAI-compatible) AI provider#1640

Open
sankeyraut wants to merge 12 commits intok8sgpt-ai:mainfrom
sankeyraut:feat/add-bedrockmantle-provider
Open

feat: add Amazon Bedrock Mantle (OpenAI-compatible) AI provider#1640
sankeyraut wants to merge 12 commits intok8sgpt-ai:mainfrom
sankeyraut:feat/add-bedrockmantle-provider

Conversation

@sankeyraut
Copy link
Copy Markdown

📑 Description

Add bedrockmantle as a new AI backend that uses Amazon Bedrock's OpenAI-compatible Chat Completions endpoint (bedrock-mantle.{region}.api.aws).

  • New provider: pkg/ai/bedrockmantle.go
  • Reads API key from AWS_BEARER_TOKEN_BEDROCK env var
  • Auto-constructs endpoint URL from providerRegion
  • Reuses existing go-openai library
  • Registered in clients, Backends, and passwordlessProviders
  • providerRegion required via cmd/auth/add.go PreRun
  • Unit tests with mock HTTP server
  • Updated SUPPORTED_MODELS.md with supported models

✅ Checks

  • [✅] My pull request adheres to the code style of this project
  • [✅] My code requires changes to the documentation
  • [✅] I have updated the documentation as required
  • [✅] All the tests have passed

@sankeyraut sankeyraut requested a review from a team as a code owner April 20, 2026 05:10
@sankeyraut sankeyraut requested a review from a team as a code owner April 20, 2026 05:10
@github-project-automation github-project-automation Bot moved this to Proposed in Backlog Apr 20, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 20, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: CradleKing24 / name: CradleKing24 (1d0b0cc, 6b51b03)
  • ✅ login: doppoluv / name: Semyon Inokov (4ce968e)
  • ✅ login: github-actions[bot] / name: github-actions[bot] (bfdc7ea, f7382d5)
  • ✅ login: lawrencelo8 / name: lawrencelo8 (3bd537d)
  • ✅ login: majiayu000 / name: lif (c90a7c5)
  • ✅ login: renovate[bot] / name: renovate[bot] (b99eacf)
  • ✅ login: sankeyraut / name: Sanket (1e7e040)
  • ✅ login: sankeyraut / name: Sanket Raut (7da4187, 2a8fa33)
  • ✅ login: squatboy / name: lee jaeyoung (64ae3e7)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid implementation and the test suite is laaaaid out perfectly. LGTM!

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.56%. Comparing base (173e4dc) to head (257c73a).
⚠️ Report is 219 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ai/bedrockmantle.go 85.24% 7 Missing and 2 partials ⚠️
cmd/auth/add.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1640      +/-   ##
==========================================
+ Coverage   34.76%   43.56%   +8.79%     
==========================================
  Files          94      120      +26     
  Lines        6342     9527    +3185     
==========================================
+ Hits         2205     4150    +1945     
- Misses       4046     5163    +1117     
- Partials       91      214     +123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexsJones
Copy link
Copy Markdown
Member

@sankeyraut please lint

@sankeyraut
Copy link
Copy Markdown
Author

@AlexsJones : Done. Updated based on PR's touchpoints.

CradleKing24 and others added 11 commits April 27, 2026 11:08
* feat: add amazon bedrock converse api support

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>

* docs(amazonbedrockconverse): add backend amazonbedrockconverse details

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>

* fix(amazonbedrockconverse): error statements and comment cleanup

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>

* test(amazonbedrockconverse): add unit tests

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>

* fix(amazonbedrockconverse): linting, test coverage, converse output review

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>

---------

Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
…k8sgpt-ai#1626)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
Add bedrockmantle as a new AI backend that uses Amazon Bedrock's
OpenAI-compatible Chat Completions endpoint (bedrock-mantle.{region}.api.aws).

- New provider: pkg/ai/bedrockmantle.go
- Reads API key from AWS_BEARER_TOKEN_BEDROCK env var
- Auto-constructs endpoint URL from providerRegion
- Reuses existing go-openai library
- Registered in clients, Backends, and passwordlessProviders
- providerRegion required via cmd/auth/add.go PreRun
- Unit tests with mock HTTP server
- Updated SUPPORTED_MODELS.md with supported models

Signed-off-by: Sanket <sankeyraut@gmail.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
…8sgpt-ai#1599)

* fix: recognize GKE built-in ingress classes 'gce' and 'gce-internal'

Skip IngressClass existence validation for GKE's built-in ingress classes
that work without an explicit IngressClass resource in the cluster.
This fixes false positive errors when using 'gce' or 'gce-internal'
ingress class on GKE.

Closes k8sgpt-ai#849

Signed-off-by: majiayu000 <1835304752@qq.com>

* chore: trigger CI re-run

Signed-off-by: majiayu000 <1835304752@qq.com>

---------

Signed-off-by: majiayu000 <1835304752@qq.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
…i#1602)

- Add detection for dynamically loaded ConfigMaps (Grafana sidecar)
- Support grafana_dashboard and grafana_datasource labels
- Support prometheus_rule and fluentd_config labels
- Add k8sgpt.ai/dynamically-loaded label for custom patterns
- Add k8sgpt.ai/skip-usage-check annotation to opt-out
- Add comprehensive test cases for sidecar patterns

Fixes false positives where ConfigMaps loaded dynamically by sidecar
containers (via Kubernetes API watches with label selectors) were
incorrectly flagged as unused.

Tested on production cluster with kube-prometheus-stack:
- Before: 29 ConfigMaps incorrectly flagged as unused
- After:  No false positives (29 eliminated - 100% reduction)

Signed-off-by: sqautboy <migonyoung01@gmail.com>
Co-authored-by: Alex Jones <1235925+AlexsJones@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
…i#1638)

Signed-off-by: lawrencelo8 <lawrencelo8@users.noreply.github.com>
Co-authored-by: Lo, Jungshih <lawrencelo8@users.noreply.github.com>
Co-authored-by: Alex Jones <1235925+AlexsJones@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
…t-ai#1636)

Signed-off-by: Semyon Inokov <semen.inokov@gmail.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
Signed-off-by: CradleKing24 <44717227+CradleKing24@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Sanket Raut <sankeyraut@gmail.com>
@sankeyraut sankeyraut force-pushed the feat/add-bedrockmantle-provider branch from 755142c to bfdc7ea Compare April 27, 2026 05:39
Signed-off-by: Sanket Raut <sankeyraut@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Proposed

Development

Successfully merging this pull request may close these issues.

8 participants