{"record":{"id":"ecc6c7121e8892fc","repo":"diegosouzapw/OmniRoute","slug":"cursor-agent-did-not-return-a-model-catalog-from","errorCode":null,"errorMessage":"cursor-agent did not return a model catalog from 'agent --list-models'","messagePattern":"cursor-agent did not return a model catalog from 'agent --list-models'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/providerModels/cursorAgent.ts","lineNumber":217,"sourceCode":"  }\n  let combined = `${result.stdout}\\n${result.stderr}`;\n  let ids = parseCursorAgentModels(combined);\n\n  // Backward compatibility for releases from before the dedicated catalog interface.\n  if (ids.length === 0 && !/Authentication required|Not logged in/i.test(combined)) {\n    const remainingTimeoutMs = timeoutMs - (Date.now() - startedAt);\n    if (remainingTimeoutMs > 0) {\n      result = await runCursorAgent(binary, [\"--model\", \"--help\"], remainingTimeoutMs);\n      combined = `${result.stdout}\\n${result.stderr}`;\n      ids = parseCursorAgentModels(combined);\n    }\n  }\n\n  if (ids.length === 0) {\n    if (/Authentication required|Not logged in/i.test(combined)) {\n      throw new Error(\"cursor-agent is not authenticated; run 'agent login' on the OmniRoute host\");\n    }\n    throw new Error(\"cursor-agent did not return a model catalog from 'agent --list-models'\");\n  }\n\n  return ids.map((id) => ({\n    id,\n    name: humanizeCursorModelId(id),\n    owned_by: \"cursor\" as const,\n  }));\n}\n","sourceCodeStart":199,"sourceCodeEnd":226,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/providerModels/cursorAgent.ts#L199-L226","documentation":"Error \"cursor-agent did not return a model catalog from 'agent --list-models'\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/providerModels/cursorAgent.ts:217 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}