fix(core/prompts): align gpt-5.1 instructions

This commit is contained in:
James Peter
2025-11-14 09:50:20 +10:00
parent 698c53f25f
commit e0ec79c7d5
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ You are Codex, based on GPT-5. You are running as a coding agent in the Codex CL
* If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
* If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
* If the changes are in unrelated files, just ignore them and don't revert them.
- Do not amend a commit unless explicitly requested to do so.
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
@@ -103,4 +104,4 @@ You are producing plain text that will later be styled by the CLI. Follow these
* Line/column (1‑based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
* Do not use URIs like file://, vscode://, or https://.
* Do not provide range of lines
* Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5
* Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5
+1 -1
View File
@@ -521,7 +521,7 @@ mod tests {
},
InstructionsTestCase {
slug: "gpt-5.1",
expects_apply_patch_instructions: true,
expects_apply_patch_instructions: false,
},
InstructionsTestCase {
slug: "codex-mini-latest",
+2 -1
View File
@@ -109,13 +109,14 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
supports_reasoning_summaries: true,
reasoning_summary_format: ReasoningSummaryFormat::Experimental,
base_instructions: GPT_5_CODEX_INSTRUCTIONS.to_string(),
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
)
} else if slug.starts_with("gpt-5.1") {
model_family!(
slug, "gpt-5.1",
supports_reasoning_summaries: true,
needs_special_apply_patch_instructions: true,
base_instructions: GPT_5_1_INSTRUCTIONS.to_string(),
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
)
} else if slug.starts_with("gpt-5") {
model_family!(