mirror of
https://github.com/openai/codex.git
synced 2026-10-25 18:28:38 +00:00
codex: fix personality instruction assertions (#16964)
This commit is contained in:
@@ -1772,7 +1772,6 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
|
||||
let start_id = primary
|
||||
.send_thread_start_request(ThreadStartParams {
|
||||
model: Some("gpt-5.2-codex".to_string()),
|
||||
base_instructions: Some(Some(CODEX_5_2_INSTRUCTIONS_TEMPLATE_DEFAULT.to_string())),
|
||||
..Default::default()
|
||||
})
|
||||
.await?;
|
||||
@@ -1811,7 +1810,6 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
|
||||
.send_thread_resume_request(ThreadResumeParams {
|
||||
thread_id: thread.id,
|
||||
model: Some("gpt-5.2-codex".to_string()),
|
||||
base_instructions: Some(Some(CODEX_5_2_INSTRUCTIONS_TEMPLATE_DEFAULT.to_string())),
|
||||
personality: Some(Personality::Friendly),
|
||||
..Default::default()
|
||||
})
|
||||
|
||||
@@ -1041,12 +1041,10 @@ async fn turn_start_uses_migrated_pragmatic_personality_without_override_v2() ->
|
||||
.await??;
|
||||
|
||||
let request = response_mock.single_request();
|
||||
let developer_texts = request.message_input_texts("developer");
|
||||
let instructions_text = request.instructions_text();
|
||||
assert!(
|
||||
developer_texts
|
||||
.iter()
|
||||
.any(|text| text.contains(LOCAL_PRAGMATIC_TEMPLATE)),
|
||||
"expected startup-migrated pragmatic personality in developer instructions, got: {developer_texts:?}"
|
||||
instructions_text.contains(LOCAL_PRAGMATIC_TEMPLATE),
|
||||
"expected startup-migrated pragmatic personality in model instructions, got: {instructions_text:?}"
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user