Skip to content

Commit

Permalink
Merge branch 'main' into cedarscript
Browse files Browse the repository at this point in the history
  • Loading branch information
elifarley authored Nov 15, 2024
2 parents 1a7a749 + 0bf17a4 commit 5806faf
Show file tree
Hide file tree
Showing 15 changed files with 269 additions and 223 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ pytest
You can also run specific test files or test cases by providing the file path or test name:

```
pytest aider/tests/test_coder.py
pytest aider/tests/test_coder.py::TestCoder::test_specific_case
pytest tests/basic/test_coder.py
pytest tests/basic/test_coder.py::TestCoder::test_specific_case
```

#### Continuous Integration
Expand Down
12 changes: 12 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@

# Release history

### main branch

- Fixed bug in fuzzy model name matching when litellm provider info is missing.
- Modified model metadata file loading to allow override of resource file.
- Allow recursive loading of dirs using `--read`.
- Updated dependency versions to pick up litellm fix for ollama models.

### Aider v0.63.1

- Fixed bug in git ignored file handling.
- Improved error handling for git operations.

### Aider v0.63.0

- Support for Qwen 2.5 Coder 32B.
Expand Down
2 changes: 1 addition & 1 deletion aider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
try:
from aider.__version__ import __version__
except Exception:
__version__ = "0.63.1.dev"
__version__ = "0.63.2.dev"

__all__ = [__version__]
24 changes: 11 additions & 13 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,19 +1247,10 @@ def send_message(self, inp):
else:
content = ""

if not interrupted:
add_rel_files_message = self.check_for_file_mentions(content)
if add_rel_files_message:
if self.reflected_message:
self.reflected_message += "\n\n" + add_rel_files_message
else:
self.reflected_message = add_rel_files_message
return

try:
self.reply_completed()
except KeyboardInterrupt:
interrupted = True
try:
self.reply_completed()
except KeyboardInterrupt:
interrupted = True

if interrupted:
content += "\n^C KeyboardInterrupt"
Expand Down Expand Up @@ -1310,6 +1301,13 @@ def send_message(self, inp):
self.update_cur_messages()
return

add_rel_files_message = self.check_for_file_mentions(content)
if add_rel_files_message:
if self.reflected_message:
self.reflected_message += "\n\n" + add_rel_files_message
else:
self.reflected_message = add_rel_files_message

def reply_completed(self):
pass

Expand Down
17 changes: 13 additions & 4 deletions aider/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,16 @@ def load_dotenv_files(git_root, dotenv_fname, encoding="utf-8"):


def register_litellm_models(git_root, model_metadata_fname, io, verbose=False):
model_metatdata_files = generate_search_path_list(
".aider.model.metadata.json", git_root, model_metadata_fname
)
model_metatdata_files = []

# Add the resource file path
resource_metadata = importlib_resources.files("aider.resources").joinpath("model-metadata.json")
model_metatdata_files.append(str(resource_metadata))

model_metatdata_files += generate_search_path_list(
".aider.model.metadata.json", git_root, model_metadata_fname
)

try:
model_metadata_files_loaded = models.register_litellm_models(model_metatdata_files)
if len(model_metadata_files_loaded) > 0 and verbose:
Expand Down Expand Up @@ -540,7 +542,14 @@ def get_io(pretty):

all_files = args.files + (args.file or [])
fnames = [str(Path(fn).resolve()) for fn in all_files]
read_only_fnames = [str(Path(fn).resolve()) for fn in (args.read or [])]
read_only_fnames = []
for fn in args.read or []:
path = Path(fn).resolve()
if path.is_dir():
read_only_fnames.extend(str(f) for f in path.rglob("*") if f.is_file())
else:
read_only_fnames.append(str(path))

if len(all_files) > 1:
good = True
for fname in all_files:
Expand Down
5 changes: 4 additions & 1 deletion aider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,10 @@ def fuzzy_match_models(name):
model = model.lower()
if attrs.get("mode") != "chat":
continue
provider = (attrs["litellm_provider"] + "/").lower()
provider = attrs.get("litellm_provider", "").lower()
if not provider:
continue
provider += "/"

if model.startswith(provider):
fq_model = model
Expand Down
7 changes: 5 additions & 2 deletions aider/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,11 @@ def refresh_aider_ignore(self):
def git_ignored_file(self, path):
if not self.repo:
return
if self.repo.ignored(path):
return True
try:
if self.repo.ignored(path):
return True
except ANY_GIT_ERROR:
return False

def ignored_file(self, fname):
self.refresh_aider_ignore()
Expand Down
12 changes: 12 additions & 0 deletions aider/website/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ cog.out(text)



### main branch

- Fixed bug in fuzzy model name matching when litellm provider info is missing.
- Modified model metadata file loading to allow override of resource file.
- Allow recursive loading of dirs using `--read`.
- Updated dependency versions to pick up litellm fix for ollama models.

### Aider v0.63.1

- Fixed bug in git ignored file handling.
- Improved error handling for git operations.

### Aider v0.63.0

- Support for Qwen 2.5 Coder 32B.
Expand Down
Loading

0 comments on commit 5806faf

Please sign in to comment.