mirror of
https://github.com/openai/codex.git
synced 2026-04-25 15:15:15 +00:00
feat: rename experimental_instructions_file to model_instructions_file (#9555)
A user who has `experimental_instructions_file` set will now see this: <img width="888" height="660" alt="image" src="https://github.com/user-attachments/assets/51c98312-eb9b-4881-81f1-bea6677e158d" /> And a `codex exec` would include this warning: <img width="888" height="660" alt="image" src="https://github.com/user-attachments/assets/a89f62be-1edf-4593-a75e-e0b4a762ed7d" />
This commit is contained in:
@@ -109,11 +109,11 @@ async fn chat_mode_stream_cli() {
|
||||
);
|
||||
}
|
||||
|
||||
/// Verify that passing `-c experimental_instructions_file=...` to the CLI
|
||||
/// Verify that passing `-c model_instructions_file=...` to the CLI
|
||||
/// overrides the built-in base instructions by inspecting the request body
|
||||
/// received by a mock OpenAI Responses endpoint.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn exec_cli_applies_experimental_instructions_file() {
|
||||
async fn exec_cli_applies_model_instructions_file() {
|
||||
skip_if_no_network!();
|
||||
|
||||
// Start mock server which will capture the request and return a minimal
|
||||
@@ -128,7 +128,7 @@ async fn exec_cli_applies_experimental_instructions_file() {
|
||||
// Create a temporary instructions file with a unique marker we can assert
|
||||
// appears in the outbound request payload.
|
||||
let custom = TempDir::new().unwrap();
|
||||
let marker = "cli-experimental-instructions-marker";
|
||||
let marker = "cli-model-instructions-file-marker";
|
||||
let custom_path = custom.path().join("instr.md");
|
||||
std::fs::write(&custom_path, marker).unwrap();
|
||||
let custom_path_str = custom_path.to_string_lossy().replace('\\', "/");
|
||||
@@ -151,9 +151,7 @@ async fn exec_cli_applies_experimental_instructions_file() {
|
||||
.arg("-c")
|
||||
.arg("model_provider=\"mock\"")
|
||||
.arg("-c")
|
||||
.arg(format!(
|
||||
"experimental_instructions_file=\"{custom_path_str}\""
|
||||
))
|
||||
.arg(format!("model_instructions_file=\"{custom_path_str}\""))
|
||||
.arg("-C")
|
||||
.arg(&repo_root)
|
||||
.arg("hello?\n");
|
||||
|
||||
Reference in New Issue
Block a user