fix(athena): remove dead temperature/permission fields from council launch pipeline
LaunchInput.temperature and LaunchInput.permission were accepted and passed through the council orchestrator but never forwarded to the actual promptAsync API call (SDK doesn't support per-request temperature or permission). Remove the dead fields, the unused AthenaConfig interface, and update tests/docs/schema accordingly.
This commit is contained in:
@@ -11,8 +11,6 @@ interface MockLaunchInput {
|
||||
parentMessageID: string
|
||||
parentAgent?: string
|
||||
model?: { providerID: string; modelID: string; variant?: string }
|
||||
temperature?: number
|
||||
permission?: Record<string, "ask" | "allow" | "deny">
|
||||
}
|
||||
|
||||
function createMockTask(id: string, launch: MockLaunchInput) {
|
||||
@@ -68,7 +66,6 @@ describe("executeCouncil", () => {
|
||||
for (const launch of launches) {
|
||||
expect(launch.prompt).toBe(expectedPrompt)
|
||||
expect(launch.agent).toBe("athena")
|
||||
expect(launch.permission).toEqual({ write: "deny", edit: "deny", task: "deny", athena_council: "deny" })
|
||||
}
|
||||
|
||||
expect(launches[0]?.model).toEqual({ providerID: "openai", modelID: "gpt-5.3-codex" })
|
||||
@@ -170,10 +167,10 @@ describe("executeCouncil", () => {
|
||||
expect(result.failures.find((f) => f.member.model === "invalid-model")?.error).toContain("Launch failed")
|
||||
})
|
||||
|
||||
//#given members with per-member temperature and variant
|
||||
//#given members with per-member variant
|
||||
//#when executeCouncil is called
|
||||
//#then launch receives those values for each corresponding member
|
||||
test("passes member temperature and variant to launch input", async () => {
|
||||
//#then launch receives variant in model for each corresponding member
|
||||
test("passes member variant to launch input model", async () => {
|
||||
const launches: MockLaunchInput[] = []
|
||||
const launcher = {
|
||||
launch: async (input: MockLaunchInput) => {
|
||||
@@ -186,8 +183,8 @@ describe("executeCouncil", () => {
|
||||
question: "Compare architecture options",
|
||||
council: {
|
||||
members: [
|
||||
{ model: "openai/gpt-5.3-codex", temperature: 0.1, variant: "high" },
|
||||
{ model: "anthropic/claude-sonnet-4-5", temperature: 0.3 },
|
||||
{ model: "openai/gpt-5.3-codex", variant: "high" },
|
||||
{ model: "anthropic/claude-sonnet-4-5" },
|
||||
],
|
||||
},
|
||||
launcher,
|
||||
@@ -196,9 +193,7 @@ describe("executeCouncil", () => {
|
||||
})
|
||||
|
||||
expect(launches).toHaveLength(2)
|
||||
expect(launches[0]?.temperature).toBe(0.1)
|
||||
expect(launches[0]?.model?.variant).toBe("high")
|
||||
expect(launches[1]?.temperature).toBe(0.3)
|
||||
expect(launches[1]?.model?.variant).toBeUndefined()
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { LaunchInput, BackgroundTask } from "../../features/background-agent/types"
|
||||
import { createAgentToolRestrictions } from "../../shared/permission-compat"
|
||||
import { buildCouncilPrompt } from "./council-prompt"
|
||||
import { parseModelString } from "./model-parser"
|
||||
import type { CouncilConfig, CouncilLaunchFailure, CouncilLaunchedMember, CouncilLaunchResult, CouncilMemberConfig } from "./types"
|
||||
@@ -72,7 +71,6 @@ async function launchMember(
|
||||
throw new Error(`Invalid model string: "${member.model}"`)
|
||||
}
|
||||
|
||||
const restrictions = createAgentToolRestrictions(["write", "edit", "task", "athena_council"])
|
||||
const memberName = member.name ?? member.model
|
||||
return launcher.launch({
|
||||
description: `Council member: ${memberName}`,
|
||||
@@ -86,7 +84,5 @@ async function launchMember(
|
||||
modelID: parsedModel.modelID,
|
||||
...(member.variant ? { variant: member.variant } : {}),
|
||||
},
|
||||
...(member.temperature !== undefined ? { temperature: member.temperature } : {}),
|
||||
permission: restrictions.permission,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export interface CouncilMemberConfig {
|
||||
model: string
|
||||
temperature?: number
|
||||
variant?: string
|
||||
name?: string
|
||||
}
|
||||
@@ -9,11 +8,6 @@ export interface CouncilConfig {
|
||||
members: CouncilMemberConfig[]
|
||||
}
|
||||
|
||||
export interface AthenaConfig {
|
||||
model?: string
|
||||
council: CouncilConfig
|
||||
}
|
||||
|
||||
export interface CouncilLaunchFailure {
|
||||
member: CouncilMemberConfig
|
||||
error: string
|
||||
|
||||
Reference in New Issue
Block a user