修复格式

This commit is contained in:
advent259141
2026-01-26 22:31:18 +08:00
parent 3cf0880f98
commit c3e4a52e5f
4 changed files with 10 additions and 4 deletions

View File

@@ -82,7 +82,8 @@ class ProcessLLMRequest:
# Encourage the model to delegate to subagents.
# Use the built-in default router prompt; user overrides are disabled for now.
router_prompt = (
self.ctx.get_config().get("provider_settings", {})
self.ctx.get_config()
.get("provider_settings", {})
.get("subagent_orchestrator", {})
.get("router_system_prompt", "")
).strip()

View File

@@ -77,7 +77,9 @@ class FunctionToolExecutor(BaseFunctionToolExecutor[AstrAgentContext]):
# Use per-subagent provider override if configured; otherwise fall back
# to the current/default provider resolution.
prov_id = getattr(tool, "provider_id", None) or await ctx.get_current_chat_provider_id(umo)
prov_id = getattr(
tool, "provider_id", None
) or await ctx.get_current_chat_provider_id(umo)
llm_resp = await ctx.tool_loop_agent(
event=event,
chat_provider_id=prov_id,

View File

@@ -121,7 +121,6 @@ DEFAULT_CONFIG = {
"shipyard_ttl": 3600,
"shipyard_max_sessions": 10,
},
# SubAgent orchestrator mode: the main LLM only delegates tasks to subagents
# (via transfer_to_{agent} tools). Domain tools are mounted on subagents.
"subagent_orchestrator": {

View File

@@ -41,7 +41,11 @@ class SubAgentRoute(Route):
}
# Backward compatibility: older config used `enable`.
if isinstance(data, dict) and "main_enable" not in data and "enable" in data:
if (
isinstance(data, dict)
and "main_enable" not in data
and "enable" in data
):
data["main_enable"] = bool(data.get("enable", False))
# Ensure required keys exist.