Skip to content

Commit b449716

Browse files
rekram1-nodeopencode
authored andcommitted
fix: global prefix handling w/ aws bedrock (anomalyco#4757)
1 parent 0ff4c28 commit b449716

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- dev
7-
- fix-snapshot-2
7+
- test-bedrock
88
- v0
99

1010
concurrency: ${{ github.workflow }}-${{ github.ref }}

packages/opencode/src/provider/provider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ export namespace Provider {
130130
credentialProvider: fromNodeProviderChain(),
131131
},
132132
async getModel(sdk: any, modelID: string, _options?: Record<string, any>) {
133+
// Skip region prefixing if model already has global prefix
134+
if (modelID.startsWith("global.")) {
135+
return sdk.languageModel(modelID)
136+
}
137+
133138
let regionPrefix = region.split("-")[0]
134139

135140
switch (regionPrefix) {

0 commit comments

Comments
 (0)