aider icon indicating copy to clipboard operation
aider copied to clipboard

Restoring chat history leads to error / chat history summarization not working

Open LeoLee53 opened this issue 1 year ago • 4 comments

Issue

I have a chat history file that's quite long (80k tokens) but offers lots of valuable information about the project I'm building. It worked fine last week when I use model that has large context window like gemini-2.0-flash-exp, today I updated it and tried to run it and I get this. Not including the chat history would solve the problem but I need it.

Here's the error

litellm.InternalServerError: VertexAIException InternalServerError - {
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

The API provider's servers are down or overloaded.

Also in terms of chat history summarization, I see in the .aider.conf file template that weak model is used for parts that exceeded the chat history token limit, which doesn't work because I set it to the same gemini model and main model to deep seek chat v3 and it still gives me the same error.

Version and model info

Aider v0.72.2 Model: gemini/gemini-2.0-flash-exp with diff edit format Git repo: .git with 31 files Repo-map: using 4096 tokens, files refresh Added conversation_style.md to the chat (read-only). Added design_principle.md to the chat (read-only). Restored previous conversation history.

LeoLee53 avatar Jan 23 '25 22:01 LeoLee53

Thanks for trying aider and filing this issue.

Your API provider's servers are down or overloaded.

paul-gauthier avatar Jan 24 '25 17:01 paul-gauthier

@paul-gauthier hi thanks for reply. I guess I gotta assume that this is simply an issue on Google’s side.

About the chat history summary tho can you clarify how exactly that works? I used the restore chat history setting so model can read previous chat and start where we left off. I haven’t been able to get the summary to work. Here are my two main confusions:

  1. Setting max chat history token doesn’t seem to work in the way I thought it would. I thought say a setting of 6000 would make aider submit the latest 6000 token along with summarise the rest. It doesn’t seem to be the case. The whole chat would still be submitted.
  2. setting weak model doesn’t seem to do anything for chat summarise. I use Gemini-2.0-flash-exp which has huge context window as weak model, thinking that would allow me to submit my whole 80k chat history since parts that exceed the limit would be summarised anyway, while also allowing me to use a main model that’s more capable but had smaller context window but it doesn’t seem to work that way. I’ve done some research in the documentation and googled a lot and couldn’t seem to find the answer.

I would really appreciate some clarification cause I really don’t want to have to rebuilt the context every time I start a new session with the same project. Thanks a lot.

LeoLee53 avatar Jan 24 '25 22:01 LeoLee53

I'm labeling this issue as stale because it has been open for 2 weeks with no activity. If there are no additional comments, I will close it in 7 days.

Note: A bot script made these updates to the issue.

github-actions[bot] avatar Feb 08 '25 00:02 github-actions[bot]

I'm closing this issue because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue at any time.

Note: A bot script made these updates to the issue.

github-actions[bot] avatar Feb 15 '25 12:02 github-actions[bot]