mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
fix: allow subagent thinking config patch (#75802)
This commit is contained in:
@@ -9,6 +9,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Agents/Codex: stop prompting message-tool-only source turns to finish with `NO_REPLY`, so quiet turns are represented by not calling the visible message tool instead of conflicting final-text instructions. Thanks @pashpashpash.
|
||||
- Gateway/config: report failed backup restores as failed in logs and config observe audit records instead of marking them valid. (#70515) Thanks @davidangularme.
|
||||
- Compaction: use the active session model fallback chain for implicit summarization failures without persisting fallback model selection, so Azure content-filter 400s can recover. Fixes #64960. (#74470) Thanks @jalehman and @OpenCodeEngineer.
|
||||
- Gateway/config: allow `gateway config.patch` to update documented subagent thinking defaults. Fixes #75764. (#75802) Thanks @kAIborg24.
|
||||
|
||||
## 2026.4.30
|
||||
|
||||
|
||||
@@ -62,8 +62,10 @@ describe("gateway config mutation guard coverage", () => {
|
||||
expect.arrayContaining([
|
||||
"agents.defaults.systemPromptOverride",
|
||||
"agents.defaults.model",
|
||||
"agents.defaults.subagents.thinking",
|
||||
"agents.list[].id",
|
||||
"agents.list[].model",
|
||||
"agents.list[].subagents.thinking",
|
||||
"channels.*.requireMention",
|
||||
"messages.visibleReplies",
|
||||
"messages.groupChat.visibleReplies",
|
||||
@@ -71,6 +73,77 @@ describe("gateway config mutation guard coverage", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("allows documented subagent thinking default edits via config.patch", () => {
|
||||
expectAllowed(
|
||||
{},
|
||||
{
|
||||
agents: {
|
||||
defaults: {
|
||||
subagents: { thinking: "medium" },
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
expectAllowed(
|
||||
{
|
||||
agents: {
|
||||
defaults: {
|
||||
subagents: { thinking: "low" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
agents: {
|
||||
defaults: {
|
||||
subagents: { thinking: "high" },
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it("allows documented per-agent subagent thinking edits via config.patch", () => {
|
||||
expectAllowed(
|
||||
{
|
||||
agents: {
|
||||
list: [{ id: "worker", subagents: { thinking: "low" } }],
|
||||
},
|
||||
},
|
||||
{
|
||||
agents: {
|
||||
list: [{ id: "worker", subagents: { thinking: "medium" } }],
|
||||
},
|
||||
},
|
||||
);
|
||||
expectAllowed(
|
||||
{ agents: { list: [] as Array<Record<string, unknown>> } },
|
||||
{
|
||||
agents: {
|
||||
list: [{ id: "helper", subagents: { thinking: "medium" } }],
|
||||
},
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps neighboring subagent policy fields protected via config.patch", () => {
|
||||
expectBlocked(
|
||||
{ agents: { defaults: { subagents: { allowAgents: ["worker"] } } } },
|
||||
{ agents: { defaults: { subagents: { allowAgents: ["*"] } } } },
|
||||
);
|
||||
expectBlocked(
|
||||
{
|
||||
agents: {
|
||||
list: [{ id: "worker", subagents: { requireAgentId: true } }],
|
||||
},
|
||||
},
|
||||
{
|
||||
agents: {
|
||||
list: [{ id: "worker", subagents: { requireAgentId: false } }],
|
||||
},
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it("allows visible reply delivery mode edits via config.patch", () => {
|
||||
expectAllowed(
|
||||
{},
|
||||
|
||||
@@ -34,12 +34,14 @@ const ALLOWED_GATEWAY_CONFIG_PATHS = [
|
||||
"agents.defaults.promptOverlays",
|
||||
"agents.defaults.model",
|
||||
"agents.defaults.thinkingDefault",
|
||||
"agents.defaults.subagents.thinking",
|
||||
"agents.defaults.reasoningDefault",
|
||||
"agents.defaults.fastModeDefault",
|
||||
"agents.list[].id",
|
||||
"agents.list[].systemPromptOverride",
|
||||
"agents.list[].model",
|
||||
"agents.list[].thinkingDefault",
|
||||
"agents.list[].subagents.thinking",
|
||||
"agents.list[].reasoningDefault",
|
||||
"agents.list[].fastModeDefault",
|
||||
// Mention gating is an agent-facing scope knob across channel adapters.
|
||||
|
||||
Reference in New Issue
Block a user