From 2c25720ec3fa62b90be9c583e2be7dc590dcfa73 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:29:17 +0000 Subject: [PATCH] fix(cli): restore model.prompt-based system prompt selection The switch(model.prompt) block in SystemPrompt.provider() was accidentally dropped during merge conflict resolution in fa2c979ac. This meant the prompt property set by the Kilo gateway (e.g. codex, anthropic, beast) was stored on the model but never read, causing all Kilo-routed models to fall back to model.api.id string matching. --- packages/opencode/src/session/system.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/opencode/src/session/system.ts b/packages/opencode/src/session/system.ts index cd08986de62..fa9c126aa57 100644 --- a/packages/opencode/src/session/system.ts +++ b/packages/opencode/src/session/system.ts @@ -34,6 +34,23 @@ export namespace SystemPrompt { // kilocode_change end export function provider(model: Provider.Model) { + // kilocode_change start + switch (model.prompt) { + case "anthropic": + return [PROMPT_ANTHROPIC] + case "anthropic_without_todo": + return [PROMPT_DEFAULT] + case "beast": + return [PROMPT_BEAST] + case "codex": + return [PROMPT_CODEX] + case "gemini": + return [PROMPT_GEMINI] + case "trinity": + return [PROMPT_TRINITY] + } + // kilocode_change end + if (model.api.id.includes("gpt-4") || model.api.id.includes("o1") || model.api.id.includes("o3")) return [PROMPT_BEAST] if (model.api.id.includes("gpt")) {