MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / safeGetModels

Function safeGetModels

src/core/webview/webviewMessageHandler.ts:1047–1058  ·  view source on GitHub ↗
(options: GetModelsOptions)

Source from the content-addressed store, hash-verified

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 }[] = [

Callers 1

webviewMessageHandlerFunction · 0.85

Calls 2

getModelsFunction · 0.90
errorMethod · 0.65

Tested by

no test coverage detected