Skip to content

refactor: remove Amazon Bedrock as first-class provider - #1212

Merged
cv merged 2 commits into
mainfrom
revert/bedrock-provider
Mar 31, 2026
Merged

refactor: remove Amazon Bedrock as first-class provider#1212
cv merged 2 commits into
mainfrom
revert/bedrock-provider

Conversation

@cv

@cv cv commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reverts #963 and adds a guard test that prevents new CSP-specific provider keys from being added to the installer.

Rationale

Bedrock's OpenAI-compatible endpoint already works through the existing compatible-endpoint option — the same path every other CSP wrapper (Vertex, Azure OpenAI, etc.) should use. Adding a dedicated provider key for each CSP does not scale: each one requires config in onboard.js, a case in inference-config.js, UX menu entries, model curation, validation logic, tests, and docs. The compatible-endpoint and compatible-anthropic-endpoint options already cover these use cases generically.

Changes

  • bin/lib/onboard.js: Remove BEDROCK_ENDPOINT_URL, bedrock from REMOTE_PROVIDER_CONFIG, REMOTE_MODEL_OPTIONS, validProviders, interactive menu, region check, validation, setupInference, and dashboard label.
  • bin/lib/inference-config.js: Remove bedrock case from getProviderSelectionConfig().
  • test/inference-config.test.js: Remove Bedrock-specific assertions; add does not grow beyond the approved provider set guard test that fails if any new provider key (bedrock, vertex, azure, etc.) is introduced.

Related

Type of Change

  • Code change for a new feature, bug fix, or refactor.

Checklist

  • Formatters applied
  • Tests added (guard test)
  • No secrets committed
  • npm test passes (725 passed)

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed Amazon Bedrock from the list of available inference providers
    • All Bedrock-related configuration, endpoint setup, and onboarding support have been completely eliminated from the system
    • Provider selection now enforces an approved provider allowlist to improve system reliability and compatibility
    • Validation updated to ensure only approved providers can be configured and used

Bedrock's OpenAI-compatible endpoint works through the existing
"compatible-endpoint" option — the same path every other CSP wrapper
(Vertex, Azure OpenAI, etc.) should use. Adding a dedicated provider
key for each CSP does not scale and creates maintenance overhead for
config, tests, UX, and docs that is better avoided.

Also adds a guard test that enumerates the approved provider set and
fails if a new provider key is introduced, steering contributors toward
the compatible-endpoint / compatible-anthropic-endpoint options instead.

Reverts: #963
Closes: #1204
@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 29378cdd-59cd-4bc7-b522-5b8be8829e95

📥 Commits

Reviewing files that changed from the base of the PR and between 75b8bb9 and 8a1a058.

📒 Files selected for processing (3)
  • bin/lib/inference-config.js
  • bin/lib/onboard.js
  • test/inference-config.test.js

📝 Walkthrough

Walkthrough

This pull request removes Amazon Bedrock inference provider support from the codebase. Bedrock configuration handling is removed from the provider selection function, onboarding flows, and model options. Tests specific to Bedrock are deleted, with new validation added to enforce an approved providers list.

Changes

Cohort / File(s) Summary
Provider Configuration Removal
bin/lib/inference-config.js
Deleted case "bedrock" branch from getProviderSelectionConfig(), causing Bedrock provider to return null instead of endpoint configuration.
Onboarding Integration Removal
bin/lib/onboard.js
Removed Bedrock endpoint URL construction, model options from REMOTE_MODEL_OPTIONS, bedrock from REMOTE_PROVIDER_CONFIG and provider allowlists, Bedrock-specific region/validation logic, and provider routing for inference setup.
Test Updates
test/inference-config.test.js
Removed Bedrock-specific test assertions for config and default model; added new validation test enforcing an approved providers list with rejection of non-approved providers like bedrock, vertex, and azure*.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • kjw3

Poem

🐰 The Bedrock has left our humble ground,
No Amazon traces to be found,
We've cleaned the config, tests, and more,
The provider registry stands at its door,
Hopping forward, sleek and light! 🏃‍♂️✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR objectives contradict the linked issue #1204, which requests adding Bedrock tests. Instead, this PR removes Bedrock support entirely, which is opposite to the linked issue's goal. Clarify the relationship: this PR reverts #963 and closes #1204 as obsolete. Update documentation or linked issues to reflect this is a reversal of prior decisions.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing Amazon Bedrock as a first-class provider, which aligns with the primary objective across all modified files.
Out of Scope Changes check ✅ Passed All changes consistently support the stated objective of removing Bedrock as a first-class provider. No unrelated or out-of-scope changes detected in the modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert/bedrock-provider

