mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 15:50:25 +00:00
Agents: fix subagent model precedence
This commit is contained in:
committed by
Ayaan Zaidi
parent
d4cccda570
commit
e394262bd8
@@ -65,7 +65,7 @@ async function applySubagentModelPatch(cfg: OpenClawConfig) {
|
||||
}
|
||||
|
||||
function makeKimiSubagentCfg(params: {
|
||||
agentPrimaryModel: string;
|
||||
agentPrimaryModel?: string;
|
||||
agentSubagentModel?: string;
|
||||
defaultsSubagentModel?: string;
|
||||
}): OpenClawConfig {
|
||||
@@ -83,7 +83,7 @@ function makeKimiSubagentCfg(params: {
|
||||
list: [
|
||||
{
|
||||
id: "kimi",
|
||||
model: { primary: params.agentPrimaryModel },
|
||||
model: params.agentPrimaryModel ? { primary: params.agentPrimaryModel } : undefined,
|
||||
subagents: params.agentSubagentModel ? { model: params.agentSubagentModel } : undefined,
|
||||
},
|
||||
],
|
||||
@@ -400,7 +400,6 @@ describe("gateway sessions patch", () => {
|
||||
|
||||
test("allows global defaults.subagents.model for subagent session even when missing from global allowlist", async () => {
|
||||
const cfg = makeKimiSubagentCfg({
|
||||
agentPrimaryModel: "anthropic/claude-sonnet-4-6",
|
||||
defaultsSubagentModel: SUBAGENT_MODEL,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user