Skip to content

Commit 56e3a2c

Browse files
committed
Fix IBM watsonx region key mismatches
- Change default region from 'us-south' to 'Dallas' in handlePlatformChange - Change fallback region from 'us-south' to 'Dallas' in getCurrentRegion - Fixes region key mismatch with REGION_TO_URL mapping
1 parent 6b18a07 commit 56e3a2c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webview-ui/src/components/settings/providers/ibm-watsonx.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const WatsonxAI = ({
8787

8888
const getCurrentRegion = () => {
8989
const regionEntry = Object.entries(REGION_TO_URL).find(([_, url]) => url === apiConfiguration?.watsonxBaseUrl)
90-
return regionEntry?.[0] || "us-south"
90+
return regionEntry?.[0] || "Dallas"
9191
}
9292

9393
const [selectedRegion, setSelectedRegion] = useState(getCurrentRegion())
@@ -107,7 +107,7 @@ export const WatsonxAI = ({
107107
setApiConfigurationField("watsonxPlatform", newPlatform)
108108

109109
if (newPlatform === "ibmCloud") {
110-
const defaultRegion = "us-south"
110+
const defaultRegion = "Dallas"
111111
setSelectedRegion(defaultRegion)
112112
setApiConfigurationField("watsonxRegion", defaultRegion)
113113
setApiConfigurationField("watsonxBaseUrl", REGION_TO_URL[defaultRegion])

0 commit comments

Comments
 (0)