Skip to content

disabled_providers config for Bedrock ignored when AWS credentials available via environment variables #4407

Closed

Description

@jvdmeulen92

Description

When using aws-vault (or any other tool that sets AWS credentials via environment variables like AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN, etc.), the Bedrock provider is loaded and its models appear in /models, even though bedrock is explicitly listed in the disabled_providers configuration.

Expected Behavior

According to the official documentation:

The disabled_providers option accepts an array of provider IDs. When a provider is disabled:

  • It won't be loaded even if environment variables are set.
  • It won't be loaded even if API keys are configured through opencode auth login.
  • The provider's models won't appear in the model selection list.

Bedrock models should NOT appear in the model selection when bedrock is in disabled_providers, regardless of AWS credentials being available.

Actual Behavior

When AWS credentials are present in the environment (e.g., when logged in with aws-vault exec my-profile -- opencode), Bedrock models appear in /models despite the configuration.

OpenCode version

1.0.68

Steps to reproduce

  1. Add bedrock to disabled_providers in ~/.config/opencode/opencode.json:
{
  "$schema": "https://opencode.ai/config.json",
  "disabled_providers": ["bedrock"]
}
  1. Login with aws-vault (or set AWS credentials via environment variables):
aws-vault exec my-profile -- opencode
  1. Run /models command

  2. Observe that Bedrock models are shown in the list

Expected Result: No Bedrock models should appear

Actual Result: Bedrock models appear in the model selection

Screenshot and/or share link

No response

Operating System

macOS

Terminal

iTerm2

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 17, 2025
  2. github-actions commented on Nov 17, 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. OpeOginni commented on Nov 17, 2025

    @OpeOginni
    Contributor

    Hey @jvdmeulen92 I think the actual provider id is amazon-bedrock not just bedrock. Could you try that? Ill see if I can replicate the issue in the meantime.

  4. jvdmeulen92 commented on Nov 17, 2025

    @jvdmeulen92
    Author

    Thanks for responding! Well, using bedrock without AWS env vars set, the Bedrock models stay nicely hidden.

  5. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 17, 2025
  6. self-assigned this
    on Nov 17, 2025
  7. rekram1-node commented on Nov 17, 2025

    @rekram1-node
    Contributor

    @jvdmeulen92 is this resolved then?

    Btw you can run opencode models to see the "provider ids" in this case amazon-bedrock

  8. jvdmeulen92 commented on Nov 17, 2025

    @jvdmeulen92
    Author

    Works like a charm, thank you both!

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions