mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Expose spawn agent types only when roles are configured (#33572)
## Why The `agent_type` argument is only useful when agent roles are configured. Avoid advertising an inapplicable override in the model-visible `spawn_agent` schema. ## What changed - Include `agent_type` in the V1 and V2 spawn tools only when configured roles are available. - Clarify that `agent_type` is an explicit override and document its interaction with context forking. - Remove the unused `agents.support_agent_type` configuration field. ## Testing - Add coverage for hiding `agent_type` without roles and exposing it when a role is configured. GitOrigin-RevId: 32e0f123b15f317e9cdb71774029375bc073d9ad
This commit is contained in:
1 parent
03bb3b1236
commit
9ff47868eb
14 files changed
+96
-49
No files matched your search
@@ -863,9 +863,6 @@ pub struct Config {
|
||||
/// User-configured maximum number of spawned agent threads per session.
|
||||
pub agent_max_threads: Option<usize>,
|
||||
|
||||
/// Reserved setting for whether the spawn tool supports agent types.
|
||||
pub agent_support_agent_type: Option<bool>,
|
||||
|
||||
/// Reserved default model for spawned subagents.
|
||||
pub agent_default_subagent_model: Option<String>,
|
||||
|
||||
@@ -3606,10 +3603,6 @@ impl Config {
|
||||
.as_ref()
|
||||
.and_then(|agents| agents.max_depth)
|
||||
.unwrap_or(DEFAULT_AGENT_MAX_DEPTH);
|
||||
let agent_support_agent_type = cfg
|
||||
.agents
|
||||
.as_ref()
|
||||
.and_then(|agents| agents.support_agent_type);
|
||||
let agent_default_subagent_model = cfg
|
||||
.agents
|
||||
.as_ref()
|
||||
@@ -3970,7 +3963,6 @@ impl Config {
|
||||
tool_output_token_limit: cfg.tool_output_token_limit,
|
||||
agents_enabled,
|
||||
agent_max_threads,
|
||||
agent_support_agent_type,
|
||||
agent_default_subagent_model,
|
||||
agent_default_subagent_reasoning_effort,
|
||||
agent_max_depth,
|
||||
|
||||
Reference in new issue
Block a user