mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Support leaf models in multi-agent v2 (#36892)
## What changed - Allow multi-agent v2 parents to spawn any visible model that has not explicitly disabled multi-agent support. - Expose collaboration tools to child agents only when their selected model supports multi-agent v2, keeping legacy models as leaf workers. - Preserve a worker's selected model when reloading it into residency. - Propagate multi-agent capability metadata to Amazon Bedrock model entries so delegation is gated consistently. ## Testing - Cover model selection, leaf-worker tool visibility, Bedrock capability handling, and model preservation after reload. GitOrigin-RevId: 1457adb1a09806d1f0621311d5a42a6815b9dd4e
This commit is contained in:
@@ -268,6 +268,7 @@ impl AgentControl {
|
||||
include_history: false,
|
||||
})
|
||||
.await?;
|
||||
let stored_model = stored_thread.model.clone();
|
||||
let stored_source = stored_thread.source.clone();
|
||||
let stored_parent_thread_id = stored_thread.parent_thread_id;
|
||||
let history = load_agent_model_context(&state, thread_id, stored_thread.history_mode)
|
||||
@@ -320,6 +321,9 @@ impl AgentControl {
|
||||
CodexErr::InvalidRequest(format!("permission_profile is invalid: {err}"))
|
||||
})?;
|
||||
}
|
||||
if let Some(model) = stored_model {
|
||||
config.model = Some(model);
|
||||
}
|
||||
let residency_slot = self
|
||||
.reserve_v2_residency_slot(&state, &config, Some(thread_id))
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user