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

  1. Retry — options often just render slowly.
  2. Add a wait after opening the dropdown before options are read (or update the library to wait for the list).
  3. Verify the account is logged in and has models available in the menu.
  4. 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

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


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/cb3f10fef54f0530. Report an issue: GitHub.