fix(orchestrator-sisyphus): allow model override via config
Previously, orchestrator-sisyphus agent had hardcoded model and didn't accept model parameter, making config overrides ineffective. - Add model param to OrchestratorContext interface - Use ctx?.model ?? DEFAULT_MODEL pattern (consistent with Sisyphus) - Pass model override from config to createOrchestratorSisyphusAgent
This commit is contained in:
parent
751ac64d39
commit
e9aa805c3f
@ -13,6 +13,7 @@ import { createAgentToolRestrictions } from "../shared/permission-compat"
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export interface OrchestratorContext {
|
export interface OrchestratorContext {
|
||||||
|
model?: string
|
||||||
availableAgents?: AvailableAgent[]
|
availableAgents?: AvailableAgent[]
|
||||||
availableSkills?: AvailableSkill[]
|
availableSkills?: AvailableSkill[]
|
||||||
userCategories?: Record<string, CategoryConfig>
|
userCategories?: Record<string, CategoryConfig>
|
||||||
@ -1432,6 +1433,8 @@ function buildDynamicOrchestratorPrompt(ctx?: OrchestratorContext): string {
|
|||||||
.replace("{SKILLS_SECTION}", skillsSection)
|
.replace("{SKILLS_SECTION}", skillsSection)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DEFAULT_MODEL = "anthropic/claude-sonnet-4-5"
|
||||||
|
|
||||||
export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): AgentConfig {
|
export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): AgentConfig {
|
||||||
const restrictions = createAgentToolRestrictions([
|
const restrictions = createAgentToolRestrictions([
|
||||||
"task",
|
"task",
|
||||||
@ -1442,7 +1445,7 @@ export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): Agen
|
|||||||
description:
|
description:
|
||||||
"Orchestrates work via sisyphus_task() to complete ALL tasks in a todo list until fully done",
|
"Orchestrates work via sisyphus_task() to complete ALL tasks in a todo list until fully done",
|
||||||
mode: "primary" as const,
|
mode: "primary" as const,
|
||||||
model: "anthropic/claude-sonnet-4-5",
|
model: ctx?.model ?? DEFAULT_MODEL,
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
prompt: buildDynamicOrchestratorPrompt(ctx),
|
prompt: buildDynamicOrchestratorPrompt(ctx),
|
||||||
thinking: { type: "enabled", budgetTokens: 32000 },
|
thinking: { type: "enabled", budgetTokens: 32000 },
|
||||||
|
|||||||
@ -176,7 +176,11 @@ export function createBuiltinAgents(
|
|||||||
|
|
||||||
if (!disabledAgents.includes("orchestrator-sisyphus")) {
|
if (!disabledAgents.includes("orchestrator-sisyphus")) {
|
||||||
const orchestratorOverride = agentOverrides["orchestrator-sisyphus"]
|
const orchestratorOverride = agentOverrides["orchestrator-sisyphus"]
|
||||||
let orchestratorConfig = createOrchestratorSisyphusAgent({ availableAgents })
|
const orchestratorModel = orchestratorOverride?.model
|
||||||
|
let orchestratorConfig = createOrchestratorSisyphusAgent({
|
||||||
|
model: orchestratorModel,
|
||||||
|
availableAgents,
|
||||||
|
})
|
||||||
|
|
||||||
if (orchestratorOverride) {
|
if (orchestratorOverride) {
|
||||||
orchestratorConfig = mergeAgentConfig(orchestratorConfig, orchestratorOverride)
|
orchestratorConfig = mergeAgentConfig(orchestratorConfig, orchestratorOverride)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user