You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kimi prompt not applied to kimi-for-coding models k3 / k3-256k (falls back to default) #42059
SystemPrompt.provider() in packages/opencode/src/session/system.ts selects the dedicated Kimi system prompt (prompt/kimi.txt, added in #20259 by Moonshot AI) only when the model API id contains the substring kimi:
However, the official kimi-for-coding provider now serves its current flagship models under bare ids that do not contain kimi:
Provider
Model id
Prompt applied
kimi-for-coding
k3
❌ default
kimi-for-coding
k3-256k
❌ default
kimi-for-coding
kimi-for-coding / kimi-for-coding-highspeed
✅ kimi.txt
moonshotai / moonshotai-cn
kimi-k3
✅ kimi.txt
So the very same Kimi K3 model gets the Moonshot-tuned prompt when called via the Moonshot provider, but the generic fallback prompt when called via the official Kimi for Coding endpoint — which is likely the most common way K3 is used.
Expected behavior
Kimi-series models served by the official Kimi providers (kimi-for-coding, moonshotai, moonshotai-cn) should consistently use PROMPT_KIMI, regardless of whether the model id itself happens to contain the string kimi.
Suggested fix
Match on providerID in addition to the model id, e.g.:
(Matching bare k3 by id substring would risk false positives, so keying off the provider seems safer.)
Environment
opencode 1.18.15 (desktop CLI)
Model: kimi-for-coding/k3
Verified by inspecting the compiled binary: the provider() selection checks only model.api.id, and the resulting system prompt for a kimi-for-coding/k3 session starts with the default prompt text (You are opencode, an interactive CLI tool...) instead of the Kimi one (You are OpenCode, an interactive general AI agent...).
This issue might be a duplicate of (or closely related to) an existing issue. Please check:
MiniMax models fall through to the Claude-oriented default prompt #41031: Same root cause — SystemPrompt.provider() in system.ts uses model-id substring matching and misses a provider, causing models to fall through to the default prompt. That report covers MiniMax; this one covers kimi-for-coding/k3 and k3-256k. The fix described there would likely address both cases together.
Activity
github-actions commentedon Aug 12, 2026
This issue might be a duplicate of (or closely related to) an existing issue. Please check:
SystemPrompt.provider()insystem.tsuses model-id substring matching and misses a provider, causing models to fall through to the default prompt. That report covers MiniMax; this one coverskimi-for-coding/k3andk3-256k. The fix described there would likely address both cases together.