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
|
|
@ -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