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:
@@ -30,7 +30,13 @@ export interface MapPhaseInput {
|
||||
};
|
||||
}
|
||||
|
||||
export async function runMapPhase({ model, apiKey, thinkingLevel, files, config }: MapPhaseInput): Promise<FileObservation[]> {
|
||||
export async function runMapPhase({
|
||||
model,
|
||||
apiKey,
|
||||
thinkingLevel,
|
||||
files,
|
||||
config,
|
||||
}: MapPhaseInput): Promise<FileObservation[]> {
|
||||
const filtered = files.filter(file => !isExcludedFile(file.filename));
|
||||
const systemPrompt = renderPromptTemplate(fileObserverSystemPrompt);
|
||||
const maxFileTokens = config?.maxFileTokens ?? MAX_FILE_TOKENS;
|
||||
@@ -61,7 +67,13 @@ export async function runMapPhase({ model, apiKey, thinkingLevel, files, config
|
||||
};
|
||||
|
||||
const response = await withRetry(
|
||||
() => completeSimple(model, request, { apiKey, maxTokens: 400, reasoning: toReasoningEffort(thinkingLevel), signal: AbortSignal.timeout(timeoutMs) }),
|
||||
() =>
|
||||
completeSimple(model, request, {
|
||||
apiKey,
|
||||
maxTokens: 400,
|
||||
reasoning: toReasoningEffort(thinkingLevel),
|
||||
signal: AbortSignal.timeout(timeoutMs),
|
||||
}),
|
||||
maxRetries,
|
||||
retryBackoffMs,
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
||||
import type { Api, Model } from "@oh-my-pi/pi-ai";
|
||||
import { MODEL_ROLE_IDS } from "../config/model-registry";
|
||||
import { expandRoleAlias, parseModelPattern, resolveModelRoleValue } from "../config/model-resolver";
|
||||
import { parseModelPattern, resolveModelRoleValue } from "../config/model-resolver";
|
||||
import type { Settings } from "../config/settings";
|
||||
import MODEL_PRIO from "../priority.json" with { type: "json" };
|
||||
|
||||
|
||||
@@ -46,17 +46,16 @@ async function runLegacyCommitCommand(args: CommitCommandArgs): Promise<void> {
|
||||
const modelRegistry = new ModelRegistry(authStorage);
|
||||
await modelRegistry.refresh();
|
||||
|
||||
const { model: primaryModel, apiKey: primaryApiKey, thinkingLevel: primaryThinkingLevel } = await resolvePrimaryModel(
|
||||
args.model,
|
||||
settings,
|
||||
modelRegistry,
|
||||
);
|
||||
const { model: smolModel, apiKey: smolApiKey, thinkingLevel: smolThinkingLevel } = await resolveSmolModel(
|
||||
settings,
|
||||
modelRegistry,
|
||||
primaryModel,
|
||||
primaryApiKey,
|
||||
);
|
||||
const {
|
||||
model: primaryModel,
|
||||
apiKey: primaryApiKey,
|
||||
thinkingLevel: primaryThinkingLevel,
|
||||
} = await resolvePrimaryModel(args.model, settings, modelRegistry);
|
||||
const {
|
||||
model: smolModel,
|
||||
apiKey: smolApiKey,
|
||||
thinkingLevel: smolThinkingLevel,
|
||||
} = await resolveSmolModel(settings, modelRegistry, primaryModel, primaryApiKey);
|
||||
|
||||
const git = new ControlledGit(cwd);
|
||||
let stagedFiles = await git.getStagedFiles();
|
||||
|
||||
Reference in New Issue
Block a user