-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect handling of multiple edits to the same file when LLM skips filename for repeat blocks and uses block type specifiers #2959
Comments
To reproduce issue Aider-AI#2959
To reproduce issue Aider-AI#2959
To reproduce issue Aider-AI#2959
I did try to reproduce it here veridit@caf184f but the tests pass, and do not apply only the first edit, and I can not find any trace of |
The failure to edit files happens intermittently, here is another chat log showing the problem:
|
Thanks for trying aider and filing this issue.
https://aider.chat/docs/troubleshooting/edit-errors.html What model are you using? You shared all the announce lines but seem to have remove the model info. |
To reproduce issue Aider-AI#2959
I've used this model when experiencing the errors:
Notice that the problem doesn't seem to be malformed output from the LLM - or at least - the output I find in I made a test of the last example, using the same reply as found in the chat history, and the test passes. The test is here https://github.com/veridit/aider/blob/d61f7820db4fe7b40ca6153a8b9da85b6fda6f1d/tests/basic/test_coder.py#L612 Does aider modify the LLM output before writing it to the history? Meaning that LLM errors can not be found from in the history? You are right, I'm at the limit of what the models handle, but the handling of the LLM response seems incorrect. |
This looks like a dup of #2879. Please see the comments there for more information, and feel free to continue the discussion within that issue. I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue. |
Yes, it is clearly a duplicate of #2879 will continue there. |
Issue
Here is an example session where there are multiple edits to the same file, but aider thinks it is editing the
crystal
file.It seems that either aider should recognise that it is the same file being edited multiple times, i.e. the filename
cli/src/statbus.cr
is used continuously for multiple SEARCH/REPLACE blocks, or the edits should be discarded.You see from the history that there is confusion between the file name and the contents of the block (crystal code).
The current behaviour is incorrect as it makes a partial edit and then tries to make a new file
crystal
.So the essence of the problem is the LLM providing a type specifier for the SEARCH/REPLACE block and aider getting confused because of this.
Copy paste from the aider chat:
Relevant excerpt of .aider.chat.history.md
Version and model info
Aider v0.72.1
Model: with diff edit format
Git repo: .git with 1,387 files
Warning: For large repos, consider using --subtree-only and .aiderignore
See: https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo
Repo-map: using 4096 tokens, auto refresh
Warning: map-tokens > 2048 is not recommended. Too much irrelevant code can confuse LLMs.
Added cli/src/statbus.cr to the chat.
Added app/CONVENTIONS.md to the chat (read-only).
Restored previous conversation history.
The text was updated successfully, but these errors were encountered: