{"record":{"id":"d0027f1017483716","repo":"earendil-works/pi","slug":"model-catalog-refresh-timed-out","errorCode":null,"errorMessage":"Model catalog refresh timed out.","messagePattern":"Model catalog refresh timed out\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensions/llama/index.ts","lineNumber":60,"sourceCode":"export default function llamaExtension(pi: ExtensionAPI): void {\n\tconst provider = createLlamaProvider();\n\tpi.registerProvider(provider.provider);\n\n\tconst syncCatalog = async (\n\t\tctx: ExtensionCommandContext,\n\t\tclient: LlamaClient,\n\t\tcatalog?: LlamaModelInfo[],\n\t): Promise<LlamaModelInfo[]> => {\n\t\tconst signal = AbortSignal.timeout(15_000);\n\t\tconst current = catalog ?? (await client.list({ signal }));\n\t\tprovider.setCatalog(current, client.serverUrl);\n\t\tconst result = await ctx.modelRegistry.refresh({\n\t\t\tproviders: [LLAMA_PROVIDER_ID],\n\t\t\t// /llama already contacted the configured llama.cpp server, so keep this refresh live even in PI_OFFLINE.\n\t\t\tallowNetwork: true,\n\t\t\tsignal,\n\t\t});\n\t\tif (result.aborted) throw new Error(\"Model catalog refresh timed out.\");\n\t\tconst refreshError = result.errors.get(LLAMA_PROVIDER_ID);\n\t\tif (refreshError) throw refreshError;\n\t\treturn current;\n\t};\n\n\tconst loadModel = async (\n\t\tctx: ExtensionCommandContext,\n\t\tui: LlamaUi,\n\t\tclient: LlamaClient,\n\t\tcatalog: LlamaModelInfo[],\n\t\ttarget: LlamaModelInfo,\n\t): Promise<void> => {\n\t\tconst loaded = catalog.filter((model) => model.id !== target.id && modelIsLoaded(model));\n\t\tlet replace = false;\n\t\tif (loaded.length > 0) {\n\t\t\tconst choice = await ui.select(`${loaded.length} model${loaded.length === 1 ? \" is\" : \"s are\"} loaded`, [\n\t\t\t\t\"Unload all and load\",\n\t\t\t\t\"Keep loaded and load\",","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/extensions/llama/index.ts#L42-L78","documentation":"Error \"Model catalog refresh timed out.\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/extensions/llama/index.ts:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}