You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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.
Activity
github-actions commentedon Oct 3, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
FarrukhCyber commentedon Oct 3, 2025
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-logsIt still shows the previously loaded model (deepseek R1). I have also tried doing
rm ~/.cache/opencode/models.jsonrekram1-node commentedon Oct 3, 2025
@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
FarrukhCyber commentedon Oct 3, 2025
yes please. how can I add other models?
rekram1-node commentedon Oct 3, 2025
@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):
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
FarrukhCyber commentedon Oct 4, 2025
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!
rekram1-node commentedon Oct 4, 2025
@FarrukhCyber I made a typo! drop the amazon bedrock / prefix in the model id
rekram1-node commentedon Oct 4, 2025
updated my example^^
FarrukhCyber commentedon Oct 4, 2025
Thank you so much @rekram1-node!
It works now :)
AmanGupta0112 commentedon Feb 26, 2026
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?
FarrukhCyber commentedon Feb 26, 2026
AmanGupta0112
They have added this model from bedrock in their defined models list so even if you removed it from
models.jsonfile, it should be visible in/models. At least that's the case for me.AmanGupta0112 commentedon Feb 26, 2026
yes i can see it in the /models but even if i select it the same error still shows.
FarrukhCyber commentedon Feb 26, 2026
Try doing this to refresh the model file:
rm ~/.cache/opencode/models.jsonjust to be sure have you removed the model entry from
opencode.json?AmanGupta0112 commentedon Feb 26, 2026
Yes i've removed the model entry from opencode.json and also removed the cache models it still give the same error