Comment @coderabbitai help to get the list of available commands and usage tips.

@cv cv mentioned this pull request Mar 31, 2026
13 tasks
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Docs preview ready!

https://NVIDIA.github.io/NemoClaw/pr-preview/pr-1212/

@cv
cv enabled auto-merge (squash) March 31, 2026 22:47
@cv
cv merged commit 182ad1c into main Mar 31, 2026
3 of 4 checks passed
@cv
cv deleted the revert/bedrock-provider branch March 31, 2026 22:48
laitingsheng pushed a commit that referenced this pull request Apr 2, 2026
## Summary

Reverts #963 and adds a guard test that prevents new CSP-specific
provider keys from being added to the installer.

## Rationale

Bedrock's OpenAI-compatible endpoint already works through the existing
`compatible-endpoint` option — the same path every other CSP wrapper
(Vertex, Azure OpenAI, etc.) should use. Adding a dedicated provider key
for each CSP does not scale: each one requires config in `onboard.js`, a
case in `inference-config.js`, UX menu entries, model curation,
validation logic, tests, and docs. The `compatible-endpoint` and
`compatible-anthropic-endpoint` options already cover these use cases
generically.

## Changes

- **`bin/lib/onboard.js`**: Remove `BEDROCK_ENDPOINT_URL`, `bedrock`
from `REMOTE_PROVIDER_CONFIG`, `REMOTE_MODEL_OPTIONS`, `validProviders`,
interactive menu, region check, validation, `setupInference`, and
dashboard label.
- **`bin/lib/inference-config.js`**: Remove `bedrock` case from
`getProviderSelectionConfig()`.
- **`test/inference-config.test.js`**: Remove Bedrock-specific
assertions; add `does not grow beyond the approved provider set` guard
test that fails if any new provider key (bedrock, vertex, azure, etc.)
is introduced.

## Related

- Reverts #963
- Closes #1204

## Type of Change

- [x] Code change for a new feature, bug fix, or refactor.

## Checklist

- [x] Formatters applied
- [x] Tests added (guard test)
- [x] No secrets committed
- [x] `npm test` passes (725 passed)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Breaking Changes**
  * Removed support for Amazon Bedrock as an inference provider.

* **Documentation**
* Updated command documentation to recommend `nemoclaw onboard` for new
installations.
  * Marked legacy `nemoclaw setup` command as deprecated.
* Updated deployment guides to reference the `nemoclaw onboard` setup
wizard.

* **Tests**
  * Updated test suite to validate approved inference providers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Deepak Jain <deepujain@users.noreply.github.com>
@VKudlay

VKudlay commented Apr 2, 2026

Copy link
Copy Markdown

Hey @cv. I feel like the core contribution of the original push was to allow converse api (though I could be wrong). I believe Anthropic over Bedrock is only supported via Converse and InvokeModel API.

