The model uses a SPM (suffix-prefix-middle) style prompt with git-merge-style markers for the editable region:
Here is a minimal example:
<[fim-suffix]>
code after editable region
<[fim-prefix]><filename>related/file.py
related file content
<filename>edit_history
--- a/some_file.py
+++ b/some_file.py
-old
+new
<filename>path/to/target_file.py
code before editable region
<<<<<<< CURRENT
code that
needs to<|user_cursor|>
be rewritten
=======
<[fim-middle]>
Expected output (should be generated by the model, without backticks):
revised content for
the editable region
>>>>>>> UPDATED