Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
21.88k stars 2.03k forks source link

An error occurred after commit #757

Closed ErykCh closed 4 months ago

ErykCh commented 4 months ago

Issue

Latest sources, an error occurred after commit

Exception in thread Thread-1686 (summarize_worker): Traceback (most recent call last): File "/home/eryk/micromamba/envs/genai/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/home/eryk/micromamba/envs/genai/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "/home/eryk/micromamba/envs/genai/lib/python3.12/site-packages/aider/coders/base_coder.py", line 688, in summarize_worker self.summarized_done_messages = self.summarizer.summarize(self.done_messages) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/eryk/micromamba/envs/genai/lib/python3.12/site-packages/aider/history.py", line 64, in summarize model_max_input_tokens = self.model.info.get("max_input_tokens", 4096) - 512


TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

### Version and model info

Aider v0.40.7-dev
Models: openrouter/anthropic/claude-3.5-sonnet with diff edit format, weak model openrouter/anthropic/claude-3-haiku
Git repo: .git with 36 files
Repo-map: using 2028 tokens
paul-gauthier commented 4 months ago

Thanks for trying aider and filing this issue. I'll fix this bug.

paul-gauthier commented 4 months ago

The change is available in the main branch. You can get it by installing the latest version from github:

python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git

If you have a chance to try it, let me know if it works better for you.

paul-gauthier commented 4 months ago

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.