The open source coding agent.
TypeScript
fix: global prefix handling w/ aws bedrock (#4757)
Aiden Clineb44971668cf0
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.ymlindex 815433f03d9..f8bbb78c626 100644--- a/.github/workflows/snapshot.yml+++ b/.github/workflows/snapshot.yml@@ -4,7 +4,7 @@ on:push:branches:- dev- - fix-snapshot-2+ - test-bedrock- v0concurrency: ${{ github.workflow }}-${{ github.ref }}diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.tsindex 1cf0312ea6f..a4c406c0f24 100644--- a/packages/opencode/src/provider/provider.ts+++ b/packages/opencode/src/provider/provider.ts@@ -130,6 +130,11 @@ export namespace Provider {credentialProvider: fromNodeProviderChain(),},async getModel(sdk: any, modelID: string, _options?: Record<string, any>) {+ // Skip region prefixing if model already has global prefix+ if (modelID.startsWith("global.")) {+ return sdk.languageModel(modelID)+ }+let regionPrefix = region.split("-")[0]switch (regionPrefix) {