{"record":{"id":"cb3f10fef54f0530","repo":"jackwener/OpenCLI","slug":"model-dropdown-opened-but-no-options-detected","errorCode":null,"errorMessage":"Model dropdown opened but no options detected.","messagePattern":"Model dropdown opened but no options detected\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/kimi/ui.js","lineNumber":310,"sourceCode":"            if (/^K\\\\d|^Kimi |^Pro\\\\b|^Auto/.test(t)) return t;\n          }\n          p = p.parentElement;\n        }\n      }\n      return '';\n    })()`);\n            if (normalizeModel(verified) !== normalizeModel(clickRes.clicked)) {\n                throw new CommandExecutionError(\n                    `Kimi model switch did not verify the requested model: requested \"${wantSet}\", current \"${verified || 'not visible'}\"`,\n                    'Open the Kimi model menu and verify the requested model is selectable, then retry.',\n                );\n            }\n            return [{ Index: 1, Model: clickRes.clicked, Active: 'switched' }];\n        }\n\n        try { await page.evaluate(`document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));`); } catch {}\n        if (!opts.length) {\n            throw new EmptyResultError('kimi model', 'Model dropdown opened but no options detected.');\n        }\n        return opts.map((m, i) => ({ Index: i + 1, Model: m, Active: m === cur ? 'yes' : '' }));\n    },\n});\n","sourceCodeStart":292,"sourceCodeEnd":315,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/kimi/ui.js#L292-L315","documentation":"The kimi model list command opens the model dropdown and scans for options. If the menu opens but zero options are collected, it throws EmptyResultError ('kimi model', ...). The library raises this rather than returning an empty list so callers know the enumeration itself failed.","triggerScenarios":"opts.length === 0 after opening the dropdown: options render later than the scan, the popover selector matched nothing, or Kimi renders options in a structure the extractor doesn't recognize.","commonSituations":"Slow network making options load after the scan; Kimi UI redesign changed option markup; account with no selectable models; dropdown opened behind a modal that hides options from visibility checks.","solutions":["Retry — options often just render slowly.","Add a wait after opening the dropdown before options are read (or update the library to wait for the list).","Verify the account is logged in and has models available in the menu.","Update the library if Kimi changed the dropdown markup."],"exampleFix":"// before\nconst opts = await page.evaluate(scanScript);\nif (!opts.length) throw new EmptyResultError('kimi model', '...');\n// after\nawait page.wait(1); // allow options to render\nconst opts = await page.evaluate(scanScript);","handlingStrategy":"retry","validationCode":"await page.waitForSelector('[role=\"listbox\"], [class*=\"dropdown\"i]'); // ensure options container rendered","typeGuard":null,"tryCatchPattern":"try {\n  return await listKimiModels(page);\n} catch (e) {\n  if (/no options detected/.test(e.message)) {\n    await page.wait(1.5);\n    return listKimiModels(page);\n  }\n  throw e;\n}","preventionTips":["Allow generous render time on slow networks before enumerating options.","Confirm the account is logged in and has selectable models.","Keep the library updated for Kimi dropdown markup changes."],"tags":["empty-result","ui-automation","kimi"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}