MoonshotAI / MoonshotAI/kimi-cli
fix: model_display_name ignores display_name for kimi-for-coding
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
- Log in via /login with Kimi Code platform.
- Run
kimiand observe the welcome panel or prompt status bar shows "kimi-for-coding" instead of "Kimi-k2.6". - Query the API directly:
curl -H 'Authorization: Bearer <token>' https://api.kimi.com/coding/v1/models— the response includesdisplay_name: 'Kimi-k2.6'. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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