ccb2715ada
When replace_plan is true (default), the native plan agent was demoted to subagent but remained visible in the agent picker. This caused Sisyphus to route planning to the native plan agent instead of Prometheus. Add hidden: true to buildPlanDemoteConfig(), consistent with how the build agent is hidden when default_builder_enabled is false.
28 lines
671 B
TypeScript
28 lines
671 B
TypeScript
const MODEL_SETTINGS_KEYS = [
|
|
"model",
|
|
"variant",
|
|
"temperature",
|
|
"top_p",
|
|
"maxTokens",
|
|
"thinking",
|
|
"reasoningEffort",
|
|
"textVerbosity",
|
|
"providerOptions",
|
|
] as const
|
|
|
|
export function buildPlanDemoteConfig(
|
|
prometheusConfig: Record<string, unknown> | undefined,
|
|
planOverride: Record<string, unknown> | undefined,
|
|
): Record<string, unknown> {
|
|
const modelSettings: Record<string, unknown> = {}
|
|
|
|
for (const key of MODEL_SETTINGS_KEYS) {
|
|
const value = planOverride?.[key] ?? prometheusConfig?.[key]
|
|
if (value !== undefined) {
|
|
modelSettings[key] = value
|
|
}
|
|
}
|
|
|
|
return { mode: "subagent" as const, hidden: true, ...modelSettings }
|
|
}
|