mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: global prefix handling w/ aws bedrock (#4757)
This commit is contained in:
parent
0ff4c284e2
commit
b44971668c
2 changed files with 6 additions and 1 deletions
2
.github/workflows/snapshot.yml
vendored
2
.github/workflows/snapshot.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- dev
|
||||
- fix-snapshot-2
|
||||
- test-bedrock
|
||||
- v0
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue