Skip to content

Missing AWS Bedrock Models #2957

Closed
Closed

Description

@FarrukhCyber

I'm using AWS_BEARER_TOKEN_BEDROCK to authenticate bedrock and use opencode with it. However doing /models list only a few models and doesn't show models like qwen3 coder and deepseek-v3.1. Please let me know how to access additional models.

Thanks!

PS. I have access to the above mentioned models in bedrock and my region is us-west-2

Activity

  1. github-actions commented on Oct 3, 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.

  2. FarrukhCyber commented on Oct 3, 2025

    @FarrukhCyber
    Author

    These are not relevant in my case because I'm not getting any errors even if I run the following commands:
    opencode --model amazon-bedrock/qwen.qwen3-coder-480b-a35b-v1:0 --print-logs

    It still shows the previously loaded model (deepseek R1). I have also tried doing rm ~/.cache/opencode/models.json

  3. rekram1-node commented on Oct 3, 2025

    @rekram1-node
    Member

    @FarrukhCyber I think we need to update models.dev (separate repo) to include these other models i can show you a work around until it is updated tho

  4. FarrukhCyber commented on Oct 3, 2025

    @FarrukhCyber
    Author

    yes please. how can I add other models?

  5. self-assigned this
    on Oct 3, 2025
  6. rekram1-node commented on Oct 3, 2025

    @rekram1-node
    Member

    @FarrukhCyber

    So someone will need to add them here eventually (PRs welcome, otherwise I will try to get to it): https://github.com/sst/models.dev

    But in meantime in your global (or local but u prolly want global) opencode.json, add the following (for example):

    {
    "provider": {
        "amazon-bedrock": {
          "models": {
            "qwen.qwen3-coder-480b-a35b-v1:0": {
              "name": "Qwen3 Coder 480b A35B instruct",
              "limit": {
                "context": 262144,
                "output": 66536,
              },
            },
          },
        },
      },
    }
    

    Most of the models already have stats in models.dev just not for the amazon bedrock provider quite yet see: https://models.dev/?search=Qwen3-Coder-480B-A35B-Instruct

    You can repeat that^^ for other models as needed but like I said we need to update model list so you dont have to define them yourself

  7. FarrukhCyber commented on Oct 4, 2025

    @FarrukhCyber
    Author

    Using the provided config results in the following error:
    AI_APICallError: undefined: The provided model identifier is invalid.

    I will just resort to another model for now. Thank you!

  8. rekram1-node commented on Oct 4, 2025

    @rekram1-node
    Member

    @FarrukhCyber I made a typo! drop the amazon bedrock / prefix in the model id

  9. rekram1-node commented on Oct 4, 2025

    @rekram1-node
    Member

    updated my example^^

  10. FarrukhCyber commented on Oct 4, 2025

    @FarrukhCyber
    Author

    Thank you so much @rekram1-node!
    It works now :)

  11. AmanGupta0112 commented on Feb 26, 2026

    @AmanGupta0112

    Even after pasting this in the opencode.json
    """
    {
    "provider": {
    "amazon-bedrock": {
    "models": {
    "qwen.qwen3-coder-480b-a35b-v1:0": {
    "name": "Qwen3 Coder 480b A35B instruct",
    "limit": {
    "context": 262144,
    "output": 66536,
    },
    },
    },
    },
    },
    }

    """

    It still showing me the same error "undefined: The provided model identifier is invalid."

    How did you fix this?

  12. FarrukhCyber commented on Feb 26, 2026

    @FarrukhCyber
    Author

    Even after pasting this in the opencode.json """ { "provider": { "amazon-bedrock": { "models": { "qwen.qwen3-coder-480b-a35b-v1:0": { "name": "Qwen3 Coder 480b A35B instruct", "limit": { "context": 262144, "output": 66536, }, }, }, }, }, }

    """

    It still showing me the same error "undefined: The provided model identifier is invalid."

    How did you fix this?

    AmanGupta0112
    They have added this model from bedrock in their defined models list so even if you removed it from models.json file, it should be visible in /models. At least that's the case for me.

  13. AmanGupta0112 commented on Feb 26, 2026

    @AmanGupta0112

    yes i can see it in the /models but even if i select it the same error still shows.

    Image
  14. FarrukhCyber commented on Feb 26, 2026

    @FarrukhCyber
    Author

    yes i can see it in the /models but even if i select it the same error still shows.

    Image

    Try doing this to refresh the model file:
    rm ~/.cache/opencode/models.json

    just to be sure have you removed the model entry from opencode.json?

  15. AmanGupta0112 commented on Feb 26, 2026

    @AmanGupta0112

    Yes i've removed the model entry from opencode.json and also removed the cache models it still give the same error

    yes i can see it in the /models but even if i select it the same error still shows.
    Image

    Try doing this to refresh the model file: rm ~/.cache/opencode/models.json

    just to be sure have you removed the model entry from opencode.json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions