mirror of
https://github.com/Aider-AI/aider
synced 2026-04-26 01:25:17 +02:00
Compare commits
113 Commits
v0.74.1.de
...
v0.75.1.de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5cf0b6ef5 | ||
|
|
506280d645 | ||
|
|
2f79b4fde7 | ||
|
|
846f98628d | ||
|
|
eed9be5a9e | ||
|
|
27c77afafc | ||
|
|
c156b2f817 | ||
|
|
96fcc5df6b | ||
|
|
3c775fd5de | ||
|
|
75e9ee6528 | ||
|
|
ea0ee96398 | ||
|
|
3fd4a2841a | ||
|
|
6ecf44c87a | ||
|
|
031e8cea6e | ||
|
|
757fbb0124 | ||
|
|
d65e3f73df | ||
|
|
5b13105d58 | ||
|
|
c8745afb37 | ||
|
|
85189c0bde | ||
|
|
a8635bade2 | ||
|
|
4560572ff2 | ||
|
|
c7fa57fd14 | ||
|
|
54965fdf2e | ||
|
|
30361aa685 | ||
|
|
8be93b72c4 | ||
|
|
c7e9d645e5 | ||
|
|
fe6a3c89f3 | ||
|
|
686a32cbc0 | ||
|
|
55d7397ff5 | ||
|
|
3714d554df | ||
|
|
0415de853b | ||
|
|
0ba1e8f904 | ||
|
|
58bfcb0953 | ||
|
|
fa281d89d2 | ||
|
|
908b10dae0 | ||
|
|
ea03f9def0 | ||
|
|
3510799fca | ||
|
|
1f4a63d6db | ||
|
|
dd94a444d2 | ||
|
|
50fafc9ff6 | ||
|
|
47fc6a689d | ||
|
|
86175a1827 | ||
|
|
6d6e25df4e | ||
|
|
5402ed112c | ||
|
|
235b83d02e | ||
|
|
6ffbec969a | ||
|
|
185ea71646 | ||
|
|
69fcc3acd7 | ||
|
|
da94cf4aab | ||
|
|
8799cf95b4 | ||
|
|
108ce18d51 | ||
|
|
f67ea5d010 | ||
|
|
dd857aeccf | ||
|
|
44b1acd385 | ||
|
|
b2f6018e05 | ||
|
|
bca6507f11 | ||
|
|
30332c2ba5 | ||
|
|
17919d7503 | ||
|
|
42237ced80 | ||
|
|
737021ccdf | ||
|
|
22ed9d8d7c | ||
|
|
49dcd11813 | ||
|
|
7c30086d78 | ||
|
|
e2dbfdc537 | ||
|
|
674eb109c2 | ||
|
|
927b5bc8cc | ||
|
|
f7dd0fc582 | ||
|
|
35f30bde04 | ||
|
|
a682b50fd4 | ||
|
|
3b5024749f | ||
|
|
2a56d892d7 | ||
|
|
e3d5eaf388 | ||
|
|
5d1f50117b | ||
|
|
f6a2ec15d7 | ||
|
|
64a8d56725 | ||
|
|
71caea32e7 | ||
|
|
17993ef9ff | ||
|
|
b0aa4ef4c8 | ||
|
|
5c4aaa27d9 | ||
|
|
53586d95d0 | ||
|
|
3877ab1f00 | ||
|
|
2425322e8d | ||
|
|
3f80a113d1 | ||
|
|
9ad20849d3 | ||
|
|
c8c58280d8 | ||
|
|
d40505cd16 | ||
|
|
25c5f84090 | ||
|
|
a58293f04b | ||
|
|
1408fb41b8 | ||
|
|
cb7cb8e527 | ||
|
|
d750dbc703 | ||
|
|
91b417138a | ||
|
|
db5eabd927 | ||
|
|
cbcc0fde04 | ||
|
|
cca3b98a09 | ||
|
|
e63b8ff35d | ||
|
|
b6a37bf0e2 | ||
|
|
249ca4fd75 | ||
|
|
d382869b98 | ||
|
|
41a3c27aba | ||
|
|
af48c46c30 | ||
|
|
52bc51a197 | ||
|
|
57ca9cc840 | ||
|
|
56d6a47ad3 | ||
|
|
b806360a49 | ||
|
|
739a88ed00 | ||
|
|
38d4341e59 | ||
|
|
6118d91922 | ||
|
|
71ac7efafe | ||
|
|
cf0710225c | ||
|
|
21e96df85a | ||
|
|
ee837889db | ||
|
|
a5f4cba72f |
27
HISTORY.md
27
HISTORY.md
@@ -1,9 +1,34 @@
|
||||
# Release history
|
||||
|
||||
### Aider v0.75.0
|
||||
|
||||
- Basic support for Claude 3.7 Sonnet
|
||||
- Use `--model sonnet` to use the new 3.7
|
||||
- Thinking support coming soon.
|
||||
- Bugfix to `/editor` command.
|
||||
|
||||
### Aider v0.74.3
|
||||
|
||||
- Downgrade streamlit dependency to avoid threading bug.
|
||||
- Added support for tree-sitter language pack.
|
||||
- Added openrouter/o3-mini-high model configuration.
|
||||
- Added build.gradle.kts to special files for Kotlin project support, by Lucas Shadler.
|
||||
|
||||
### Aider v0.74.2
|
||||
|
||||
- Prevent more than one cache warming thread from becoming active.
|
||||
- Fixed continuation prompt ". " for multiline input.
|
||||
- Added HCL (Terraform) syntax support, by Warren Krewenki.
|
||||
|
||||
### Aider v0.74.1
|
||||
|
||||
- Have o1 & o3-mini generate markdown by sending the magic "Formatting re-enabled." string.
|
||||
- Bugfix for multi-line inputs, which should not include the ". " continuation prompt.
|
||||
|
||||
### Aider v0.74.0
|
||||
|
||||
- Dynamically changes the Ollama context window to hold the current chat.
|
||||
- Better support for o3-mini, DeepSeek V3 & R1, o1-mini, o1 via secondary API providers.
|
||||
- Better support for o3-mini, DeepSeek V3 & R1, o1-mini, o1 especially via third-party API providers.
|
||||
- Remove `<think>` tags from R1 responses for commit messages (and other weak model uses).
|
||||
- Can now specify `use_temperature: <float>` in model settings, not just true/false.
|
||||
- The full docker container now includes `boto3` for Bedrock.
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
Aider lets you pair program with LLMs,
|
||||
to edit code in your local git repository.
|
||||
Start a new project or work with an existing code base.
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek V3, o1 & GPT-4o and can [connect to almost any LLM](https://aider.chat/docs/llms.html).
|
||||
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o. Aider can [connect to almost any LLM, including local models](https://aider.chat/docs/llms.html).
|
||||
|
||||
<!-- SCREENCAST START -->
|
||||
<p align="center">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from packaging import version
|
||||
|
||||
__version__ = "0.74.1.dev"
|
||||
__version__ = "0.75.1.dev"
|
||||
safe_version = __version__
|
||||
|
||||
try:
|
||||
|
||||
@@ -46,7 +46,7 @@ def get_parser(default_config_files, git_root):
|
||||
const=opus_model,
|
||||
help=f"Use {opus_model} model for the main chat",
|
||||
)
|
||||
sonnet_model = "claude-3-5-sonnet-20241022"
|
||||
sonnet_model = "anthropic/claude-3-7-sonnet-20250219"
|
||||
group.add_argument(
|
||||
"--sonnet",
|
||||
action="store_const",
|
||||
@@ -823,6 +823,12 @@ def get_parser(default_config_files, git_root):
|
||||
"--editor",
|
||||
help="Specify which editor to use for the /editor command",
|
||||
)
|
||||
group.add_argument(
|
||||
"--install-tree-sitter-language-pack",
|
||||
action="store_true",
|
||||
help="Install the tree_sitter_language_pack (experimental)",
|
||||
default=False,
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ class Coder:
|
||||
use_kwargs.update(kwargs) # override passed kwargs
|
||||
|
||||
kwargs = use_kwargs
|
||||
from_coder.ok_to_warm_cache = False
|
||||
|
||||
for coder in coders.__all__:
|
||||
if hasattr(coder, "edit_format") and coder.edit_format == edit_format:
|
||||
@@ -264,6 +265,8 @@ class Coder:
|
||||
|
||||
return lines
|
||||
|
||||
ok_to_warm_cache = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
main_model,
|
||||
@@ -1077,6 +1080,10 @@ class Coder:
|
||||
shell_cmd_reminder=shell_cmd_reminder,
|
||||
language=language,
|
||||
)
|
||||
|
||||
if self.main_model.system_prompt_prefix:
|
||||
prompt = self.main_model.system_prompt_prefix + prompt
|
||||
|
||||
return prompt
|
||||
|
||||
def format_chat_chunks(self):
|
||||
@@ -1196,8 +1203,11 @@ class Coder:
|
||||
return
|
||||
if not self.num_cache_warming_pings:
|
||||
return
|
||||
if not self.ok_to_warm_cache:
|
||||
return
|
||||
|
||||
delay = 5 * 60 - 5
|
||||
delay = float(os.environ.get("AIDER_CACHE_KEEPALIVE_DELAY", delay))
|
||||
self.next_cache_warm = time.time() + delay
|
||||
self.warming_pings_left = self.num_cache_warming_pings
|
||||
self.cache_warming_chunks = chunks
|
||||
@@ -1206,7 +1216,7 @@ class Coder:
|
||||
return
|
||||
|
||||
def warm_cache_worker():
|
||||
while True:
|
||||
while self.ok_to_warm_cache:
|
||||
time.sleep(1)
|
||||
if self.warming_pings_left <= 0:
|
||||
continue
|
||||
@@ -1531,6 +1541,10 @@ class Coder:
|
||||
|
||||
return res
|
||||
|
||||
def __del__(self):
|
||||
"""Cleanup when the Coder object is destroyed."""
|
||||
self.ok_to_warm_cache = False
|
||||
|
||||
def add_assistant_reply_to_cur_messages(self):
|
||||
if self.partial_response_content:
|
||||
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
|
||||
|
||||
@@ -404,6 +404,7 @@ class Commands:
|
||||
|
||||
fence = "`" * 3
|
||||
|
||||
file_res = []
|
||||
# files
|
||||
for fname in self.coder.abs_fnames:
|
||||
relative_fname = self.coder.get_rel_fname(fname)
|
||||
@@ -414,7 +415,7 @@ class Commands:
|
||||
# approximate
|
||||
content = f"{relative_fname}\n{fence}\n" + content + "{fence}\n"
|
||||
tokens = self.coder.main_model.token_count(content)
|
||||
res.append((tokens, f"{relative_fname}", "/drop to remove"))
|
||||
file_res.append((tokens, f"{relative_fname}", "/drop to remove"))
|
||||
|
||||
# read-only files
|
||||
for fname in self.coder.abs_read_only_fnames:
|
||||
@@ -424,7 +425,10 @@ class Commands:
|
||||
# approximate
|
||||
content = f"{relative_fname}\n{fence}\n" + content + "{fence}\n"
|
||||
tokens = self.coder.main_model.token_count(content)
|
||||
res.append((tokens, f"{relative_fname} (read-only)", "/drop to remove"))
|
||||
file_res.append((tokens, f"{relative_fname} (read-only)", "/drop to remove"))
|
||||
|
||||
file_res.sort()
|
||||
res.extend(file_res)
|
||||
|
||||
self.io.tool_output(
|
||||
f"Approximate context window usage for {self.coder.main_model.name}, in tokens:"
|
||||
|
||||
@@ -10,12 +10,13 @@ This module provides functionality to:
|
||||
|
||||
import os
|
||||
import platform
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from aider.dump import dump # noqa
|
||||
|
||||
DEFAULT_EDITOR_NIX = "vi"
|
||||
DEFAULT_EDITOR_OS_X = "vim"
|
||||
DEFAULT_EDITOR_WINDOWS = "notepad"
|
||||
@@ -87,13 +88,13 @@ def get_environment_editor(default=None):
|
||||
|
||||
def discover_editor(editor_override=None):
|
||||
"""
|
||||
Discovers and returns the appropriate editor command as a list of arguments.
|
||||
Discovers and returns the appropriate editor command.
|
||||
|
||||
Handles cases where the editor command includes arguments, including quoted arguments
|
||||
with spaces (e.g. 'vim -c "set noswapfile"').
|
||||
|
||||
:return: A list of command parts ready for subprocess execution
|
||||
:rtype: list[str]
|
||||
:return: The editor command as a string
|
||||
:rtype: str
|
||||
"""
|
||||
system = platform.system()
|
||||
if system == "Windows":
|
||||
@@ -102,14 +103,13 @@ def discover_editor(editor_override=None):
|
||||
default_editor = DEFAULT_EDITOR_OS_X
|
||||
else:
|
||||
default_editor = DEFAULT_EDITOR_NIX
|
||||
|
||||
if editor_override:
|
||||
editor = editor_override
|
||||
else:
|
||||
editor = get_environment_editor(default_editor)
|
||||
try:
|
||||
return shlex.split(editor)
|
||||
except ValueError as e:
|
||||
raise RuntimeError(f"Invalid editor command format '{editor}': {e}")
|
||||
|
||||
return editor
|
||||
|
||||
|
||||
def pipe_editor(input_data="", suffix=None, editor=None):
|
||||
@@ -128,9 +128,10 @@ def pipe_editor(input_data="", suffix=None, editor=None):
|
||||
:rtype: str
|
||||
"""
|
||||
filepath = write_temp_file(input_data, suffix)
|
||||
command_parts = discover_editor(editor)
|
||||
command_parts.append(filepath)
|
||||
subprocess.call(command_parts)
|
||||
command_str = discover_editor(editor)
|
||||
command_str += " " + filepath
|
||||
|
||||
subprocess.call(command_str, shell=True)
|
||||
with open(filepath, "r") as f:
|
||||
output_data = f.read()
|
||||
try:
|
||||
|
||||
@@ -504,7 +504,7 @@ class InputOutput:
|
||||
"Handle Enter key press"
|
||||
if self.multiline_mode:
|
||||
# In multiline mode, Enter adds a newline
|
||||
event.current_buffer.insert_text("\n. ")
|
||||
event.current_buffer.insert_text("\n")
|
||||
else:
|
||||
# In normal mode, Enter submits
|
||||
event.current_buffer.validate_and_handle()
|
||||
@@ -517,7 +517,7 @@ class InputOutput:
|
||||
event.current_buffer.validate_and_handle()
|
||||
else:
|
||||
# In normal mode, Alt+Enter adds a newline
|
||||
event.current_buffer.insert_text("\n. ")
|
||||
event.current_buffer.insert_text("\n")
|
||||
|
||||
while True:
|
||||
if multiline_input:
|
||||
@@ -536,6 +536,9 @@ class InputOutput:
|
||||
if self.clipboard_watcher:
|
||||
self.clipboard_watcher.start()
|
||||
|
||||
def get_continuation(width, line_number, is_soft_wrap):
|
||||
return ". "
|
||||
|
||||
line = self.prompt_session.prompt(
|
||||
show,
|
||||
default=default,
|
||||
@@ -545,6 +548,7 @@ class InputOutput:
|
||||
style=style,
|
||||
key_bindings=kb,
|
||||
complete_while_typing=True,
|
||||
prompt_continuation=get_continuation,
|
||||
)
|
||||
else:
|
||||
line = input(show)
|
||||
|
||||
@@ -8,7 +8,7 @@ from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from grep_ast import TreeContext, filename_to_lang
|
||||
from tree_sitter_languages import get_parser # noqa: E402
|
||||
from grep_ast.tsl import get_parser # noqa: E402
|
||||
|
||||
from aider.dump import dump # noqa: F401
|
||||
from aider.run_cmd import run_cmd_subprocess # noqa: F401
|
||||
|
||||
@@ -214,6 +214,18 @@ def check_streamlit_install(io):
|
||||
)
|
||||
|
||||
|
||||
def install_tree_sitter_language_pack(io):
|
||||
return utils.check_pip_install_extra(
|
||||
io,
|
||||
"tree_sitter_language_pack",
|
||||
"Install tree_sitter_language_pack?",
|
||||
[
|
||||
"tree-sitter-language-pack==0.4.0",
|
||||
"tree-sitter==0.24.0",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
def write_streamlit_credentials():
|
||||
from streamlit.file_util import get_streamlit_file_path
|
||||
|
||||
@@ -706,6 +718,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
analytics.event("exit", reason="Upgrade completed")
|
||||
return 0 if success else 1
|
||||
|
||||
if args.install_tree_sitter_language_pack:
|
||||
success = install_tree_sitter_language_pack(io)
|
||||
analytics.event("exit", reason="Install TSLP completed")
|
||||
return 0 if success else 1
|
||||
|
||||
if args.check_update:
|
||||
check_version(io, verbose=args.verbose)
|
||||
|
||||
@@ -1060,10 +1077,13 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
|
||||
while True:
|
||||
try:
|
||||
coder.ok_to_warm_cache = bool(args.cache_keepalive_pings)
|
||||
coder.run()
|
||||
analytics.event("exit", reason="Completed main CLI coder.run")
|
||||
return
|
||||
except SwitchCoder as switch:
|
||||
coder.ok_to_warm_cache = False
|
||||
|
||||
kwargs = dict(io=io, from_coder=coder)
|
||||
kwargs.update(switch.kwargs)
|
||||
if "show_announcements" in kwargs:
|
||||
|
||||
@@ -76,7 +76,7 @@ ANTHROPIC_MODELS = [ln.strip() for ln in ANTHROPIC_MODELS.splitlines() if ln.str
|
||||
# Mapping of model aliases to their canonical names
|
||||
MODEL_ALIASES = {
|
||||
# Claude models
|
||||
"sonnet": "claude-3-5-sonnet-20241022",
|
||||
"sonnet": "anthropic/claude-3-7-sonnet-20250219",
|
||||
"haiku": "claude-3-5-haiku-20241022",
|
||||
"opus": "claude-3-opus-20240229",
|
||||
# GPT models
|
||||
@@ -114,6 +114,7 @@ class ModelSettings:
|
||||
editor_model_name: Optional[str] = None
|
||||
editor_edit_format: Optional[str] = None
|
||||
remove_reasoning: Optional[str] = None
|
||||
system_prompt_prefix: Optional[str] = None
|
||||
|
||||
|
||||
# Load model settings from package resource
|
||||
@@ -294,6 +295,7 @@ class Model(ModelSettings):
|
||||
self.edit_format = "diff"
|
||||
self.use_repo_map = True
|
||||
self.use_temperature = False
|
||||
self.system_prompt_prefix = "Formatting re-enabled. "
|
||||
return # <--
|
||||
|
||||
if "/o1-mini" in model:
|
||||
@@ -314,6 +316,7 @@ class Model(ModelSettings):
|
||||
self.use_repo_map = True
|
||||
self.use_temperature = False
|
||||
self.streaming = False
|
||||
self.system_prompt_prefix = "Formatting re-enabled. "
|
||||
return # <--
|
||||
|
||||
if "deepseek" in model and "v3" in model:
|
||||
|
||||
88
aider/queries/tree-sitter-language-pack/javascript-tags.scm
Normal file
88
aider/queries/tree-sitter-language-pack/javascript-tags.scm
Normal file
@@ -0,0 +1,88 @@
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
(method_definition
|
||||
name: (property_identifier) @name.definition.method) @definition.method
|
||||
(#not-eq? @name.definition.method "constructor")
|
||||
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
||||
(#select-adjacent! @doc @definition.method)
|
||||
)
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
[
|
||||
(class
|
||||
name: (_) @name.definition.class)
|
||||
(class_declaration
|
||||
name: (_) @name.definition.class)
|
||||
] @definition.class
|
||||
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
||||
(#select-adjacent! @doc @definition.class)
|
||||
)
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
[
|
||||
(function_expression
|
||||
name: (identifier) @name.definition.function)
|
||||
(function_declaration
|
||||
name: (identifier) @name.definition.function)
|
||||
(generator_function
|
||||
name: (identifier) @name.definition.function)
|
||||
(generator_function_declaration
|
||||
name: (identifier) @name.definition.function)
|
||||
] @definition.function
|
||||
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
||||
(#select-adjacent! @doc @definition.function)
|
||||
)
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
(lexical_declaration
|
||||
(variable_declarator
|
||||
name: (identifier) @name.definition.function
|
||||
value: [(arrow_function) (function_expression)]) @definition.function)
|
||||
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
||||
(#select-adjacent! @doc @definition.function)
|
||||
)
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
(variable_declaration
|
||||
(variable_declarator
|
||||
name: (identifier) @name.definition.function
|
||||
value: [(arrow_function) (function_expression)]) @definition.function)
|
||||
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
||||
(#select-adjacent! @doc @definition.function)
|
||||
)
|
||||
|
||||
(assignment_expression
|
||||
left: [
|
||||
(identifier) @name.definition.function
|
||||
(member_expression
|
||||
property: (property_identifier) @name.definition.function)
|
||||
]
|
||||
right: [(arrow_function) (function_expression)]
|
||||
) @definition.function
|
||||
|
||||
(pair
|
||||
key: (property_identifier) @name.definition.function
|
||||
value: [(arrow_function) (function_expression)]) @definition.function
|
||||
|
||||
(
|
||||
(call_expression
|
||||
function: (identifier) @name.reference.call) @reference.call
|
||||
(#not-match? @name.reference.call "^(require)$")
|
||||
)
|
||||
|
||||
(call_expression
|
||||
function: (member_expression
|
||||
property: (property_identifier) @name.reference.call)
|
||||
arguments: (_) @reference.call)
|
||||
|
||||
(new_expression
|
||||
constructor: (_) @name.reference.class) @reference.class
|
||||
77
aider/queries/tree-sitter-languages/hcl-tags.scm
Normal file
77
aider/queries/tree-sitter-languages/hcl-tags.scm
Normal file
@@ -0,0 +1,77 @@
|
||||
;; Based on https://github.com/tree-sitter-grammars/tree-sitter-hcl/blob/main/make_grammar.js
|
||||
;; Which has Apache 2.0 License
|
||||
;; tags.scm for Terraform (tree-sitter-hcl)
|
||||
|
||||
; === Definitions: Terraform Blocks ===
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(string_lit (template_literal) @resource_type)
|
||||
(string_lit (template_literal) @name.definition.resource)
|
||||
(body) @definition.resource
|
||||
) (#eq? @block_type "resource")
|
||||
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(string_lit (template_literal) @name.definition.module)
|
||||
(body) @definition.module
|
||||
) (#eq? @block_type "module")
|
||||
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(string_lit (template_literal) @name.definition.variable)
|
||||
(body) @definition.variable
|
||||
) (#eq? @block_type "variable")
|
||||
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(string_lit (template_literal) @name.definition.output)
|
||||
(body) @definition.output
|
||||
) (#eq? @block_type "output")
|
||||
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(string_lit (template_literal) @name.definition.provider)
|
||||
(body) @definition.provider
|
||||
) (#eq? @block_type "provider")
|
||||
|
||||
(block
|
||||
(identifier) @block_type
|
||||
(body
|
||||
(attribute
|
||||
(identifier) @name.definition.local
|
||||
(expression) @definition.local
|
||||
)+
|
||||
)
|
||||
) (#eq? @block_type "locals")
|
||||
|
||||
; === References: Variables, Locals, Modules, Data, Resources ===
|
||||
((variable_expr) @ref_type
|
||||
(get_attr (identifier) @name.reference.variable)
|
||||
) @reference.variable
|
||||
(#eq? @ref_type "var")
|
||||
|
||||
((variable_expr) @ref_type
|
||||
(get_attr (identifier) @name.reference.local)
|
||||
) @reference.local
|
||||
(#eq? @ref_type "local")
|
||||
|
||||
((variable_expr) @ref_type
|
||||
(get_attr (identifier) @name.reference.module)
|
||||
) @reference.module
|
||||
(#eq? @ref_type "module")
|
||||
|
||||
((variable_expr) @ref_type
|
||||
(get_attr (identifier) @data_source_type)
|
||||
(get_attr (identifier) @name.reference.data)
|
||||
) @reference.data
|
||||
(#eq? @ref_type "data")
|
||||
|
||||
((variable_expr) @resource_type
|
||||
(get_attr (identifier) @name.reference.resource)
|
||||
) @reference.resource
|
||||
(#not-eq? @resource_type "var")
|
||||
(#not-eq? @resource_type "local")
|
||||
(#not-eq? @resource_type "module")
|
||||
(#not-eq? @resource_type "data")
|
||||
(#not-eq? @resource_type "provider")
|
||||
(#not-eq? @resource_type "output")
|
||||
@@ -23,7 +23,7 @@ from aider.utils import Spinner
|
||||
|
||||
# tree_sitter is throwing a FutureWarning
|
||||
warnings.simplefilter("ignore", category=FutureWarning)
|
||||
from tree_sitter_languages import get_language, get_parser # noqa: E402
|
||||
from grep_ast.tsl import USING_TSL_PACK, get_language, get_parser # noqa: E402
|
||||
|
||||
Tag = namedtuple("Tag", "rel_fname fname line name kind".split())
|
||||
|
||||
@@ -31,8 +31,12 @@ Tag = namedtuple("Tag", "rel_fname fname line name kind".split())
|
||||
SQLITE_ERRORS = (sqlite3.OperationalError, sqlite3.DatabaseError, OSError)
|
||||
|
||||
|
||||
CACHE_VERSION = 3
|
||||
if USING_TSL_PACK:
|
||||
CACHE_VERSION = 4
|
||||
|
||||
|
||||
class RepoMap:
|
||||
CACHE_VERSION = 3
|
||||
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
||||
|
||||
warned_files = set()
|
||||
@@ -282,10 +286,15 @@ class RepoMap:
|
||||
query = language.query(query_scm)
|
||||
captures = query.captures(tree.root_node)
|
||||
|
||||
captures = list(captures)
|
||||
|
||||
saw = set()
|
||||
for node, tag in captures:
|
||||
if USING_TSL_PACK:
|
||||
all_nodes = []
|
||||
for tag, nodes in captures.items():
|
||||
all_nodes += [(node, tag) for node in nodes]
|
||||
else:
|
||||
all_nodes = list(captures)
|
||||
|
||||
for node, tag in all_nodes:
|
||||
if tag.startswith("name.definition."):
|
||||
kind = "def"
|
||||
elif tag.startswith("name.reference."):
|
||||
@@ -732,8 +741,27 @@ def get_random_color():
|
||||
|
||||
def get_scm_fname(lang):
|
||||
# Load the tags queries
|
||||
if USING_TSL_PACK:
|
||||
subdir = "tree-sitter-language-pack"
|
||||
try:
|
||||
path = resources.files(__package__).joinpath(
|
||||
"queries",
|
||||
subdir,
|
||||
f"{lang}-tags.scm",
|
||||
)
|
||||
if path.exists():
|
||||
return path
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
# Fall back to tree-sitter-languages
|
||||
subdir = "tree-sitter-languages"
|
||||
try:
|
||||
return resources.files(__package__).joinpath("queries", f"tree-sitter-{lang}-tags.scm")
|
||||
return resources.files(__package__).joinpath(
|
||||
"queries",
|
||||
subdir,
|
||||
f"{lang}-tags.scm",
|
||||
)
|
||||
except KeyError:
|
||||
return
|
||||
|
||||
|
||||
@@ -97,6 +97,22 @@
|
||||
"supports_system_messages": true,
|
||||
"supports_response_schema": true
|
||||
},
|
||||
"openrouter/openai/o3-mini-high": {
|
||||
"max_tokens": 100000,
|
||||
"max_input_tokens": 200000,
|
||||
"max_output_tokens": 100000,
|
||||
"input_cost_per_token": 0.0000011,
|
||||
"output_cost_per_token": 0.0000044,
|
||||
"cache_read_input_token_cost": 0.00000055,
|
||||
"litellm_provider": "openrouter",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_vision": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_response_schema": true
|
||||
},
|
||||
"openrouter/openai/gpt-4o-mini": {
|
||||
"max_tokens": 16384,
|
||||
"max_input_tokens": 128000,
|
||||
@@ -115,4 +131,44 @@
|
||||
"supports_prompt_caching": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"claude-3-7-sonnet-20250219": {
|
||||
"max_tokens": 8192,
|
||||
"max_input_tokens": 200000,
|
||||
"max_output_tokens": 8192,
|
||||
"input_cost_per_token": 0.000003,
|
||||
"output_cost_per_token": 0.000015,
|
||||
"cache_creation_input_token_cost": 0.00000375,
|
||||
"cache_read_input_token_cost": 0.0000003,
|
||||
"litellm_provider": "anthropic",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": true,
|
||||
"supports_vision": true,
|
||||
"tool_use_system_prompt_tokens": 159,
|
||||
"supports_assistant_prefill": true,
|
||||
"supports_pdf_input": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_response_schema": true,
|
||||
"deprecation_date": "2025-10-01",
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"anthropic/claude-3-7-sonnet-20250219": {
|
||||
"max_tokens": 8192,
|
||||
"max_input_tokens": 200000,
|
||||
"max_output_tokens": 8192,
|
||||
"input_cost_per_token": 0.000003,
|
||||
"output_cost_per_token": 0.000015,
|
||||
"cache_creation_input_token_cost": 0.00000375,
|
||||
"cache_read_input_token_cost": 0.0000003,
|
||||
"litellm_provider": "anthropic",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": true,
|
||||
"supports_vision": true,
|
||||
"tool_use_system_prompt_tokens": 159,
|
||||
"supports_assistant_prefill": true,
|
||||
"supports_pdf_input": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_response_schema": true,
|
||||
"deprecation_date": "2025-10-01",
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
}
|
||||
|
||||
@@ -184,6 +184,19 @@
|
||||
editor_model_name: anthropic/claude-3-5-sonnet-20241022
|
||||
editor_edit_format: editor-diff
|
||||
|
||||
- name: anthropic/claude-3-7-sonnet-20250219
|
||||
edit_format: diff
|
||||
weak_model_name: anthropic/claude-3-5-haiku-20241022
|
||||
use_repo_map: true
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
cache_control: true
|
||||
editor_model_name: anthropic/claude-3-7-sonnet-20250219
|
||||
editor_edit_format: editor-diff
|
||||
|
||||
- name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
|
||||
edit_format: diff
|
||||
weak_model_name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
|
||||
@@ -569,6 +582,7 @@
|
||||
streaming: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: openai/o1
|
||||
edit_format: diff
|
||||
@@ -578,6 +592,7 @@
|
||||
streaming: false
|
||||
editor_model_name: openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: o1
|
||||
edit_format: diff
|
||||
@@ -587,6 +602,7 @@
|
||||
streaming: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
edit_format: diff
|
||||
@@ -634,6 +650,7 @@
|
||||
use_temperature: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: o3-mini
|
||||
edit_format: diff
|
||||
@@ -642,6 +659,7 @@
|
||||
use_temperature: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: openrouter/openai/o3-mini
|
||||
edit_format: diff
|
||||
@@ -650,6 +668,16 @@
|
||||
use_temperature: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: openrouter/openai/o3-mini-high
|
||||
edit_format: diff
|
||||
weak_model_name: openrouter/openai/gpt-4o-mini
|
||||
use_repo_map: true
|
||||
use_temperature: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
- name: azure/o3-mini
|
||||
edit_format: diff
|
||||
@@ -658,5 +686,6 @@
|
||||
use_temperature: false
|
||||
editor_model_name: azure/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: "Formatting re-enabled. "
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ ROOT_IMPORTANT_FILES = [
|
||||
"composer.lock",
|
||||
"pom.xml",
|
||||
"build.gradle",
|
||||
"build.gradle.kts",
|
||||
"build.sbt",
|
||||
"go.mod",
|
||||
"go.sum",
|
||||
|
||||
@@ -23,10 +23,35 @@ cog.out(text)
|
||||
]]]-->
|
||||
|
||||
|
||||
### Aider v0.75.0
|
||||
|
||||
- Basic support for Claude 3.7 Sonnet
|
||||
- Use `--model sonnet` to use the new 3.7
|
||||
- Thinking support coming soon.
|
||||
- Bugfix to `/editor` command.
|
||||
|
||||
### Aider v0.74.3
|
||||
|
||||
- Downgrade streamlit dependency to avoid threading bug.
|
||||
- Added support for tree-sitter language pack.
|
||||
- Added openrouter/o3-mini-high model configuration.
|
||||
- Added build.gradle.kts to special files for Kotlin project support, by Lucas Shadler.
|
||||
|
||||
### Aider v0.74.2
|
||||
|
||||
- Prevent more than one cache warming thread from becoming active.
|
||||
- Fixed continuation prompt ". " for multiline input.
|
||||
- Added HCL (Terraform) syntax support, by Warren Krewenki.
|
||||
|
||||
### Aider v0.74.1
|
||||
|
||||
- Have o1 & o3-mini generate markdown by sending the magic "Formatting re-enabled." string.
|
||||
- Bugfix for multi-line inputs, which should not include the ". " continuation prompt.
|
||||
|
||||
### Aider v0.74.0
|
||||
|
||||
- Dynamically changes the Ollama context window to hold the current chat.
|
||||
- Better support for o3-mini, DeepSeek V3 & R1, o1-mini, o1 via secondary API providers.
|
||||
- Better support for o3-mini, DeepSeek V3 & R1, o1-mini, o1 especially via third-party API providers.
|
||||
- Remove `<think>` tags from R1 responses for commit messages (and other weak model uses).
|
||||
- Can now specify `use_temperature: <float>` in model settings, not just true/false.
|
||||
- The full docker container now includes `boto3` for Bedrock.
|
||||
|
||||
@@ -3167,8 +3167,8 @@
|
||||
malkoG: 83
|
||||
start_tag: v0.64.0
|
||||
total_lines: 670
|
||||
- aider_percentage: 81.65
|
||||
aider_total: 574
|
||||
- aider_percentage: 86.17
|
||||
aider_total: 841
|
||||
end_date: '2024-12-01'
|
||||
end_tag: v0.66.0
|
||||
file_counts:
|
||||
@@ -3240,18 +3240,52 @@
|
||||
Paul Gauthier (aider): 103
|
||||
tests/browser/test_browser.py:
|
||||
Paul Gauthier: 1
|
||||
tests/fixtures/languages/c/test.c:
|
||||
Paul Gauthier (aider): 6
|
||||
tests/fixtures/languages/cpp/test.cpp:
|
||||
Paul Gauthier (aider): 6
|
||||
tests/fixtures/languages/csharp/test.cs:
|
||||
Paul Gauthier (aider): 39
|
||||
tests/fixtures/languages/elisp/test.el:
|
||||
Paul Gauthier (aider): 25
|
||||
tests/fixtures/languages/elixir/test.ex:
|
||||
Paul Gauthier (aider): 5
|
||||
tests/fixtures/languages/elm/test.elm:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 37
|
||||
tests/fixtures/languages/go/test.go:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 41
|
||||
tests/fixtures/languages/java/test.java:
|
||||
Paul Gauthier: 2
|
||||
Paul Gauthier (aider): 14
|
||||
tests/fixtures/languages/javascript/test.js:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 25
|
||||
tests/fixtures/languages/ocaml/test.ml:
|
||||
Paul Gauthier: 2
|
||||
Paul Gauthier (aider): 17
|
||||
tests/fixtures/languages/php/test.php:
|
||||
Paul Gauthier (aider): 5
|
||||
tests/fixtures/languages/python/test.py:
|
||||
Paul Gauthier: 2
|
||||
Paul Gauthier (aider): 26
|
||||
tests/fixtures/languages/ql/test.ql:
|
||||
Paul Gauthier (aider): 3
|
||||
tests/fixtures/languages/ruby/test.rb:
|
||||
Paul Gauthier (aider): 3
|
||||
tests/fixtures/languages/rust/test.rs:
|
||||
Paul Gauthier (aider): 33
|
||||
tests/fixtures/languages/tsx/test.tsx:
|
||||
Paul Gauthier (aider): 30
|
||||
tests/fixtures/languages/typescript/test.ts:
|
||||
Paul Gauthier (aider): 3
|
||||
grand_total:
|
||||
Paul Gauthier: 99
|
||||
Paul Gauthier (aider): 574
|
||||
Paul Gauthier: 105
|
||||
Paul Gauthier (aider): 841
|
||||
Philippe de Reynal: 30
|
||||
start_tag: v0.65.0
|
||||
total_lines: 703
|
||||
total_lines: 976
|
||||
- aider_percentage: 67.86
|
||||
aider_total: 437
|
||||
end_date: '2024-12-06'
|
||||
@@ -3619,7 +3653,7 @@
|
||||
apaz-cli: 18
|
||||
start_tag: v0.70.0
|
||||
total_lines: 391
|
||||
- aider_percentage: 51.69
|
||||
- aider_percentage: 48.76
|
||||
aider_total: 138
|
||||
end_date: '2025-01-20'
|
||||
end_tag: v0.72.0
|
||||
@@ -3680,13 +3714,15 @@
|
||||
Paul Gauthier (aider): 39
|
||||
tests/basic/test_repomap.py:
|
||||
Paul Walker: 1
|
||||
tests/fixtures/languages/kotlin/test.kt:
|
||||
Paul Walker: 16
|
||||
grand_total:
|
||||
Paul Gauthier: 92
|
||||
Paul Gauthier (aider): 138
|
||||
Paul Walker: 28
|
||||
Paul Walker: 44
|
||||
Titusz Pan: 9
|
||||
start_tag: v0.71.0
|
||||
total_lines: 267
|
||||
total_lines: 283
|
||||
- aider_percentage: 69.44
|
||||
aider_total: 284
|
||||
end_date: '2025-01-31'
|
||||
@@ -3739,3 +3775,72 @@
|
||||
xqyz: 1
|
||||
start_tag: v0.72.0
|
||||
total_lines: 409
|
||||
- aider_percentage: 77.14
|
||||
aider_total: 604
|
||||
end_date: '2025-02-06'
|
||||
end_tag: v0.74.0
|
||||
file_counts:
|
||||
aider/__init__.py:
|
||||
Paul Gauthier: 1
|
||||
aider/args.py:
|
||||
Paul Gauthier: 1
|
||||
aider/coders/base_coder.py:
|
||||
Paul Gauthier: 24
|
||||
Paul Gauthier (aider): 9
|
||||
aider/coders/editblock_coder.py:
|
||||
Paul Gauthier: 5
|
||||
aider/coders/wholefile_coder.py:
|
||||
Paul Gauthier: 2
|
||||
aider/commands.py:
|
||||
Paul Gauthier: 1
|
||||
aider/exceptions.py:
|
||||
Paul Gauthier: 4
|
||||
Paul Gauthier (aider): 6
|
||||
aider/history.py:
|
||||
Paul Gauthier (aider): 1
|
||||
aider/io.py:
|
||||
Paul Gauthier: 4
|
||||
Paul Gauthier (aider): 18
|
||||
aider/llm.py:
|
||||
Paul Gauthier: 3
|
||||
aider/main.py:
|
||||
Paul Gauthier: 21
|
||||
Paul Gauthier (aider): 25
|
||||
aider/models.py:
|
||||
Paul Gauthier: 83
|
||||
Paul Gauthier (aider): 77
|
||||
aider/repo.py:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 2
|
||||
"Viktor Sz\xE9pe": 3
|
||||
aider/watch.py:
|
||||
Paul Gauthier (aider): 45
|
||||
benchmark/docker.sh:
|
||||
Paul Gauthier: 2
|
||||
docker/Dockerfile:
|
||||
Paul Gauthier: 5
|
||||
Paul Gauthier (aider): 4
|
||||
tests/basic/test_editblock.py:
|
||||
Paul Gauthier: 7
|
||||
tests/basic/test_history.py:
|
||||
Paul Gauthier (aider): 13
|
||||
tests/basic/test_io.py:
|
||||
Paul Gauthier (aider): 46
|
||||
tests/basic/test_main.py:
|
||||
Paul Gauthier: 8
|
||||
Paul Gauthier (aider): 1
|
||||
tests/basic/test_models.py:
|
||||
Paul Gauthier (aider): 297
|
||||
tests/basic/test_repo.py:
|
||||
Paul Gauthier (aider): 11
|
||||
tests/basic/test_sendchat.py:
|
||||
Paul Gauthier (aider): 7
|
||||
tests/basic/test_watch.py:
|
||||
Paul Gauthier: 4
|
||||
Paul Gauthier (aider): 42
|
||||
grand_total:
|
||||
Paul Gauthier: 176
|
||||
Paul Gauthier (aider): 604
|
||||
"Viktor Sz\xE9pe": 3
|
||||
start_tag: v0.73.0
|
||||
total_lines: 783
|
||||
|
||||
@@ -543,4 +543,56 @@
|
||||
date: 2025-01-21
|
||||
versions: 0.72.2.dev
|
||||
seconds_per_case: 24.2
|
||||
total_cost: 0.0000
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2025-02-15-19-51-22--chatgpt4o-feb15-diff
|
||||
test_cases: 223
|
||||
model: chatgpt-4o-latest (2025-02-15)
|
||||
edit_format: diff
|
||||
commit_hash: 108ce18-dirty
|
||||
pass_rate_1: 9.0
|
||||
pass_rate_2: 27.1
|
||||
pass_num_1: 20
|
||||
pass_num_2: 61
|
||||
percent_cases_well_formed: 93.3
|
||||
error_outputs: 66
|
||||
num_malformed_responses: 21
|
||||
num_with_malformed_responses: 15
|
||||
user_asks: 57
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
total_tests: 225
|
||||
command: aider --model chatgpt-4o-latest
|
||||
date: 2025-02-15
|
||||
versions: 0.74.3.dev
|
||||
seconds_per_case: 12.4
|
||||
total_cost: 14.3703
|
||||
|
||||
- dirname: 2025-02-24-19-54-07--sonnet37-diff
|
||||
test_cases: 225
|
||||
model: claude-3-7-sonnet-20250219
|
||||
edit_format: diff
|
||||
commit_hash: 75e9ee6
|
||||
pass_rate_1: 24.4
|
||||
pass_rate_2: 60.4
|
||||
pass_num_1: 55
|
||||
pass_num_2: 136
|
||||
percent_cases_well_formed: 93.3
|
||||
error_outputs: 16
|
||||
num_malformed_responses: 16
|
||||
num_with_malformed_responses: 15
|
||||
user_asks: 12
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
total_tests: 225
|
||||
command: aider --model sonnet
|
||||
date: 2025-02-24
|
||||
versions: 0.74.4.dev
|
||||
seconds_per_case: 28.3
|
||||
total_cost: 17.7191
|
||||
@@ -1 +1 @@
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek V3, o1 & GPT-4o and can [connect to almost any LLM](https://aider.chat/docs/llms.html).
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o. Aider can [connect to almost any LLM, including local models](https://aider.chat/docs/llms.html).
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
## Use claude-3-opus-20240229 model for the main chat
|
||||
#opus: false
|
||||
|
||||
## Use claude-3-5-sonnet-20241022 model for the main chat
|
||||
## Use anthropic/claude-3-7-sonnet-20250219 model for the main chat
|
||||
#sonnet: false
|
||||
|
||||
## Use claude-3-5-haiku-20241022 model for the main chat
|
||||
@@ -436,3 +436,6 @@
|
||||
|
||||
## Specify which editor to use for the /editor command
|
||||
#editor: xxx
|
||||
|
||||
## Install the tree_sitter_language_pack (experimental)
|
||||
#install-tree-sitter-language-pack: false
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
## Use claude-3-opus-20240229 model for the main chat
|
||||
#AIDER_OPUS=
|
||||
|
||||
## Use claude-3-5-sonnet-20241022 model for the main chat
|
||||
## Use anthropic/claude-3-7-sonnet-20250219 model for the main chat
|
||||
#AIDER_SONNET=
|
||||
|
||||
## Use claude-3-5-haiku-20241022 model for the main chat
|
||||
@@ -404,3 +404,6 @@
|
||||
|
||||
## Specify which editor to use for the /editor command
|
||||
#AIDER_EDITOR=
|
||||
|
||||
## Install the tree_sitter_language_pack (experimental)
|
||||
#AIDER_INSTALL_TREE_SITTER_LANGUAGE_PACK=false
|
||||
|
||||
@@ -173,6 +173,7 @@ cog.out("```\n")
|
||||
editor_model_name: null
|
||||
editor_edit_format: null
|
||||
remove_reasoning: null
|
||||
system_prompt_prefix: null
|
||||
|
||||
- name: anthropic/claude-3-5-haiku-20241022
|
||||
edit_format: diff
|
||||
@@ -222,6 +223,19 @@ cog.out("```\n")
|
||||
editor_model_name: anthropic/claude-3-5-sonnet-20241022
|
||||
editor_edit_format: editor-diff
|
||||
|
||||
- name: anthropic/claude-3-7-sonnet-20250219
|
||||
edit_format: diff
|
||||
weak_model_name: anthropic/claude-3-5-haiku-20241022
|
||||
use_repo_map: true
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
cache_control: true
|
||||
editor_model_name: anthropic/claude-3-7-sonnet-20250219
|
||||
editor_edit_format: editor-diff
|
||||
|
||||
- name: anthropic/claude-3-haiku-20240307
|
||||
weak_model_name: anthropic/claude-3-haiku-20240307
|
||||
examples_as_sys_msg: true
|
||||
@@ -263,6 +277,7 @@ cog.out("```\n")
|
||||
use_temperature: false
|
||||
editor_model_name: azure/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
|
||||
edit_format: diff
|
||||
@@ -573,6 +588,7 @@ cog.out("```\n")
|
||||
streaming: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: o1-mini
|
||||
weak_model_name: gpt-4o-mini
|
||||
@@ -598,6 +614,7 @@ cog.out("```\n")
|
||||
use_temperature: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openai/gpt-4o
|
||||
edit_format: diff
|
||||
@@ -637,6 +654,7 @@ cog.out("```\n")
|
||||
streaming: false
|
||||
editor_model_name: openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openai/o1-mini
|
||||
weak_model_name: openai/gpt-4o-mini
|
||||
@@ -662,6 +680,7 @@ cog.out("```\n")
|
||||
use_temperature: false
|
||||
editor_model_name: gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openrouter/anthropic/claude-3-opus
|
||||
edit_format: diff
|
||||
@@ -760,6 +779,7 @@ cog.out("```\n")
|
||||
streaming: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openrouter/openai/o1-mini
|
||||
weak_model_name: openrouter/openai/gpt-4o-mini
|
||||
@@ -787,6 +807,16 @@ cog.out("```\n")
|
||||
use_temperature: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openrouter/openai/o3-mini-high
|
||||
edit_format: diff
|
||||
weak_model_name: openrouter/openai/gpt-4o-mini
|
||||
use_repo_map: true
|
||||
use_temperature: false
|
||||
editor_model_name: openrouter/openai/gpt-4o
|
||||
editor_edit_format: editor-diff
|
||||
system_prompt_prefix: 'Formatting re-enabled. '
|
||||
|
||||
- name: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
edit_format: diff
|
||||
|
||||
@@ -77,7 +77,7 @@ cog.outl("```")
|
||||
## Use claude-3-opus-20240229 model for the main chat
|
||||
#opus: false
|
||||
|
||||
## Use claude-3-5-sonnet-20241022 model for the main chat
|
||||
## Use anthropic/claude-3-7-sonnet-20250219 model for the main chat
|
||||
#sonnet: false
|
||||
|
||||
## Use claude-3-5-haiku-20241022 model for the main chat
|
||||
@@ -490,5 +490,8 @@ cog.outl("```")
|
||||
|
||||
## Specify which editor to use for the /editor command
|
||||
#editor: xxx
|
||||
|
||||
## Install the tree_sitter_language_pack (experimental)
|
||||
#install-tree-sitter-language-pack: false
|
||||
```
|
||||
<!--[[[end]]]-->
|
||||
|
||||
@@ -67,7 +67,7 @@ cog.outl("```")
|
||||
## Use claude-3-opus-20240229 model for the main chat
|
||||
#AIDER_OPUS=
|
||||
|
||||
## Use claude-3-5-sonnet-20241022 model for the main chat
|
||||
## Use anthropic/claude-3-7-sonnet-20250219 model for the main chat
|
||||
#AIDER_SONNET=
|
||||
|
||||
## Use claude-3-5-haiku-20241022 model for the main chat
|
||||
@@ -444,5 +444,8 @@ cog.outl("```")
|
||||
|
||||
## Specify which editor to use for the /editor command
|
||||
#AIDER_EDITOR=
|
||||
|
||||
## Install the tree_sitter_language_pack (experimental)
|
||||
#AIDER_INSTALL_TREE_SITTER_LANGUAGE_PACK=false
|
||||
```
|
||||
<!--[[[end]]]-->
|
||||
|
||||
@@ -60,7 +60,7 @@ for alias, model in sorted(MODEL_ALIASES.items()):
|
||||
- `haiku`: claude-3-5-haiku-20241022
|
||||
- `opus`: claude-3-opus-20240229
|
||||
- `r1`: deepseek/deepseek-reasoner
|
||||
- `sonnet`: claude-3-5-sonnet-20241022
|
||||
- `sonnet`: anthropic/claude-3-7-sonnet-20250219
|
||||
<!--[[[end]]]-->
|
||||
|
||||
## Priority
|
||||
|
||||
@@ -79,6 +79,7 @@ usage: aider [-h] [--model] [--opus] [--sonnet] [--haiku] [--4]
|
||||
[--fancy-input | --no-fancy-input]
|
||||
[--multiline | --no-multiline]
|
||||
[--detect-urls | --no-detect-urls] [--editor]
|
||||
[--install-tree-sitter-language-pack]
|
||||
|
||||
```
|
||||
|
||||
@@ -101,7 +102,7 @@ Use claude-3-opus-20240229 model for the main chat
|
||||
Environment variable: `AIDER_OPUS`
|
||||
|
||||
### `--sonnet`
|
||||
Use claude-3-5-sonnet-20241022 model for the main chat
|
||||
Use anthropic/claude-3-7-sonnet-20250219 model for the main chat
|
||||
Environment variable: `AIDER_SONNET`
|
||||
|
||||
### `--haiku`
|
||||
@@ -761,4 +762,9 @@ Aliases:
|
||||
### `--editor VALUE`
|
||||
Specify which editor to use for the /editor command
|
||||
Environment variable: `AIDER_EDITOR`
|
||||
|
||||
### `--install-tree-sitter-language-pack`
|
||||
Install the tree_sitter_language_pack (experimental)
|
||||
Default: False
|
||||
Environment variable: `AIDER_INSTALL_TREE_SITTER_LANGUAGE_PACK`
|
||||
<!--[[[end]]]-->
|
||||
|
||||
@@ -7,8 +7,10 @@ description: How to configure reasoning model settings from secondary providers.
|
||||
# Reasoning models
|
||||
|
||||
Many
|
||||
"reasoning" models have restrictions on how they can be used.
|
||||
They sometimes prohibit streaming, use of temperature and/or the system prompt.
|
||||
"reasoning" models have restrictions on how they can be used:
|
||||
they sometimes prohibit streaming, use of temperature and/or the system prompt.
|
||||
Some also support different levels of "reasoning effort".
|
||||
|
||||
Aider is configured to work properly with these models
|
||||
when served through major provider APIs.
|
||||
|
||||
@@ -19,6 +21,11 @@ and see errors related to temperature or system prompt.
|
||||
Include settings for your new provider in `.aider.model.setting.yml` file
|
||||
at the root of your project or in your home directory.
|
||||
|
||||
## Reasoning effort
|
||||
|
||||
You can use the `--reasoning-effort` switch to control the reasoning effort
|
||||
of models which support this setting.
|
||||
|
||||
## Temperature, streaming and system prompt
|
||||
|
||||
You should find one of the existing model setting configuration entries
|
||||
|
||||
@@ -249,15 +249,16 @@ tr:hover { background-color: #f5f5f5; }
|
||||
</style>
|
||||
<table>
|
||||
<tr><th>Model Name</th><th class='right'>Total Tokens</th><th class='right'>Percent</th></tr>
|
||||
<tr><td>claude-3-5-sonnet-20241022</td><td class='right'>654,183</td><td class='right'>45.8%</td></tr>
|
||||
<tr><td>fireworks_ai/accounts/fireworks/models/deepseek-v3</td><td class='right'>289,874</td><td class='right'>20.3%</td></tr>
|
||||
<tr><td>o3-mini</td><td class='right'>274,564</td><td class='right'>19.2%</td></tr>
|
||||
<tr><td>deepseek/deepseek-chat</td><td class='right'>97,745</td><td class='right'>6.8%</td></tr>
|
||||
<tr><td>fireworks_ai/REDACTED</td><td class='right'>45,233</td><td class='right'>3.2%</td></tr>
|
||||
<tr><td>fireworks_ai/accounts/fireworks/models/deepseek-r1</td><td class='right'>44,069</td><td class='right'>3.1%</td></tr>
|
||||
<tr><td>deepseek/deepseek-reasoner</td><td class='right'>20,223</td><td class='right'>1.4%</td></tr>
|
||||
<tr><td>gemini/REDACTED</td><td class='right'>1,859</td><td class='right'>0.1%</td></tr>
|
||||
<tr><td>ollama_chat/REDACTED</td><td class='right'>309</td><td class='right'>0.0%</td></tr>
|
||||
<tr><td>claude-3-5-sonnet-20241022</td><td class='right'>671,724</td><td class='right'>50.6%</td></tr>
|
||||
<tr><td>fireworks_ai/accounts/fireworks/models/deepseek-v3</td><td class='right'>316,950</td><td class='right'>23.9%</td></tr>
|
||||
<tr><td>o3-mini</td><td class='right'>98,659</td><td class='right'>7.4%</td></tr>
|
||||
<tr><td>deepseek/deepseek-chat</td><td class='right'>87,658</td><td class='right'>6.6%</td></tr>
|
||||
<tr><td>claude-3-5-haiku-20241022</td><td class='right'>69,203</td><td class='right'>5.2%</td></tr>
|
||||
<tr><td>anthropic/claude-3-7-sonnet-20250219</td><td class='right'>38,305</td><td class='right'>2.9%</td></tr>
|
||||
<tr><td>fireworks_ai/accounts/fireworks/models/deepseek-r1</td><td class='right'>21,182</td><td class='right'>1.6%</td></tr>
|
||||
<tr><td>gpt-4o</td><td class='right'>12,595</td><td class='right'>0.9%</td></tr>
|
||||
<tr><td>openrouter/openai/o3-mini</td><td class='right'>10,107</td><td class='right'>0.8%</td></tr>
|
||||
<tr><td>anthropic/REDACTED</td><td class='right'>1,999</td><td class='right'>0.2%</td></tr>
|
||||
</table>
|
||||
|
||||
{: .note :}
|
||||
|
||||
@@ -96,14 +96,7 @@ to keep aider's dependencies separated.
|
||||
You can use pip to install aider with python versions 3.9-3.12.
|
||||
|
||||
```bash
|
||||
# Install aider
|
||||
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
|
||||
|
||||
# To work with GPT-4o:
|
||||
aider --4o --openai-api-key sk-xxx...
|
||||
|
||||
# To work with Claude 3.5 Sonnet:
|
||||
aider --sonnet --anthropic-api-key sk-xxx...
|
||||
```
|
||||
|
||||
{% include python-m-aider.md %}
|
||||
|
||||
@@ -17,21 +17,14 @@ Aider works best if you have git installed.
|
||||
Here are
|
||||
[instructions for installing git in various environments](https://github.com/git-guides/install-git).
|
||||
|
||||
## Get your API key
|
||||
## Setup an API key
|
||||
|
||||
To work with OpenAI's models like GPT-4o or o1-preview you need a paid
|
||||
[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key).
|
||||
Note that this is different than being a "ChatGPT Plus" subscriber.
|
||||
You need an key from an API provider to work with most models:
|
||||
|
||||
To work with Anthropic's models like Claude 3.5 Sonnet you need a paid
|
||||
[Anthropic API key](https://docs.anthropic.com/claude/reference/getting-started-with-the-api).
|
||||
|
||||
|
||||
### Working with other LLMs
|
||||
|
||||
{% include works-best.md %}
|
||||
|
||||
### Store your api keys
|
||||
- [OpenAI](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) provides o1, o3-mini, gpt-4o and other models. Note that paying for an API key is different than being a "ChatGPT" subscriber.
|
||||
- [Anthropic](https://docs.anthropic.com/claude/reference/getting-started-with-the-api) provides Claude 3.5 Sonnet and Haiku.
|
||||
- [DeepSeek](https://platform.deepseek.com/api_keys) provides DeepSeek R1 and DeepSeek Chat V3.
|
||||
- [OpenRouter](https://openrouter.ai/keys) allows you to access models from many providers using a single key.
|
||||
|
||||
You can [store your api keys in configuration or env files](/docs/config/api-keys.html)
|
||||
and they will be loaded automatically whenever you run aider.
|
||||
@@ -105,11 +98,3 @@ please let us know by opening a
|
||||
[GitHub issue](https://github.com/Aider-AI/aider/issues).
|
||||
|
||||
|
||||
## Install the development version of aider
|
||||
|
||||
If you want the very latest development version of aider
|
||||
you can install it like this:
|
||||
|
||||
```
|
||||
aider --install-main-branch
|
||||
```
|
||||
|
||||
@@ -73,7 +73,8 @@ cog.out(get_supported_languages_md())
|
||||
| gomod | .gomod | | ✓ |
|
||||
| hack | .hack | | ✓ |
|
||||
| haskell | .hs | | ✓ |
|
||||
| hcl | .hcl | | ✓ |
|
||||
| hcl | .hcl | ✓ | ✓ |
|
||||
| hcl | .tf | ✓ | ✓ |
|
||||
| html | .html | | ✓ |
|
||||
| java | .java | ✓ | ✓ |
|
||||
| javascript | .js | ✓ | ✓ |
|
||||
|
||||
@@ -116,6 +116,6 @@ mod_dates = [get_last_modified_date(file) for file in files]
|
||||
latest_mod_date = max(mod_dates)
|
||||
cog.out(f"{latest_mod_date.strftime('%B %d, %Y.')}")
|
||||
]]]-->
|
||||
January 31, 2025.
|
||||
February 24, 2025.
|
||||
<!--[[[end]]]-->
|
||||
</p>
|
||||
|
||||
@@ -16,10 +16,9 @@ description: Aider can connect to most LLMs for AI pair programming.
|
||||
|
||||
Aider works best with these models, which are skilled at editing code:
|
||||
|
||||
- [GPT-4o](/docs/llms/openai.html)
|
||||
- [DeepSeek R1 and V3](/docs/llms/deepseek.html)
|
||||
- [Claude 3.5 Sonnet](/docs/llms/anthropic.html)
|
||||
- [Claude 3 Opus](/docs/llms/anthropic.html)
|
||||
- [DeepSeek V3](/docs/llms/deepseek.html)
|
||||
- [OpenAI o1, o3-mini and GPT-4o](/docs/llms/openai.html)
|
||||
|
||||
|
||||
## Free models
|
||||
|
||||
@@ -44,15 +44,16 @@ setx OLLAMA_API_KEY <api-key> # Windows, restart shell after setx
|
||||
|
||||
[Ollama uses a 2k context window by default](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size),
|
||||
which is very small for working with aider.
|
||||
|
||||
It also **silently** discards context that exceeds the window.
|
||||
This is especially dangerous because many users don't even realize that most of their data
|
||||
is being discarded by Ollama.
|
||||
|
||||
By default, aider sets Ollama's context window
|
||||
to be large enough for each request you send plus 8k tokens for the reply.
|
||||
This ensures data isn't silently discarded by Ollama.
|
||||
|
||||
Larger context windows may be helpful to allow larger replies from the LLM
|
||||
but will use memory and increase latency.
|
||||
If you would like
|
||||
a larger context window
|
||||
you can use a
|
||||
If you'd like you can configure a fixed sized context window instead
|
||||
with an
|
||||
[`.aider.model.settings.yml` file](https://aider.chat/docs/config/adv-model-settings.html#model-settings)
|
||||
like this:
|
||||
|
||||
|
||||
@@ -37,12 +37,14 @@ You can use `aider --model <model-name>` to use any other OpenAI model.
|
||||
For example, if you want to use a specific version of GPT-4 Turbo
|
||||
you could do `aider --model gpt-4-0125-preview`.
|
||||
|
||||
## o1 models from other providers
|
||||
## Reasoning models from other providers
|
||||
|
||||
Many of OpenAI's o1
|
||||
Many of OpenAI's
|
||||
"reasoning" models have restrictions on streaming and setting the temperature parameter.
|
||||
Some also support different levels of "reasoning effort".
|
||||
Aider is configured to work properly with these models
|
||||
when served through major provider APIs.
|
||||
when served through major provider APIs and
|
||||
has a `--reasoning-effort` setting.
|
||||
|
||||
You may need to [configure reasoning model settings](/docs/config/reasoning.html)
|
||||
if you are using them through another provider
|
||||
|
||||
@@ -33,8 +33,7 @@ cog.out(text)
|
||||
Aider lets you pair program with LLMs,
|
||||
to edit code in your local git repository.
|
||||
Start a new project or work with an existing code base.
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek V3, o1 & GPT-4o and can [connect to almost any LLM](https://aider.chat/docs/llms.html).
|
||||
|
||||
Aider works best with Claude 3.5 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o. Aider can [connect to almost any LLM, including local models](https://aider.chat/docs/llms.html).
|
||||
|
||||
<!--
|
||||
<p align="center">
|
||||
|
||||
@@ -4,6 +4,7 @@ FROM buildpack-deps:jammy
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common \
|
||||
cmake \
|
||||
libboost-all-dev \
|
||||
&& add-apt-repository ppa:deadsnakes/ppa \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
|
||||
@@ -964,9 +964,10 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files):
|
||||
|
||||
# Copy test files from original directory
|
||||
for file_path in test_files:
|
||||
src = original_dname / testdir.name / file_path
|
||||
src = original_dname / Path(*testdir.parts[-4:]) / file_path
|
||||
dst = testdir / file_path
|
||||
if src.exists():
|
||||
print("copying", src, dst)
|
||||
os.makedirs(dst.parent, exist_ok=True)
|
||||
shutil.copy(src, dst)
|
||||
|
||||
@@ -988,6 +989,8 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files):
|
||||
text=True,
|
||||
timeout=timeout,
|
||||
cwd=testdir,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
)
|
||||
|
||||
success = result.returncode == 0
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e
|
||||
|
||||
[ ! -d "build" ] && mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" ..
|
||||
cmake -DEXERCISM_RUN_ALL_TESTS=1 -G "Unix Makefiles" ..
|
||||
make
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#
|
||||
# pip-compile --allow-unsafe --output-file=requirements.txt requirements/requirements.in
|
||||
#
|
||||
aiohappyeyeballs==2.4.4
|
||||
aiohappyeyeballs==2.4.6
|
||||
# via aiohttp
|
||||
aiohttp==3.11.11
|
||||
aiohttp==3.11.12
|
||||
# via litellm
|
||||
aiosignal==1.3.2
|
||||
# via aiohttp
|
||||
@@ -26,9 +26,9 @@ backoff==2.2.1
|
||||
# via
|
||||
# -r requirements/requirements.in
|
||||
# posthog
|
||||
beautifulsoup4==4.12.3
|
||||
beautifulsoup4==4.13.3
|
||||
# via -r requirements/requirements.in
|
||||
certifi==2024.12.14
|
||||
certifi==2025.1.31
|
||||
# via
|
||||
# httpcore
|
||||
# httpx
|
||||
@@ -51,29 +51,29 @@ distro==1.9.0
|
||||
# via openai
|
||||
filelock==3.17.0
|
||||
# via huggingface-hub
|
||||
flake8==7.1.1
|
||||
flake8==7.1.2
|
||||
# via -r requirements/requirements.in
|
||||
frozenlist==1.5.0
|
||||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
fsspec==2024.12.0
|
||||
fsspec==2025.2.0
|
||||
# via huggingface-hub
|
||||
gitdb==4.0.12
|
||||
# via gitpython
|
||||
gitpython==3.1.44
|
||||
# via -r requirements/requirements.in
|
||||
grep-ast==0.4.1
|
||||
grep-ast==0.6.1
|
||||
# via -r requirements/requirements.in
|
||||
h11==0.14.0
|
||||
# via httpcore
|
||||
httpcore==1.0.7
|
||||
# via httpx
|
||||
httpx==0.27.2
|
||||
httpx==0.28.1
|
||||
# via
|
||||
# litellm
|
||||
# openai
|
||||
huggingface-hub==0.28.0
|
||||
huggingface-hub==0.29.0
|
||||
# via tokenizers
|
||||
idna==3.10
|
||||
# via
|
||||
@@ -99,7 +99,7 @@ jsonschema==4.23.0
|
||||
# litellm
|
||||
jsonschema-specifications==2024.10.1
|
||||
# via jsonschema
|
||||
litellm==1.59.8
|
||||
litellm==1.61.9
|
||||
# via -r requirements/requirements.in
|
||||
markdown-it-py==3.0.0
|
||||
# via rich
|
||||
@@ -124,7 +124,7 @@ numpy==1.26.4
|
||||
# -r requirements/requirements.in
|
||||
# scipy
|
||||
# soundfile
|
||||
openai==1.60.2
|
||||
openai==1.63.2
|
||||
# via litellm
|
||||
packaging==24.2
|
||||
# via
|
||||
@@ -138,7 +138,7 @@ pexpect==4.9.0
|
||||
# via -r requirements/requirements.in
|
||||
pillow==10.4.0
|
||||
# via -r requirements/requirements.in
|
||||
posthog==3.11.0
|
||||
posthog==3.14.1
|
||||
# via -r requirements/requirements.in
|
||||
prompt-toolkit==3.0.50
|
||||
# via -r requirements/requirements.in
|
||||
@@ -146,7 +146,7 @@ propcache==0.2.1
|
||||
# via
|
||||
# aiohttp
|
||||
# yarl
|
||||
psutil==6.1.1
|
||||
psutil==7.0.0
|
||||
# via -r requirements/requirements.in
|
||||
ptyprocess==0.7.0
|
||||
# via pexpect
|
||||
@@ -208,15 +208,16 @@ smmap==5.0.2
|
||||
sniffio==1.3.1
|
||||
# via
|
||||
# anyio
|
||||
# httpx
|
||||
# openai
|
||||
socksio==1.0.0
|
||||
# via -r requirements/requirements.in
|
||||
sounddevice==0.5.1
|
||||
# via -r requirements/requirements.in
|
||||
soundfile==0.13.1
|
||||
# via -r requirements/requirements.in
|
||||
soupsieve==2.6
|
||||
# via beautifulsoup4
|
||||
tiktoken==0.8.0
|
||||
tiktoken==0.9.0
|
||||
# via litellm
|
||||
tokenizers==0.19.1
|
||||
# via
|
||||
@@ -229,12 +230,14 @@ tqdm==4.67.1
|
||||
tree-sitter==0.21.3
|
||||
# via
|
||||
# -r requirements/requirements.in
|
||||
# grep-ast
|
||||
# tree-sitter-languages
|
||||
tree-sitter-languages==1.10.2
|
||||
# via grep-ast
|
||||
typing-extensions==4.12.2
|
||||
# via
|
||||
# anyio
|
||||
# beautifulsoup4
|
||||
# huggingface-hub
|
||||
# openai
|
||||
# pydantic
|
||||
@@ -254,5 +257,5 @@ zipp==3.21.0
|
||||
# via importlib-metadata
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==25.0
|
||||
pip==25.0.1
|
||||
# via -r requirements/requirements.in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-c ../requirements.txt
|
||||
|
||||
streamlit
|
||||
streamlit==1.41.1 # https://github.com/Aider-AI/aider/issues/3221
|
||||
watchdog<5 # docker build fails: streamlit 1.38.0 depends on watchdog<5
|
||||
|
||||
@@ -17,7 +17,7 @@ blinker==1.9.0
|
||||
# via streamlit
|
||||
cachetools==5.5.1
|
||||
# via streamlit
|
||||
certifi==2024.12.14
|
||||
certifi==2025.1.31
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -92,7 +92,7 @@ mdurl==0.1.2
|
||||
# -c requirements.txt
|
||||
# -c requirements/requirements-dev.txt
|
||||
# markdown-it-py
|
||||
narwhals==1.24.0
|
||||
narwhals==1.27.1
|
||||
# via altair
|
||||
numpy==1.26.4
|
||||
# via
|
||||
@@ -124,7 +124,7 @@ pillow==10.4.0
|
||||
# streamlit
|
||||
protobuf==5.29.3
|
||||
# via streamlit
|
||||
pyarrow==19.0.0
|
||||
pyarrow==19.0.1
|
||||
# via streamlit
|
||||
pydeck==0.9.1
|
||||
# via streamlit
|
||||
@@ -140,7 +140,7 @@ python-dateutil==2.9.0.post0
|
||||
# -c requirements.txt
|
||||
# -c requirements/requirements-dev.txt
|
||||
# pandas
|
||||
pytz==2024.2
|
||||
pytz==2025.1
|
||||
# via
|
||||
# -c requirements/requirements-dev.txt
|
||||
# pandas
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#
|
||||
alabaster==1.0.0
|
||||
# via sphinx
|
||||
babel==2.16.0
|
||||
babel==2.17.0
|
||||
# via sphinx
|
||||
build==1.2.2.post1
|
||||
# via pip-tools
|
||||
certifi==2024.12.14
|
||||
certifi==2025.1.31
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -28,7 +28,7 @@ click==8.1.8
|
||||
# -c requirements.txt
|
||||
# pip-tools
|
||||
# typer
|
||||
codespell==2.4.0
|
||||
codespell==2.4.1
|
||||
# via -r requirements/requirements-dev.in
|
||||
cogapp==3.4.1
|
||||
# via -r requirements/requirements-dev.in
|
||||
@@ -51,9 +51,9 @@ filelock==3.17.0
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# virtualenv
|
||||
fonttools==4.55.7
|
||||
fonttools==4.56.0
|
||||
# via matplotlib
|
||||
identify==2.6.6
|
||||
identify==2.6.7
|
||||
# via pre-commit
|
||||
idna==3.10
|
||||
# via
|
||||
@@ -156,7 +156,7 @@ python-dateutil==2.9.0.post0
|
||||
# -c requirements.txt
|
||||
# matplotlib
|
||||
# pandas
|
||||
pytz==2024.2
|
||||
pytz==2025.1
|
||||
# via pandas
|
||||
pyyaml==6.0.2
|
||||
# via
|
||||
@@ -173,6 +173,8 @@ rich==13.9.4
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# typer
|
||||
roman-numerals-py==3.0.0
|
||||
# via sphinx
|
||||
semver==3.0.4
|
||||
# via -r requirements/requirements-dev.in
|
||||
shellingham==1.5.4
|
||||
@@ -184,7 +186,7 @@ six==1.17.0
|
||||
# python-dateutil
|
||||
snowballstemmer==2.2.0
|
||||
# via sphinx
|
||||
sphinx==8.1.3
|
||||
sphinx==8.2.0
|
||||
# via
|
||||
# sphinx-rtd-theme
|
||||
# sphinxcontrib-jquery
|
||||
@@ -218,13 +220,13 @@ urllib3==2.3.0
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# requests
|
||||
virtualenv==20.29.1
|
||||
virtualenv==20.29.2
|
||||
# via pre-commit
|
||||
wheel==0.45.1
|
||||
# via pip-tools
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==25.0
|
||||
pip==25.0.1
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#
|
||||
# pip-compile --allow-unsafe --constraint=requirements.txt --constraint=requirements/requirements-dev.txt --output-file=requirements/requirements-help.txt requirements/requirements-help.in
|
||||
#
|
||||
aiohappyeyeballs==2.4.4
|
||||
aiohappyeyeballs==2.4.6
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# aiohttp
|
||||
aiohttp==3.11.11
|
||||
aiohttp==3.11.12
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -35,7 +35,7 @@ attrs==25.1.0
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# aiohttp
|
||||
certifi==2024.12.14
|
||||
certifi==2025.1.31
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -77,7 +77,7 @@ frozenlist==1.5.0
|
||||
# -c requirements.txt
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
fsspec==2024.12.0
|
||||
fsspec==2025.2.0
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -98,12 +98,12 @@ httpcore==1.0.7
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# httpx
|
||||
httpx==0.27.2
|
||||
httpx==0.28.1
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# llama-index-core
|
||||
huggingface-hub[inference]==0.28.0
|
||||
huggingface-hub[inference]==0.29.0
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
@@ -130,7 +130,7 @@ joblib==1.4.2
|
||||
# via
|
||||
# nltk
|
||||
# scikit-learn
|
||||
llama-index-core==0.12.14
|
||||
llama-index-core==0.12.19
|
||||
# via
|
||||
# -r requirements/requirements-help.in
|
||||
# llama-index-embeddings-huggingface
|
||||
@@ -142,7 +142,7 @@ markupsafe==3.0.2
|
||||
# -c requirements.txt
|
||||
# -c requirements/requirements-dev.txt
|
||||
# jinja2
|
||||
marshmallow==3.26.0
|
||||
marshmallow==3.26.1
|
||||
# via dataclasses-json
|
||||
mpmath==1.3.0
|
||||
# via sympy
|
||||
@@ -238,15 +238,14 @@ scipy==1.13.1
|
||||
# -c requirements.txt
|
||||
# scikit-learn
|
||||
# sentence-transformers
|
||||
sentence-transformers==3.4.0
|
||||
sentence-transformers==3.4.1
|
||||
# via llama-index-embeddings-huggingface
|
||||
sniffio==1.3.1
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
# anyio
|
||||
# httpx
|
||||
sqlalchemy[asyncio]==2.0.37
|
||||
sqlalchemy[asyncio]==2.0.38
|
||||
# via
|
||||
# llama-index-core
|
||||
# sqlalchemy
|
||||
@@ -256,7 +255,7 @@ tenacity==9.0.0
|
||||
# via llama-index-core
|
||||
threadpoolctl==3.5.0
|
||||
# via scikit-learn
|
||||
tiktoken==0.8.0
|
||||
tiktoken==0.9.0
|
||||
# via
|
||||
# -c /Users/gauthier/Projects/aider/requirements.txt
|
||||
# -c requirements.txt
|
||||
|
||||
@@ -29,6 +29,7 @@ pexpect
|
||||
json5
|
||||
psutil
|
||||
watchfiles
|
||||
socksio
|
||||
pip
|
||||
|
||||
# The proper dependency is networkx[default], but this brings
|
||||
|
||||
@@ -32,12 +32,14 @@ def blame(start_tag, end_tag=None):
|
||||
|
||||
revision = end_tag if end_tag else "HEAD"
|
||||
files = run(["git", "ls-tree", "-r", "--name-only", revision]).strip().split("\n")
|
||||
test_files = [f for f in files if f.startswith("tests/fixtures/languages/") and "/test." in f]
|
||||
files = [
|
||||
f
|
||||
for f in files
|
||||
if f.endswith((".js", ".py", ".scm", ".sh", "Dockerfile", "Gemfile"))
|
||||
or (f.startswith(".github/workflows/") and f.endswith(".yml"))
|
||||
or f in website_files
|
||||
or f in test_files
|
||||
]
|
||||
files = [f for f in files if not f.endswith("prompts.py")]
|
||||
files = [f for f in files if not f.startswith("tests/fixtures/watch")]
|
||||
|
||||
@@ -126,6 +126,11 @@ def find_oldest_issue(subject, all_issues):
|
||||
|
||||
|
||||
def comment_and_close_duplicate(issue, oldest_issue):
|
||||
# Skip if issue is labeled as priority
|
||||
if "priority" in [label["name"] for label in issue["labels"]]:
|
||||
print(f" - Skipping priority issue #{issue['number']}")
|
||||
return
|
||||
|
||||
comment_url = (
|
||||
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
|
||||
)
|
||||
@@ -168,7 +173,11 @@ def find_unlabeled_with_paul_comments(issues):
|
||||
|
||||
def handle_unlabeled_issues(all_issues, auto_yes):
|
||||
print("\nFinding unlabeled issues with paul-gauthier comments...")
|
||||
unlabeled_issues = find_unlabeled_with_paul_comments(all_issues)
|
||||
unlabeled_issues = [
|
||||
issue
|
||||
for issue in find_unlabeled_with_paul_comments(all_issues)
|
||||
if "priority" not in [label["name"] for label in issue["labels"]]
|
||||
]
|
||||
|
||||
if not unlabeled_issues:
|
||||
print("No unlabeled issues with paul-gauthier comments found.")
|
||||
@@ -197,10 +206,12 @@ def handle_stale_issues(all_issues, auto_yes):
|
||||
|
||||
for issue in all_issues:
|
||||
# Skip if not open, not a question, already stale, or has been reopened
|
||||
labels = [label["name"] for label in issue["labels"]]
|
||||
if (
|
||||
issue["state"] != "open"
|
||||
or "question" not in [label["name"] for label in issue["labels"]]
|
||||
or "stale" in [label["name"] for label in issue["labels"]]
|
||||
or "question" not in labels
|
||||
or "stale" in labels
|
||||
or "priority" in labels
|
||||
or has_been_reopened(issue["number"])
|
||||
):
|
||||
continue
|
||||
@@ -239,8 +250,9 @@ def handle_stale_closing(all_issues, auto_yes):
|
||||
print("\nChecking for issues to close or unstale...")
|
||||
|
||||
for issue in all_issues:
|
||||
# Skip if not open or not stale
|
||||
if issue["state"] != "open" or "stale" not in [label["name"] for label in issue["labels"]]:
|
||||
# Skip if not open, not stale, or is priority
|
||||
labels = [label["name"] for label in issue["labels"]]
|
||||
if issue["state"] != "open" or "stale" not in labels or "priority" in labels:
|
||||
continue
|
||||
|
||||
# Get the timeline to find when the stale label was last added
|
||||
@@ -324,9 +336,9 @@ def handle_fixed_issues(all_issues, auto_yes):
|
||||
print("\nChecking for fixed enhancement and bug issues to close...")
|
||||
|
||||
for issue in all_issues:
|
||||
# Skip if not open or doesn't have fixed label
|
||||
# Skip if not open, doesn't have fixed label, or is priority
|
||||
labels = [label["name"] for label in issue["labels"]]
|
||||
if issue["state"] != "open" or "fixed" not in labels:
|
||||
if issue["state"] != "open" or "fixed" not in labels or "priority" in labels:
|
||||
continue
|
||||
|
||||
# Check if it's an enhancement or bug
|
||||
|
||||
@@ -905,6 +905,25 @@ This command will print 'Hello, World!' to the console."""
|
||||
self.assertIsInstance(exc.valid_formats, list)
|
||||
self.assertTrue(len(exc.valid_formats) > 0)
|
||||
|
||||
def test_system_prompt_prefix(self):
|
||||
# Test that system_prompt_prefix is properly set and used
|
||||
io = InputOutput(yes=True)
|
||||
test_prefix = "Test prefix. "
|
||||
|
||||
# Create a model with system_prompt_prefix
|
||||
model = Model("gpt-3.5-turbo")
|
||||
model.system_prompt_prefix = test_prefix
|
||||
|
||||
coder = Coder.create(model, None, io=io)
|
||||
|
||||
# Get the formatted messages
|
||||
chunks = coder.format_messages()
|
||||
messages = chunks.all_messages()
|
||||
|
||||
# Check if the system message contains our prefix
|
||||
system_message = next(msg for msg in messages if msg["role"] == "system")
|
||||
self.assertTrue(system_message["content"].startswith(test_prefix))
|
||||
|
||||
def test_coder_create_with_new_file_oserror(self):
|
||||
with GitTemporaryDirectory():
|
||||
io = InputOutput(yes=True)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import os
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from aider.editor import (
|
||||
DEFAULT_EDITOR_NIX,
|
||||
DEFAULT_EDITOR_OS_X,
|
||||
@@ -21,7 +19,7 @@ def test_get_environment_editor():
|
||||
assert get_environment_editor("default") == "default"
|
||||
|
||||
# Test EDITOR precedence
|
||||
with patch.dict(os.environ, {"EDITOR": "vim"}):
|
||||
with patch.dict(os.environ, {"EDITOR": "vim"}, clear=True):
|
||||
assert get_environment_editor() == "vim"
|
||||
|
||||
# Test VISUAL overrides EDITOR
|
||||
@@ -34,17 +32,17 @@ def test_discover_editor_defaults():
|
||||
# Test Windows default
|
||||
mock_system.return_value = "Windows"
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
assert discover_editor() == [DEFAULT_EDITOR_WINDOWS]
|
||||
assert discover_editor() == DEFAULT_EDITOR_WINDOWS
|
||||
|
||||
# Test macOS default
|
||||
mock_system.return_value = "Darwin"
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
assert discover_editor() == [DEFAULT_EDITOR_OS_X]
|
||||
assert discover_editor() == DEFAULT_EDITOR_OS_X
|
||||
|
||||
# Test Linux default
|
||||
mock_system.return_value = "Linux"
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
assert discover_editor() == [DEFAULT_EDITOR_NIX]
|
||||
assert discover_editor() == DEFAULT_EDITOR_NIX
|
||||
|
||||
|
||||
def test_write_temp_file():
|
||||
@@ -81,12 +79,44 @@ def test_print_status_message(capsys):
|
||||
|
||||
def test_discover_editor_override():
|
||||
# Test editor override
|
||||
assert discover_editor("code") == ["code"]
|
||||
assert discover_editor('vim -c "set noswapfile"') == ["vim", "-c", "set noswapfile"]
|
||||
assert discover_editor("code") == "code"
|
||||
assert discover_editor('vim -c "set noswapfile"') == 'vim -c "set noswapfile"'
|
||||
|
||||
# Test invalid editor command
|
||||
with pytest.raises(RuntimeError):
|
||||
discover_editor('vim "unclosed quote')
|
||||
|
||||
def test_pipe_editor_with_fake_editor():
|
||||
# Create a temporary Python script that logs its arguments
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w", suffix=".log", delete=False) as log_f:
|
||||
log_path = log_f.name
|
||||
# Convert to raw string path to avoid escape issues on Windows
|
||||
log_path_escaped = log_path.replace("\\", "\\\\")
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
|
||||
f.write(f"""import sys
|
||||
with open(r"{log_path_escaped}", "w") as f:
|
||||
f.write(" ".join(sys.argv))
|
||||
""")
|
||||
script_path = f.name
|
||||
|
||||
try:
|
||||
# Use the Python script as editor and verify it's called with .md file
|
||||
python_exe = sys.executable
|
||||
editor_cmd = f"{python_exe} {script_path}"
|
||||
pipe_editor("test content", suffix="md", editor=editor_cmd)
|
||||
|
||||
# Read the log file to see what arguments were passed
|
||||
with open(log_path) as f:
|
||||
called_args = f.read().strip()
|
||||
|
||||
# Verify the editor was called with a .md file
|
||||
assert called_args.endswith(".md"), f"Called args: {called_args!r}"
|
||||
|
||||
finally:
|
||||
# Clean up
|
||||
os.unlink(script_path)
|
||||
os.unlink(log_path)
|
||||
|
||||
|
||||
def test_pipe_editor():
|
||||
|
||||
@@ -123,7 +123,7 @@ class TestModels(unittest.TestCase):
|
||||
self.assertEqual(model.name, "gpt-3.5-turbo")
|
||||
|
||||
model = Model("sonnet")
|
||||
self.assertEqual(model.name, "claude-3-5-sonnet-20241022")
|
||||
self.assertEqual(model.name, "anthropic/claude-3-7-sonnet-20250219")
|
||||
|
||||
model = Model("haiku")
|
||||
self.assertEqual(model.name, "claude-3-5-haiku-20241022")
|
||||
|
||||
@@ -303,6 +303,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
||||
"elisp": ("el", "greeter"),
|
||||
"elm": ("elm", "Person"),
|
||||
"go": ("go", "Greeter"),
|
||||
"hcl": ("tf", "aws_vpc"),
|
||||
}
|
||||
|
||||
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"
|
||||
|
||||
52
tests/fixtures/languages/hcl/test.tf
vendored
Normal file
52
tests/fixtures/languages/hcl/test.tf
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# Variables
|
||||
variable "aws_region" {
|
||||
description = "AWS region for resources"
|
||||
type = string
|
||||
default = "us-west-2"
|
||||
}
|
||||
|
||||
variable "environment" {
|
||||
description = "Environment name"
|
||||
type = string
|
||||
default = "dev"
|
||||
}
|
||||
|
||||
# Provider configuration
|
||||
provider "aws" {
|
||||
region = var.aws_region
|
||||
}
|
||||
|
||||
# Resource definitions
|
||||
resource "aws_vpc" "main" {
|
||||
cidr_block = "10.0.0.0/16"
|
||||
enable_dns_hostnames = true
|
||||
enable_dns_support = true
|
||||
|
||||
tags = {
|
||||
Name = "${var.environment}-vpc"
|
||||
Environment = var.environment
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_subnet" "public" {
|
||||
vpc_id = aws_vpc.main.id
|
||||
cidr_block = "10.0.1.0/24"
|
||||
availability_zone = "${var.aws_region}a"
|
||||
map_public_ip_on_launch = true
|
||||
|
||||
tags = {
|
||||
Name = "${var.environment}-public-subnet"
|
||||
Environment = var.environment
|
||||
}
|
||||
}
|
||||
|
||||
# Output values
|
||||
output "vpc_id" {
|
||||
description = "ID of the created VPC"
|
||||
value = aws_vpc.main.id
|
||||
}
|
||||
|
||||
output "subnet_id" {
|
||||
description = "ID of the public subnet"
|
||||
value = aws_subnet.public.id
|
||||
}
|
||||
Reference in New Issue
Block a user