(I'm also having a miserable time validating this since AWS docs are super-opaque on this. Please correct me if I'm wrong, but I think that's why bedrock is generally treated separately and may be needed.)

EXECUTING
curl -s -X GET https://bedrock-mantle.us-east-1.api.aws/v1/models \
    -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
    | jq -r '.data[].id'
qwen.qwen3-next-80b-a3b-instruct
deepseek.v3.2
zai.glm-4.6
minimax.minimax-m2.5
minimax.minimax-m2.1
qwen.qwen3-coder-30b-a3b-instruct
writer.palmyra-vision-7b
openai.gpt-oss-20b
mistral.ministral-3-8b-instruct
qwen.qwen3-vl-235b-a22b-instruct
qwen.qwen3-coder-480b-a35b-instruct
zai.glm-5
mistral.devstral-2-123b
mistral.magistral-small-2509
mistral.voxtral-mini-3b-2507
openai.gpt-oss-120b
nvidia.nemotron-nano-12b-v2
nvidia.nemotron-nano-3-30b
zai.glm-4.7-flash
google.gemma-3-27b-it
openai.gpt-oss-safeguard-120b
minimax.minimax-m2
zai.glm-4.7
mistral.voxtral-small-24b-2507
moonshotai.kimi-k2-thinking
google.gemma-3-12b-it
nvidia.nemotron-super-3-120b
moonshotai.kimi-k2.5
qwen.qwen3-235b-a22b-2507
mistral.ministral-3-3b-instruct
qwen.qwen3-32b
nvidia.nemotron-nano-9b-v2
google.gemma-3-4b-it
qwen.qwen3-coder-next
mistral.ministral-3-14b-instruct
mistral.mistral-large-3-675b-instruct
openai.gpt-oss-safeguard-20b
deepseek.v3.1

@VKudlay

VKudlay commented Apr 2, 2026

Copy link
Copy Markdown

Spent a bit more time on this, since some may not have access. Can at least confirm bedrock Anthropic with chat-completions is non-trivial:

Getting List of Available Models
curl -s -X GET "https://bedrock.us-east-1.amazonaws.com/foundation-models" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -H "Content-Type: application/json" | jq -r '.modelSummaries[].modelId' | grep -E "anthropic|nvidia|openai"
nvidia.nemotron-nano-12b-v2
anthropic.claude-sonnet-4-20250514-v1:0
anthropic.claude-haiku-4-5-20251001-v1:0
openai.gpt-oss-120b-1:0
nvidia.nemotron-nano-3-30b
anthropic.claude-sonnet-4-6
nvidia.nemotron-super-3-120b
anthropic.claude-opus-4-6-v1
nvidia.nemotron-nano-9b-v2
openai.gpt-oss-20b-1:0
openai.gpt-oss-safeguard-120b
anthropic.claude-sonnet-4-5-20250929-v1:0
anthropic.claude-opus-4-1-20250805-v1:0
anthropic.claude-opus-4-5-20251101-v1:0
openai.gpt-oss-safeguard-20b
anthropic.claude-3-sonnet-20240229-v1:0:28k
anthropic.claude-3-sonnet-20240229-v1:0:200k
anthropic.claude-3-sonnet-20240229-v1:0
anthropic.claude-3-haiku-20240307-v1:0:48k
anthropic.claude-3-haiku-20240307-v1:0:200k
anthropic.claude-3-haiku-20240307-v1:0
anthropic.claude-3-7-sonnet-20250219-v1:0
anthropic.claude-3-5-haiku-20241022-v1:0
anthropic.claude-opus-4-20250514-v1:0
Querying Nemotron Super (OK)
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{
    "model": "nvidia.nemotron-super-3-120b",
    "messages": [{"role": "user", "content": "Hello world" }],
    "max_tokens": 10
  }'
{
    "choices":[{"finish_reason":"length","index":0,"logprobs":null,"message":{
        "content":"Hello! 👋 How can I help you", "refusal":null, "role":"assistant"
    }}],
    "created":1775169709,"id":"chatcmpl-bdd230ad-7290-4650-a837-9e6a710e13e0",
    "model":"nvidia.nemotron-super-3-120b","object":"chat.completion","service_tier":"default",
    "usage":{"completion_tokens":10,"prompt_tokens":18,"total_tokens":28}
}
Querying GPT-OSS (OK)
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{
    "model": "openai.gpt-oss-20b-1:0",
    "messages": [{"role": "user", "content": "Hello world" }],
    "max_tokens": 10
  }'
{
    "choices":[{"finish_reason":"length","index":0,"logprobs":null,"message":{
        "content":"The user says \"Hello world\".","refusal":null,"role":"assistant"
    }}],
    "created":1775169815,"id":"chatcmpl-d69bd361-f8a0-4420-8ac5-63b8732b21f3",
    "model":"openai.gpt-oss-20b-1:0","object":"chat.completion","service_tier":"default",
    "usage":{"completion_tokens":10,"prompt_tokens":67,"total_tokens":77}
}
Querying Claude Opus via Chat/Completions (NOT OK)
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{"model": "anthropic.claude-opus-4-6-v1", "messages": [{"role": "user", "content": "Hello world" }], "max_tokens": 10}'
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1/chat/completions" \ns" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{"model": "global.anthropic.claude-opus-4-6-v1", 
  "messages": [{"role": "user", "content": "Hello world" }], "max_tokens": 10}'
{"error":{
    "message":"The model doesn't exist or doesn't support this API. Retry your request with a different model ID.",
    "type":"not_found_error","param":null,"code":"model_not_found"
}}
Querying General Claude Opus via Converse (NOT OK)
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-opus-4-6-v1/converse" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{"messages": [{"role": "user", "content": [{"text": "Hello"}]}]}'
{
  "message":"Invocation of model ID anthropic.claude-opus-4-6-v1 with on-demand throughput isn’t supported.
   Retry your request with the ID or ARN of an inference profile that contains this model."
}
Querying Regional Claude Opus via Converse (OK)
curl -X POST "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-opus-4-6-v1/converse" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK" \
  -d '{"messages": [{"role": "user", "content": [{"text": "Hello"}]}]}'
{"metrics":{"latencyMs":1824},"output":{"message":{"content":[{
    "text":"Hello! How are you doing today? Is there anything I can help you with?"
  }],"role":"assistant"}},"stopReason":"end_turn","usage":{
    "cacheReadInputTokenCount":0,"cacheReadInputTokens":0,
    "cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,
    "inputTokens":8,"outputTokens":20,"serverToolUsage":{},"totalTokens":28
  }
}

lakamsani pushed a commit to lakamsani/NemoClaw that referenced this pull request Apr 4, 2026
## Summary

Reverts NVIDIA#963 and adds a guard test that prevents new CSP-specific
provider keys from being added to the installer.

## Rationale

Bedrock's OpenAI-compatible endpoint already works through the existing
`compatible-endpoint` option — the same path every other CSP wrapper
(Vertex, Azure OpenAI, etc.) should use. Adding a dedicated provider key
for each CSP does not scale: each one requires config in `onboard.js`, a
case in `inference-config.js`, UX menu entries, model curation,
validation logic, tests, and docs. The `compatible-endpoint` and
`compatible-anthropic-endpoint` options already cover these use cases
generically.

## Changes

- **`bin/lib/onboard.js`**: Remove `BEDROCK_ENDPOINT_URL`, `bedrock`
from `REMOTE_PROVIDER_CONFIG`, `REMOTE_MODEL_OPTIONS`, `validProviders`,
interactive menu, region check, validation, `setupInference`, and
dashboard label.
- **`bin/lib/inference-config.js`**: Remove `bedrock` case from
`getProviderSelectionConfig()`.
- **`test/inference-config.test.js`**: Remove Bedrock-specific
assertions; add `does not grow beyond the approved provider set` guard
test that fails if any new provider key (bedrock, vertex, azure, etc.)
is introduced.

## Related

- Reverts NVIDIA#963
- Closes NVIDIA#1204

## Type of Change

- [x] Code change for a new feature, bug fix, or refactor.

## Checklist

- [x] Formatters applied
- [x] Tests added (guard test)
- [x] No secrets committed
- [x] `npm test` passes (725 passed)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Breaking Changes**
  * Removed support for Amazon Bedrock as an inference provider.

* **Documentation**
* Updated command documentation to recommend `nemoclaw onboard` for new
installations.
  * Marked legacy `nemoclaw setup` command as deprecated.
* Updated deployment guides to reference the `nemoclaw onboard` setup
wizard.

* **Tests**
  * Updated test suite to validate approved inference providers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Deepak Jain <deepujain@users.noreply.github.com>
gemini2026 pushed a commit to gemini2026/NemoClaw that referenced this pull request Apr 14, 2026
## Summary

Reverts NVIDIA#963 and adds a guard test that prevents new CSP-specific
provider keys from being added to the installer.

## Rationale

Bedrock's OpenAI-compatible endpoint already works through the existing
`compatible-endpoint` option — the same path every other CSP wrapper
(Vertex, Azure OpenAI, etc.) should use. Adding a dedicated provider key
for each CSP does not scale: each one requires config in `onboard.js`, a
case in `inference-config.js`, UX menu entries, model curation,
validation logic, tests, and docs. The `compatible-endpoint` and
`compatible-anthropic-endpoint` options already cover these use cases
generically.

## Changes

- **`bin/lib/onboard.js`**: Remove `BEDROCK_ENDPOINT_URL`, `bedrock`
from `REMOTE_PROVIDER_CONFIG`, `REMOTE_MODEL_OPTIONS`, `validProviders`,
interactive menu, region check, validation, `setupInference`, and
dashboard label.
- **`bin/lib/inference-config.js`**: Remove `bedrock` case from
`getProviderSelectionConfig()`.
- **`test/inference-config.test.js`**: Remove Bedrock-specific
assertions; add `does not grow beyond the approved provider set` guard
test that fails if any new provider key (bedrock, vertex, azure, etc.)
is introduced.

## Related

- Reverts NVIDIA#963
- Closes NVIDIA#1204

## Type of Change

- [x] Code change for a new feature, bug fix, or refactor.

## Checklist

- [x] Formatters applied
- [x] Tests added (guard test)
- [x] No secrets committed
- [x] `npm test` passes (725 passed)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Breaking Changes**
  * Removed support for Amazon Bedrock as an inference provider.

* **Documentation**
* Updated command documentation to recommend `nemoclaw onboard` for new
installations.
  * Marked legacy `nemoclaw setup` command as deprecated.
* Updated deployment guides to reference the `nemoclaw onboard` setup
wizard.

* **Tests**
  * Updated test suite to validate approved inference providers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Deepak Jain <deepujain@users.noreply.github.com>
@wscurran wscurran added the refactor PR restructures code without intended behavior change label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants