fix(coding-agent/modes): corrected role model cycling order to [smol, default, slow]

- Corrected role model cycling order from [slow, default, smol] to [smol, default, slow] to match expected progression.
This commit is contained in:
can1357
2026-03-11 00:18:07 +01:00
parent 4ed4cfb27c
commit 08a4fe78a2
6 changed files with 35 additions and 19 deletions
@@ -9,10 +9,10 @@ import { logger } from "@oh-my-pi/pi-utils";
import type { ModelRegistry } from "../config/model-registry";
import { resolveModelRoleValue } from "../config/model-resolver";
import { renderPromptTemplate } from "../config/prompt-templates";
import { toReasoningEffort } from "../thinking";
import type { Settings } from "../config/settings";
import MODEL_PRIO from "../priority.json" with { type: "json" };
import commitSystemPrompt from "../prompts/system/commit-message-system.md" with { type: "text" };
import { toReasoningEffort } from "../thinking";
const COMMIT_SYSTEM_PROMPT = renderPromptTemplate(commitSystemPrompt);
const MAX_DIFF_CHARS = 4000;
@@ -8,10 +8,10 @@ import { logger } from "@oh-my-pi/pi-utils";
import type { ModelRegistry } from "../config/model-registry";
import { resolveModelRoleValue } from "../config/model-resolver";
import { renderPromptTemplate } from "../config/prompt-templates";
import { toReasoningEffort } from "../thinking";
import type { Settings } from "../config/settings";
import MODEL_PRIO from "../priority.json" with { type: "json" };
import titleSystemPrompt from "../prompts/system/title-system.md" with { type: "text" };
import { toReasoningEffort } from "../thinking";
const TITLE_SYSTEM_PROMPT = renderPromptTemplate(titleSystemPrompt);
@@ -27,7 +27,9 @@ function getTitleModelCandidates(
const candidates: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }> = [];
const addCandidate = (model?: Model<Api>, thinkingLevel?: ThinkingLevel): void => {
if (!model) return;
const exists = candidates.some(candidate => candidate.model.provider === model.provider && candidate.model.id === model.id);
const exists = candidates.some(
candidate => candidate.model.provider === model.provider && candidate.model.id === model.id,
);
if (!exists) {
candidates.push({ model, thinkingLevel });
}
@@ -86,7 +88,10 @@ ${truncatedMessage}
for (const candidate of candidates) {
const apiKey = await registry.getApiKey(candidate.model, sessionId);
if (!apiKey) {
logger.debug("title-generator: no API key for model", { provider: candidate.model.provider, id: candidate.model.id });
logger.debug("title-generator: no API key for model", {
provider: candidate.model.provider,
id: candidate.model.id,
});
continue;
}