Skip to content

Bug: Fresh install reports "LLM not set" with no guidance to run login #2456

Description

@lming112

Bug Description

On a fresh install via Homebrew (brew install kimi-cli), running any command (e.g. kimi --print) immediately fails with:

LLM not set

There is no hint or guidance that the user needs to run kimi login first.

Steps to Reproduce

  1. brew install kimi-cli (v1.47.0)
  2. Run echo "hello" | kimi --print --output-format stream-json
  3. Observe: LLM not set (exit code 1)

Root Cause

After installation, ~/.kimi/config.toml is initialized with:

default_model = ""
[models]
[providers]

No model or provider is configured. The CLI does not prompt the user to authenticate or select a model on first run.

Expected Behavior

One of:

  1. On first run after install, automatically launch the login flow (similar to gh auth login), OR
  2. Print a clear, actionable error message like: No model configured. Run \kimi login` to authenticate and set up a model.`
  3. Include a post-install message from Homebrew pointing the user to kimi login.

Workaround

Run kimi login manually, complete the OAuth device flow in the browser. After login, config.toml is populated with default_model, [models], and [providers] entries and the CLI works correctly.

Environment

  • kimi-cli version: 1.47.0
  • Python: 3.14.6
  • Install method: Homebrew (brew install kimi-cli)
  • OS: macOS (Apple Silicon)
  • Config path: ~/.kimi/config.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions