jackwener/OpenCLI · warning · EmptyResultError
Model dropdown opened but no options detected.
Error message
Model dropdown opened but no options detected.
What it means
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.
Source
Thrown at clis/kimi/ui.js:310
if (/^K\\d|^Kimi |^Pro\\b|^Auto/.test(t)) return t;
}
p = p.parentElement;
}
}
return '';
})()`);
if (normalizeModel(verified) !== normalizeModel(clickRes.clicked)) {
throw new CommandExecutionError(
`Kimi model switch did not verify the requested model: requested "${wantSet}", current "${verified || 'not visible'}"`,
'Open the Kimi model menu and verify the requested model is selectable, then retry.',
);
}
return [{ Index: 1, Model: clickRes.clicked, Active: 'switched' }];
}
try { await page.evaluate(`document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));`); } catch {}
if (!opts.length) {
throw new EmptyResultError('kimi model', 'Model dropdown opened but no options detected.');
}
return opts.map((m, i) => ({ Index: i + 1, Model: m, Active: m === cur ? 'yes' : '' }));
},
});
View on GitHub (pinned to 49907e53dc)
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.
Example fix
// before
const opts = await page.evaluate(scanScript);
if (!opts.length) throw new EmptyResultError('kimi model', '...');
// after
await page.wait(1); // allow options to render
const opts = await page.evaluate(scanScript); Defensive patterns
Strategy: retry
Validate before calling
await page.waitForSelector('[role="listbox"], [class*="dropdown"i]'); // ensure options container rendered Try / catch
try {
return await listKimiModels(page);
} catch (e) {
if (/no options detected/.test(e.message)) {
await page.wait(1.5);
return listKimiModels(page);
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No Codex projects matched "${kwargs.project}". / No Codex pr
- No chats visible in sidebar. Are you logged in?
- No messages found in /chat/${id}.
- No chat turns found on current page.
- No assistant message visible.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/cb3f10fef54f0530.
Report an issue: GitHub.