Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I have been transitioning my workflows to opencode over Bedrock. In the process I have identified several pieces that could be better and altogether would bring greater quality of life to users like our team.
The main motivation is that in many environments, platforms like Bedrock are the only way to access AI models, enforce zero data retention, and measure costs effectively for one's entire team. In this kind of environments, static credentials are generally frowned upon as an auth method, SSO is the default, and usually, we apply fine grained access controls to pretty much everything.
I understand that Bedrock can be moving fast, and it's not the easiest of targets to pursue, I also understand that the contributing team must be under an immense wave of human or AI generated PRs. That's why I can definitely volunteer the work, but I would also require some PR reviews. Let me know if there is interest around this.
Some examples:
- Bedrock API key should probably not be the only option when hitting
/connect. Sigv4 with some sort of reconnect, should be the defacto model, with IAM User key pair and Bedrock API key coming in second - Bedrock models, their cost, and available variants should ideally be fetched from the API instead of being hardcoded in the app. Kimi K3 arrived yesterday and although I could make it work, I really shouldn't have to hand patch it via opencode.jsonc. Moreover, as I say above, fine-grained access controls usually apply so it may not be prudent to display all bedrock models, and we should instead display the ones actually available to the user.
- ZDR should be an obvious flag next to models, the API can provide that. Possibly tied to the above bullet as even in a roundabout way you can centrally block non-ZDR models at the account level.
Bonus
- This might be a long shot but some central configuration management would be grand.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up, @ktoulgaridis, and for offering to help build it. You're asking for better Bedrock support in organisations where Bedrock is the only allowed way to reach models: SigV4/SSO as the main sign-in with smooth re-authentication, a model list (with prices and variants) fetched from the account's own Bedrock API and limited to what IAM allows, a ZDR flag on models, and possibly central configuration.
Some of this may already be there, depending on your version. In OpenCode v2 (
@opencode/cli,opencode --versionshows 2.x), the Bedrock option in/connectincludes "AWS profile (SSO or named profile)", which lists the profiles in your~/.aws/configand~/.aws/credentials. Requests are then signed with SigV4 through the standard AWS credential chain. Bedrock also turns on by itself whenAWS_PROFILE,AWS_ACCESS_KEY_ID, web identity or container credentials are set in the environment. If you're on 1.x (opencode-ai), note that v1 only gets critical fixes, so this work would go into v2.The Bedrock model list currently comes from the models.dev catalog, not from your account, and there is no ZDR flag for Bedrock models yet. So the model-discovery and ZDR parts are new work.
The maintainers will consider this. I can't promise anything about scope or timing. If you plan to open PRs, it may help to wait for a maintainer to agree on the approach here first, and to split the work into smaller, separate changes (for example, auth/re-auth, then model discovery, then ZDR).