feat: subagent model defaults
This commit is contained in:
@@ -1090,6 +1090,8 @@ export type ToolsConfig = {
|
||||
};
|
||||
/** Sub-agent tool policy defaults (deny wins). */
|
||||
subagents?: {
|
||||
/** Default model selection for spawned sub-agents (string or {primary,fallbacks}). */
|
||||
model?: string | { primary?: string; fallbacks?: string[] };
|
||||
tools?: {
|
||||
allow?: string[];
|
||||
deny?: string[];
|
||||
@@ -1119,6 +1121,8 @@ export type AgentConfig = {
|
||||
subagents?: {
|
||||
/** Allow spawning sub-agents under other agent ids. Use "*" to allow any. */
|
||||
allowAgents?: string[];
|
||||
/** Per-agent default model for spawned sub-agents (string or {primary,fallbacks}). */
|
||||
model?: string | { primary?: string; fallbacks?: string[] };
|
||||
};
|
||||
sandbox?: {
|
||||
mode?: "off" | "non-main" | "all";
|
||||
|
||||
@@ -924,6 +924,15 @@ const AgentEntrySchema = z.object({
|
||||
subagents: z
|
||||
.object({
|
||||
allowAgents: z.array(z.string()).optional(),
|
||||
model: z
|
||||
.union([
|
||||
z.string(),
|
||||
z.object({
|
||||
primary: z.string().optional(),
|
||||
fallbacks: z.array(z.string()).optional(),
|
||||
}),
|
||||
])
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
sandbox: AgentSandboxSchema,
|
||||
@@ -1227,6 +1236,15 @@ const AgentDefaultsSchema = z
|
||||
.object({
|
||||
maxConcurrent: z.number().int().positive().optional(),
|
||||
archiveAfterMinutes: z.number().int().positive().optional(),
|
||||
model: z
|
||||
.union([
|
||||
z.string(),
|
||||
z.object({
|
||||
primary: z.string().optional(),
|
||||
fallbacks: z.array(z.string()).optional(),
|
||||
}),
|
||||
])
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
sandbox: z
|
||||
|
||||
Reference in New Issue
Block a user