Skip to content

Commit ea0afd5

Browse files
Merge remote-tracking branch 'upstream/main' into dev
2 parents b685689 + 7a1bd15 commit ea0afd5

25 files changed

Lines changed: 1371 additions & 593 deletions

HISTORY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Release history
22

3+
### main branch
4+
5+
- Added support for Claude 4.5/4.6 models and updated model aliases (sonnet/haiku/opus).
6+
- Expanded Gemini model support with 2.5 Flash and Flash‑Lite, added Gemini 3 preview models, and updated the flash alias to gemini/gemini-flash-latest.
7+
- Added DeepSeek Reasoner model and updated DeepSeek model metadata with costs and prompt caching.
8+
- Added BadGatewayError and ImageFetchError to handled exceptions.
9+
- Fixed exception mapping to only include real exception classes, avoiding runtime errors, by Claudia Pellegrino.
10+
- Repo map now tags Fortran, Haskell, Julia, and Zig and is compatible with newer tree-sitter Python APIs, by Varchas Gopalaswamy, Tim Put, and Mubashir Osmani.
11+
- Removed deprecated google-generativeai dependency to eliminate import warnings, by Mark McDonald.
12+
- Added settings for new OpenAI GPT‑5.1/5.2 and GPT‑5‑pro models across OpenAI, Azure, and OpenRouter, including chat and codex variants.
13+
- Changed the gemini alias to point to gemini/gemini-3-pro-preview.
14+
- Added support for OpenAI o1-pro model.
15+
- Aider wrote 57% of the code in this release.
16+
17+
### Aider v0.86.1
18+
19+
- Added a reasoning_effort setting for GPT-5 models and disabled temperature by default for the GPT-5 family.
20+
321
### Aider v0.86.0
422

523
- Expanded GPT-5 model support across family variants and providers (OpenAI, Azure, OpenRouter), including dated and chat/mini/nano variants.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cog.out(text)
2727
<a href="https://github.com/Aider-AI/aider/stargazers"><img alt="GitHub Stars" title="Total number of GitHub stars the Aider project has received"
2828
src="https://img.shields.io/github/stars/Aider-AI/aider?style=flat-square&logo=github&color=f1c40f&labelColor=555555"/></a>
2929
<a href="https://pypi.org/project/aider-chat/"><img alt="PyPI Downloads" title="Total number of installations via pip from PyPI"
30-
src="https://img.shields.io/badge/📦%20Installs-4.1M-2ecc71?style=flat-square&labelColor=555555"/></a>
30+
src="https://img.shields.io/badge/📦%20Installs-4.9M-2ecc71?style=flat-square&labelColor=555555"/></a>
3131
<img alt="Tokens per week" title="Number of tokens processed weekly by Aider users"
3232
src="https://img.shields.io/badge/📈%20Tokens%2Fweek-15B-3498db?style=flat-square&labelColor=555555"/>
3333
<a href="https://openrouter.ai/#options-menu"><img alt="OpenRouter Ranking" title="Aider's ranking among applications on the OpenRouter platform"

aider/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from packaging import version
22

3-
__version__ = "0.86.2.dev"
3+
__version__ = "0.86.3.dev"
44
safe_version = __version__
55

66
try:

