restrict amazon-bedrock provider to curated model allowlist#14
Closed
lgarceau768 wants to merge 410 commits into
Closed
restrict amazon-bedrock provider to curated model allowlist#14lgarceau768 wants to merge 410 commits into
lgarceau768 wants to merge 410 commits into
Conversation
On Windows, native terminals don't support POSIX suspend (ctrl+z), so we now assign ctrl+z to input undo instead of terminal suspend. Terminal suspend is disabled on Windows to avoid conflicts with the undo functionality.
…n headers (anomalyco#22927) Co-authored-by: Kit Langton <kit.langton@gmail.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Adds a hardcoded BEDROCK_ALLOWED_MODELS Set in the provider initialization loop that filters the amazon-bedrock provider down to 30 approved models across Claude, Gemma, GPT Safeguard, Nova 2 Lite, Qwen, Nemotron, Mistral, DeepSeek, Minimax, Kimi, GLM, Palmyra, and Llama families. The allowlist runs before the existing config blacklist/whitelist check, so users can still override via config (e.g. to add a custom Bedrock fine-tune).
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Adds a hardcoded
BEDROCK_ALLOWED_MODELSset inpackages/opencode/src/provider/provider.tsthat restricts theamazon-bedrockprovider to a curated list of 30 approved models. The filter runs inside the existing provider initialization loop, immediately after thedeprecatedstatus check and before the configblacklist/whitelistcheck.Approved models by family:
Because the built-in allowlist runs before the config-level
whitelist/blacklist, users can still add custom models (e.g. a Bedrock fine-tune) via their opencode config without being blocked.How did you verify your code works?
bun typecheckinpackages/opencode— passes clean.models-snapshot.jsto confirm each entry exists and maps to the expected model.Screenshots / recordings
N/A — no UI change.
Checklist