mirror of
https://github.com/openai/codex.git
synced 2026-04-29 02:41:12 +03:00
merge upstream/dev/friel/fork-context-inherits-parent-model into collab stack
This commit is contained in:
@@ -1674,12 +1674,15 @@ async fn turn_start_file_change_approval_v2() -> Result<()> {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()> {
|
||||
async fn turn_start_emits_spawn_agent_item_with_effective_inherited_model_metadata_v2() -> Result<()>
|
||||
{
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
const CHILD_PROMPT: &str = "child: do work";
|
||||
const PARENT_PROMPT: &str = "spawn a child and continue";
|
||||
const SPAWN_CALL_ID: &str = "spawn-call-1";
|
||||
const INHERITED_MODEL: &str = "gpt-5.2-codex";
|
||||
const INHERITED_REASONING_EFFORT: ReasoningEffort = ReasoningEffort::XHigh;
|
||||
const REQUESTED_MODEL: &str = "gpt-5.1";
|
||||
const REQUESTED_REASONING_EFFORT: ReasoningEffort = ReasoningEffort::Low;
|
||||
|
||||
@@ -1735,7 +1738,7 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()
|
||||
|
||||
let thread_req = mcp
|
||||
.send_thread_start_request(ThreadStartParams {
|
||||
model: Some("gpt-5.2-codex".to_string()),
|
||||
model: Some(INHERITED_MODEL.to_string()),
|
||||
..Default::default()
|
||||
})
|
||||
.await?;
|
||||
@@ -1832,8 +1835,8 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()
|
||||
assert_eq!(sender_thread_id, thread.id);
|
||||
assert_eq!(receiver_thread_ids, vec![receiver_thread_id.clone()]);
|
||||
assert_eq!(prompt, Some(CHILD_PROMPT.to_string()));
|
||||
assert_eq!(model, Some(REQUESTED_MODEL.to_string()));
|
||||
assert_eq!(reasoning_effort, Some(REQUESTED_REASONING_EFFORT));
|
||||
assert_eq!(model, Some(INHERITED_MODEL.to_string()));
|
||||
assert_eq!(reasoning_effort, Some(INHERITED_REASONING_EFFORT));
|
||||
let agent_state = agents_states
|
||||
.get(&receiver_thread_id)
|
||||
.expect("spawn completion should include child agent state");
|
||||
|
||||
Reference in New Issue
Block a user