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