aider/models.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,21 @@
7474
claude-3-5-sonnet-20241022
7575
claude-sonnet-4-20250514
7676
claude-opus-4-20250514
77+
claude-opus-4-6
78+
claude-sonnet-4-5
79+
claude-sonnet-4-5-20250929
80+
claude-haiku-4-5
81+
claude-haiku-4-5-20251001
7782
"""
7883

7984
ANTHROPIC_MODELS = [ln.strip() for ln in ANTHROPIC_MODELS.splitlines() if ln.strip()]
8085

8186
# Mapping of model aliases to their canonical names
8287
MODEL_ALIASES = {
8388
# Claude models
84-
"sonnet": "anthropic/claude-sonnet-4-20250514",
85-
"haiku": "claude-3-5-haiku-20241022",
86-
"opus": "claude-opus-4-20250514",
89+
"sonnet": "claude-sonnet-4-5",
90+
"haiku": "claude-haiku-4-5",
91+
"opus": "claude-opus-4-6",
8792
# GPT models
8893
"4": "gpt-4-0613",
8994
"4o": "gpt-4o",
@@ -93,7 +98,7 @@
9398
"3": "gpt-3.5-turbo",
9499
# Other models
95100
"deepseek": "deepseek/deepseek-chat",
96-
"flash": "gemini/gemini-2.5-flash",
101+
"flash": "gemini/gemini-flash-latest",
97102
"flash-lite": "gemini/gemini-2.5-flash-lite",
98103
"quasar": "openrouter/openrouter/quasar-alpha",
99104
"r1": "deepseek/deepseek-reasoner",
@@ -507,6 +512,21 @@ def apply_generic_model_settings(self, model):
507512
self.reminder = "sys"
508513
return # <--
509514

515+
if (
516+
"sonnet-4-5" in model
517+
or "opus-4-6" in model
518+
or "haiku-4-5" in model
519+
or "claude-sonnet-4-5" in model
520+
or "claude-opus-4-6" in model
521+
or "claude-haiku-4-5" in model
522+
):
523+
self.edit_format = "diff"
524+
self.use_repo_map = True
525+
self.examples_as_sys_msg = False
526+
if "thinking_tokens" not in self.accepts_settings:
527+
self.accepts_settings.append("thinking_tokens")
528+
return # <--
529+
510530
if "3-7-sonnet" in model:
511531
self.edit_format = "diff"
512532
self.use_repo_map = True

aider/repomap.py

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from pygments.lexers import guess_lexer_for_filename
1717
from pygments.token import Token
1818
from tqdm import tqdm
19+
from tree_sitter import Query
1920

2021
from aider.dump import dump
2122
from aider.special import filter_important_files
@@ -262,6 +263,19 @@ def get_tags(self, fname, rel_fname):
262263

263264
return data
264265

266+
def _run_captures(self, query: Query, node):
267+
# tree-sitter 0.23.2's python bindings had captures directly on the Query object
268+
# but 0.24.0 moved it to a separate QueryCursor class. Support both.
269+
if hasattr(query, "captures"):
270+
# Old API
271+
return query.captures(node)
272+
273+
# New API
274+
from tree_sitter import QueryCursor
275+
276+
cursor = QueryCursor(query)
277+
return cursor.captures(node)
278+
265279
def get_tags_raw(self, fname, rel_fname):
266280
lang = filename_to_lang(fname)
267281
if not lang:
@@ -285,17 +299,22 @@ def get_tags_raw(self, fname, rel_fname):
285299
tree = parser.parse(bytes(code, "utf-8"))
286300

287301
# Run the tags queries
288-
query = language.query(query_scm)
289-
captures = query.captures(tree.root_node)
302+
captures = self._run_captures(Query(language, query_scm), tree.root_node)
303+
304+
captures_by_tag = defaultdict(list)
305+
matches = []
306+
for tag, nodes in captures.items():
307+
for node in nodes:
308+
captures_by_tag[tag].append(node)
309+
captures_by_tag[tag].append(node)
310+
matches.append((node, tag))
290311

291-
saw = set()
292312
if USING_TSL_PACK:
293-
all_nodes = []
294-
for tag, nodes in captures.items():
295-
all_nodes += [(node, tag) for node in nodes]
313+
all_nodes = [(node, tag) for tag, nodes in captures_by_tag.items() for node in nodes]
296314
else:
297-
all_nodes = list(captures)
315+
all_nodes = matches
298316

317+
saw = set()
299318
for node, tag in all_nodes:
300319
if tag.startswith("name.definition."):
301320
kind = "def"

0 commit comments

Comments
 (0)