Merge pull request #2080 from Firstbober/dev

fix: model format normalization and explicit config cache bypass
This commit is contained in:
YeonGyu-Kim
2026-03-02 23:28:06 +09:00
committed by GitHub
4 changed files with 75 additions and 7 deletions
+7 -6
View File
@@ -2,7 +2,7 @@ import type { DelegateTaskArgs } from "./types"
import type { ExecutorContext } from "./executor-types"
import { isPlanFamily } from "./constants"
import { SISYPHUS_JUNIOR_AGENT } from "./sisyphus-junior-agent"
import { parseModelString } from "./model-string-parser"
import { normalizeModelFormat } from "../../shared/model-format-normalizer"
import { AGENT_MODEL_REQUIREMENTS } from "../../shared/model-requirements"
import { getAgentDisplayName, getAgentConfigKey } from "../../shared/agent-display-names"
import { normalizeSDKResponse } from "../../shared"
@@ -99,8 +99,9 @@ Create the work plan directly - that's your job as the planning agent.`,
if (agentOverride?.model || agentRequirement || matchedAgent.model) {
const availableModels = await getAvailableModelsForDelegateTask(client)
const matchedAgentModelStr = matchedAgent.model
? `${matchedAgent.model.providerID}/${matchedAgent.model.modelID}`
const normalizedMatchedModel = normalizeModelFormat(matchedAgent.model as Parameters<typeof normalizeModelFormat>[0])
const matchedAgentModelStr = normalizedMatchedModel
? `${normalizedMatchedModel.providerID}/${normalizedMatchedModel.modelID}`
: undefined
const resolution = resolveModelForDelegateTask({
@@ -112,10 +113,10 @@ Create the work plan directly - that's your job as the planning agent.`,
})
if (resolution) {
const parsed = parseModelString(resolution.model)
if (parsed) {
const normalized = normalizeModelFormat(resolution.model)
if (normalized) {
const variantToUse = agentOverride?.variant ?? resolution.variant
categoryModel = variantToUse ? { ...parsed, variant: variantToUse } : parsed
categoryModel = variantToUse ? { ...normalized, variant: variantToUse } : normalized
}
}
}