openclaw - 💡(How to fix) Fix Custom Bedrock provider (amazon-bedrock-us) fails with 'invalid model identifier' [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59583Fetched 2026-04-08 02:42:57
View on GitHub
Comments
2
Participants
3
Timeline
2
Reactions
0
Timeline (top)
commented ×2

When defining a custom Bedrock provider with a different baseUrl (pointing to us-east-1 instead of the default eu-west-1), the model cannot be selected — the system responds with "The provided model identifier is invalid."

Root Cause

When defining a custom Bedrock provider with a different baseUrl (pointing to us-east-1 instead of the default eu-west-1), the model cannot be selected — the system responds with "The provided model identifier is invalid."

Fix Action

Workaround

None currently available in 2026.3.24.

Code Example

"models": {
  "providers": {
    "amazon-bedrock-us": {
      "baseUrl": "https://bedrock-runtime.us-east-1.amazonaws.com",
      "auth": "aws-sdk",
      "api": "bedrock-converse-stream",
      "models": [
        {
          "id": "us.anthropic.claude-sonnet-4-6",
          "name": "Claude Sonnet 4.6 (US, 1M)",
          "contextWindow": 1000000,
          "maxTokens": 16000
        }
      ]
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug Report

Version

OC 2026.3.24

Description

When defining a custom Bedrock provider with a different baseUrl (pointing to us-east-1 instead of the default eu-west-1), the model cannot be selected — the system responds with "The provided model identifier is invalid."

Config

"models": {
  "providers": {
    "amazon-bedrock-us": {
      "baseUrl": "https://bedrock-runtime.us-east-1.amazonaws.com",
      "auth": "aws-sdk",
      "api": "bedrock-converse-stream",
      "models": [
        {
          "id": "us.anthropic.claude-sonnet-4-6",
          "name": "Claude Sonnet 4.6 (US, 1M)",
          "contextWindow": 1000000,
          "maxTokens": 16000
        }
      ]
    }
  }
}

Steps to Reproduce

  1. Add a second Bedrock provider (e.g. amazon-bedrock-us) with baseUrl pointing to us-east-1
  2. Try to use the model via /model amazon-bedrock-us/us.anthropic.claude-sonnet-4-6
  3. Get: "The provided model identifier is invalid."

Expected Behavior

Multiple Bedrock providers should be supported to allow routing to different AWS regions (e.g. EU for standard models, US for 1M context models like us.anthropic.claude-sonnet-4-6).

Actual Behavior

Only the built-in amazon-bedrock provider name is recognized. Custom provider names using the Bedrock backend are silently rejected.

Use Case

Claude Sonnet 4.6 with 1M context window is currently only available in AWS us-east-1 (not eu-west-1). To use it alongside EU models, a second provider pointing to US is needed.

Workaround

None currently available in 2026.3.24.

extent analysis

TL;DR

The issue can be resolved by modifying the code to recognize custom Bedrock provider names and handle region-specific model identifiers.

Guidance

  • Verify that the custom provider name is correctly registered in the system and that the baseUrl is properly set to point to the us-east-1 region.
  • Check the model identifier format to ensure it matches the expected format for the custom provider, as the error message suggests an invalid identifier.
  • Investigate the possibility of adding a region-aware routing mechanism to support multiple Bedrock providers with different base URLs.
  • Review the authentication and API settings for the custom provider to ensure they are compatible with the us-east-1 region.

Example

No code snippet is provided as the issue does not contain sufficient information about the underlying codebase.

Notes

The issue seems to be related to the system's inability to recognize custom Bedrock provider names, which might be due to a limitation in the current implementation. The workaround mentioned in the issue report is not available in the current version (2026.3.24).

Recommendation

Apply a workaround by modifying the code to support custom provider names and region-specific model identifiers, as upgrading to a fixed version is not currently an option.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING