Skip to content

Commit c082a13

Browse files
committed
fix: exempt config-added models from bedrock allowlist filter
The allowlist check was incorrectly deleting models that users explicitly added via config (provider["amazon-bedrock"].models). Add a guard so the filter only applies to snapshot-sourced models, not ones the user has explicitly defined in their opencode.json.
1 parent a310f2f commit c082a13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/opencode/src/provider/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ const layer: Layer.Layer<
13931393
delete provider.models[modelID]
13941394
if (model.status === "alpha" && !Flag.OPENCODE_ENABLE_EXPERIMENTAL_MODELS) delete provider.models[modelID]
13951395
if (model.status === "deprecated") delete provider.models[modelID]
1396-
if (providerID === ProviderID.amazonBedrock && !BEDROCK_ALLOWED_MODELS.has(modelID))
1396+
if (providerID === ProviderID.amazonBedrock && !BEDROCK_ALLOWED_MODELS.has(modelID) && !configProvider?.models?.[modelID])
13971397
delete provider.models[modelID]
13981398
if (
13991399
(configProvider?.blacklist && configProvider.blacklist.includes(modelID)) ||

0 commit comments

Comments
 (0)