()
| 150 | * Call this before generating model options to ensure correct region strings. |
| 151 | */ |
| 152 | export async function ensureModelStringsInitialized(): Promise<void> { |
| 153 | const ms = getModelStringsState() |
| 154 | if (ms !== null) { |
| 155 | return |
| 156 | } |
| 157 | |
| 158 | // For non-Bedrock, initialize synchronously |
| 159 | if (getAPIProvider() !== 'bedrock') { |
| 160 | setModelStringsState(getBuiltinModelStrings(getAPIProvider())) |
| 161 | return |
| 162 | } |
| 163 | |
| 164 | // For Bedrock, wait for the profile fetch |
| 165 | await updateBedrockModelStrings() |
| 166 | } |
| 167 |
no test coverage detected