diff --git a/aider/help_pats.py b/aider/help_pats.py index 546517d66b2..129eed983e7 100644 --- a/aider/help_pats.py +++ b/aider/help_pats.py @@ -13,7 +13,7 @@ ".jekyll-metadata", "Gemfile.lock", "Gemfile", - "_config.yml", + "_.aider\config.yml", "**/OLD/**", "OLD/**", ] diff --git a/aider/main.py b/aider/main.py index afb3f836624..72a41dc41d2 100644 --- a/aider/main.py +++ b/aider/main.py @@ -712,7 +712,7 @@ def get_io(pretty): # We can't know the git repo for sure until after parsing the args. # If we guessed wrong, reparse because that changes things like - # the location of the config.yml and history files. + # the location of the .aider\config.yml and history files. if args.git and not force_git_root and git is not None: right_repo_root = guessed_wrong_repo(io, git_root, fnames, git_dname) if right_repo_root: diff --git a/aider/models.py b/aider/models.py index 4a5d86a6975..d637514cd82 100644 --- a/aider/models.py +++ b/aider/models.py @@ -569,20 +569,24 @@ def get_weak_model(self, provided_weak_model_name): if provided_weak_model_name: self.weak_model_name = provided_weak_model_name - if not self.weak_model_name: - self.weak_model = self - return + if not self.weak_model_name or self.weak_model_name == self.name: + self.weak_model = self + return self.weak_model - if self.weak_model_name == self.name: + try: + self.weak_model = Model( + self.weak_model_name, + weak_model=False, + ) + except Exception as e: + # If the model is not found (404 error), fall back gracefully + print(f"Warning: Could not load weak model '{self.weak_model_name}'. Falling back to main model. Error: {e}") self.weak_model = self - return - self.weak_model = Model( - self.weak_model_name, - weak_model=False, - ) return self.weak_model + + def commit_message_models(self): return [self.weak_model, self] diff --git a/aider/special.py b/aider/special.py index 77faa58b1e0..9be2540653a 100644 --- a/aider/special.py +++ b/aider/special.py @@ -108,7 +108,7 @@ "bitbucket-pipelines.yml", "appveyor.yml", "circle.yml", - ".circleci/config.yml", + ".circleci/.aider\config.yml", ".github/dependabot.yml", "codecov.yml", ".coveragerc", @@ -156,7 +156,7 @@ "codecov.yml", # Documentation "mkdocs.yml", - "_config.yml", + "_.aider\config.yml", "book.toml", "readthedocs.yml", ".readthedocs.yaml", diff --git a/chat b/chat new file mode 100644 index 00000000000..e69de29bb2d diff --git a/init b/init new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/basic/test_find_or_blocks.py b/tests/basic/test_find_or_blocks.py index dbaddc2b097..7d7e7720efb 100755 --- a/tests/basic/test_find_or_blocks.py +++ b/tests/basic/test_find_or_blocks.py @@ -73,7 +73,7 @@ def process_markdown(filename, fh): class TestFindOrBlocks(unittest.TestCase): def test_process_markdown(self): # Path to the input markdown file - input_file = "tests/fixtures/chat-history.md" + input_file = "tests/fixtures/.aider\chat-history.md" # Path to the expected output file expected_output_file = "tests/fixtures/chat-history-search-replace-gold.txt"