Skip to content

Opus 4.5 in AWS Bedrock "undefined: The provided model identifier is invalid." #4784

Closed

Description

@acastro2

Description

When selecting Opus 4.5 in bedrock I consistently get undefined: The provided model identifier is invalid., I also tried to pass with --model, same behavior.

OpenCode version

0.15.31

Steps to reproduce

  1. open opencode
  2. select /model Amazon Bedrock Opus 4.5
  3. Type anything

Screenshot and/or share link

Image

Operating System

Macos Tahoe 26.1

Terminal

Iterm2

Activity

  1. added
    bug
    on Nov 26, 2025
  2. github-actions commented on Nov 26, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Member

    @acastro2 upgrade to latest! I think it is fixed

    opencode upgrade 1.0.114

  4. jluisrojas commented on Nov 26, 2025

    @jluisrojas

    I am still getting the error on 1.0.114 @rekram1-node

  5. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Member

    @jluisrojas use the global variant

  6. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Member

    Claude Opus 4.5 (Global)

  7. jluisrojas commented on Nov 26, 2025

    @jluisrojas

    Can confirm that "Claude Opus 4.5 (Global)" is working for me. Thanks @rekram1-node

  8. self-assigned this
    on Nov 26, 2025
  9. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Member

    removed the non global one: anomalyco/models.dev#440

    it'll sync to ur cache at some point today

  10. acastro2 commented on Nov 26, 2025

    @acastro2
    Author

    You absolutely rock

  11. ArturLinnik commented on May 6, 2026

    @ArturLinnik

    I ran into this when selecting the European Claude Opus 4.6 model from OpenCode’s /models list with Amazon Bedrock.
    The model shown/needed in Bedrock was:

    eu.anthropic.claude-opus-4-6-v1

    but selecting it directly from the OpenCode model picker failed with:

    undefined: The provided model identifier is invalid.

    The workaround that fixed it was to define the model explicitly in the OpenCode config (~/.config/opencode/opencode.jsonc) using a custom alias, and map that alias to the exact Bedrock model identifier:

    {
      "$schema": "https://opencode.ai/config.json",
      "model": "amazon-bedrock/claude-opus-4-6-eu",
      "provider": {
        "amazon-bedrock": {
          "options": {
            "region": "eu-west-1"
          },
          "models": {
            "claude-opus-4-6-eu": {
              "id": "eu.anthropic.claude-opus-4-6-v1",
              "name": "Claude Opus 4.6 EU"
            }
          }
        }
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions