Skip to content

feat: add a dedicated system prompt for Kimi models#20259

Merged
kommander merged 1 commit intoanomalyco:devfrom
Yuxin-Dong:feat/kimi-system-prompt
Mar 31, 2026
Merged

feat: add a dedicated system prompt for Kimi models#20259
kommander merged 1 commit intoanomalyco:devfrom
Yuxin-Dong:feat/kimi-system-prompt

Conversation

@Yuxin-Dong
Copy link
Copy Markdown
Contributor

@Yuxin-Dong Yuxin-Dong commented Mar 31, 2026

Issue for this PR

Closes #20258

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR introduces a dedicated system prompt for Kimi models and updates prompt selection so that model IDs containing kimi use this prompt instead of the generic default prompt.

We are submitting this on behalf of Moonshot AI. The prompt content added here is migrated from Kimi Code CLI, where it is specifically tuned for Kimi-series models. The objective is to preserve the prompting style that is already known to work well for these models, while keeping the implementation isolated and low-risk.

Importantly, this prompt has been tested internally and is able to recover the performance regression observed on our internal benchmarks when Kimi models are run with the generic default prompt.

Scope of the change:

  • add packages/opencode/src/session/prompt/kimi.txt
  • update packages/opencode/src/session/system.ts so kimi model IDs resolve to the Kimi-specific prompt

How did you verify your code works?

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Comment on lines +89 to +100
## What are skills?

Skills are modular extensions that provide:

- Specialized knowledge: Domain-specific expertise (e.g., PDF processing, data analysis)
- Workflow patterns: Best practices for common tasks
- Tool integrations: Pre-configured tool chains for specific operations
- Reference material: Documentation, templates, and examples

## How to use skills

Identify the skills that are likely to be useful for the tasks you are currently working on, use the `skill` tool to load a skill for detailed instructions, guidelines, scripts and more.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is redundant

There is a later section of system prompt that mentions skills.

But ill merge as is but just letting u know, if u have follow up changes u want I can merge those too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuxin-Dong . In case review note was missed, because this is a good point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I will remove the dedicated # Skills section from the Kimi prompt so we don’t restate skill behavior in two places.

@kommander kommander merged commit 2daf4b8 into anomalyco:dev Mar 31, 2026
12 of 14 checks passed
h33h pushed a commit to h33h/opencode that referenced this pull request Mar 31, 2026
Co-authored-by: dongyuxin <dongyuxin@dev.dongyuxin.msh-dev.svc.cluster.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default system prompt degrades kimi-k2.5 performance on coding benchmarks

4 participants