MoonshotAI / MoonshotAI/kimi-cli

fix: model_display_name ignores display_name for kimi-for-coding

Open Beginner friendly
#2,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

Describe the bug
The Kimi Code backend returns the correct display_name (e.g. "Kimi-k2.6") for the "kimi-for-coding" model via the /models endpoint, and this value is correctly saved to the config file. However, model_display_name() in src/kimi_cli/llm.py contains a hardcoded override that forces any model named "kimi-for-coding" or "kimi-code" to display as "kimi-for-coding" instead of respecting the backend-provided display_name.

This causes the welcome panel, prompt status bar, and other UI elements to show the opaque internal ID instead of the human-readable model name (e.g. "Kimi-k2.6").

To Reproduce

  1. Log in via /login with Kimi Code platform.
  2. Run kimi and observe the welcome panel or prompt status bar shows "kimi-for-coding" instead of "Kimi-k2.6".
  3. Query the API directly: curl -H 'Authorization: Bearer <token>' https://api.kimi.com/coding/v1/models — the response includes display_name: 'Kimi-k2.6'.
  4. Check ~/.kimi/config.toml — display_name = 'Kimi-k2.6' is correctly persisted, but never shown.

Expected behavior
The UI should show "Kimi-k2.6" (or whatever display_name the backend provides) for the kimi-for-coding model.

Environment

  • kimi-cli version: 1.41.0
  • Platform: Kimi Code (OAuth)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/kimi_cli/llm.py at model_display_name() and trace how the saved display_name from ~/.kimi/config.toml reaches the UI. Verify the welcome panel and prompt status bar show the backend-provided name, such as “Kimi-k2.6”, for the kimi-for-coding model rather than its internal ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.