(options: GetModelsOptions)
| 1045 | } |
| 1046 | |
| 1047 | const safeGetModels = async (options: GetModelsOptions): Promise<ModelRecord> => { |
| 1048 | try { |
| 1049 | return await getModels(options) |
| 1050 | } catch (error) { |
| 1051 | console.error( |
| 1052 | `Failed to fetch models in webviewMessageHandler requestRouterModels for ${options.provider}:`, |
| 1053 | error, |
| 1054 | ) |
| 1055 | |
| 1056 | throw error // Re-throw to be caught by Promise.allSettled. |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | // Base candidates (only those handled by this aggregate fetcher) |
| 1061 | const candidates: { key: RouterName; options: GetModelsOptions }[] = [ |
no test coverage detected