Skip to content

Commit 89cd034

Browse files
committed
refactor(dashboard-agent): treat empty Bedrock region as unset, matching the webapp gate
1 parent 642d8a3 commit 89cd034

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

internal-packages/dashboard-agent/src/model-provider.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ export function dashboardAgentProvider(): DashboardAgentProvider {
2121
return process.env.DASHBOARD_AGENT_MODEL_PROVIDER === "bedrock" ? "bedrock" : "anthropic";
2222
}
2323

24-
// Region threaded explicitly so both AWS_REGION and AWS_DEFAULT_REGION work; the SDK
25-
// itself only reads AWS_REGION. Credentials are left to the SDK's own chain (IAM
26-
// role / static keys / session token / bearer) — only region is passed.
24+
// Region passed explicitly since the SDK reads only AWS_REGION; credentials stay on
25+
// its own chain. `||` treats an empty region as unset, matching the webapp gate.
2726
const bedrock = createAmazonBedrock({
28-
region: process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION,
27+
region: process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION,
2928
});
3029

3130
export const registry = createProviderRegistry({ anthropic, bedrock });

0 commit comments

Comments
 (0)