()
| 116 | }) |
| 117 | |
| 118 | function initModelStrings(): void { |
| 119 | const ms = getModelStringsState() |
| 120 | if (ms !== null) { |
| 121 | // Already initialized |
| 122 | return |
| 123 | } |
| 124 | // Initial with default values for non-Bedrock providers |
| 125 | if (getAPIProvider() !== 'bedrock') { |
| 126 | setModelStringsState(getBuiltinModelStrings(getAPIProvider())) |
| 127 | return |
| 128 | } |
| 129 | // On Bedrock, update model strings in the background without blocking. |
| 130 | // Don't set the state in this case so that we can use `sequential` on |
| 131 | // `updateBedrockModelStrings` and check for existing state on multiple |
| 132 | // calls. |
| 133 | void updateBedrockModelStrings() |
| 134 | } |
| 135 | |
| 136 | export function getModelStrings(): ModelStrings { |
| 137 | const ms = getModelStringsState() |
no test coverage detected