From 434dc27557a64acd41df49eba6aadcee4b0adbbb Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:11:19 -0800
Subject: [PATCH 01/42] feat: Add stale issue detection for question-labeled
issues with no activity
---
scripts/issues.py | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/scripts/issues.py b/scripts/issues.py
index f41e53baa..544be2f78 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -28,6 +28,8 @@ This looks like a duplicate of #{oldest_issue_number}. Please see the comments t
I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.""" # noqa
+STALE_COMMENT = """This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days."""
+
# GitHub API configuration
GITHUB_API_URL = "https://api.github.com"
REPO_OWNER = "Aider-AI"
@@ -160,6 +162,45 @@ def handle_unlabeled_issues(all_issues, auto_yes):
print(f" - Added 'question' label to #{issue['number']}")
+def handle_stale_issues(all_issues, auto_yes):
+ print("\nChecking for stale question issues...")
+
+ for issue in all_issues:
+ # Skip if not open, not a question, already stale, or has been reopened
+ 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
+ has_been_reopened(issue["number"])):
+ continue
+
+ # Get latest activity timestamp from issue or its comments
+ latest_activity = datetime.strptime(issue["updated_at"], "%Y-%m-%dT%H:%M:%SZ")
+
+ # Check if issue is stale (no activity for 14 days)
+ days_inactive = (datetime.now() - latest_activity).days
+ if days_inactive >= 14:
+ print(f"\nStale issue found: #{issue['number']}: {issue['title']}")
+ print(f" No activity for {days_inactive} days")
+
+ if not auto_yes:
+ confirm = input("Add stale label and comment? (y/n): ")
+ if confirm.lower() != "y":
+ print("Skipping this issue.")
+ continue
+
+ # Add stale label
+ url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}"
+ response = requests.patch(url, headers=headers, json={"labels": ["question", "stale"]})
+ response.raise_for_status()
+
+ # Add comment
+ comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ response = requests.post(comment_url, headers=headers, json={"body": STALE_COMMENT})
+ response.raise_for_status()
+
+ print(f" Added stale label and comment to #{issue['number']}")
+
+
def handle_duplicate_issues(all_issues, auto_yes):
open_issues = [issue for issue in all_issues if issue["state"] == "open"]
grouped_open_issues = group_issues_by_subject(open_issues)
@@ -214,6 +255,7 @@ def main():
all_issues = get_issues("all")
handle_unlabeled_issues(all_issues, args.yes)
+ handle_stale_issues(all_issues, args.yes)
handle_duplicate_issues(all_issues, args.yes)
From e578655653e30fd4a43e0b3861794e8d5919d028 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:11:24 -0800
Subject: [PATCH 02/42] style: Format Python code with linter
---
scripts/issues.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 544be2f78..ff9a5c969 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -164,24 +164,26 @@ def handle_unlabeled_issues(all_issues, auto_yes):
def handle_stale_issues(all_issues, auto_yes):
print("\nChecking for stale question issues...")
-
+
for issue in all_issues:
# Skip if not open, not a question, already stale, or has been reopened
- 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
- has_been_reopened(issue["number"])):
+ 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 has_been_reopened(issue["number"])
+ ):
continue
# Get latest activity timestamp from issue or its comments
latest_activity = datetime.strptime(issue["updated_at"], "%Y-%m-%dT%H:%M:%SZ")
-
+
# Check if issue is stale (no activity for 14 days)
days_inactive = (datetime.now() - latest_activity).days
if days_inactive >= 14:
print(f"\nStale issue found: #{issue['number']}: {issue['title']}")
print(f" No activity for {days_inactive} days")
-
+
if not auto_yes:
confirm = input("Add stale label and comment? (y/n): ")
if confirm.lower() != "y":
@@ -194,10 +196,12 @@ def handle_stale_issues(all_issues, auto_yes):
response.raise_for_status()
# Add comment
- comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ comment_url = (
+ f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ )
response = requests.post(comment_url, headers=headers, json={"body": STALE_COMMENT})
response.raise_for_status()
-
+
print(f" Added stale label and comment to #{issue['number']}")
From d44cd01493292fb95d55b9b6fd14761785491756 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:11:41 -0800
Subject: [PATCH 03/42] refactor: Add noqa comment to stale comment line to
resolve flake8 warning
---
scripts/issues.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index ff9a5c969..346196a1d 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -28,7 +28,7 @@ This looks like a duplicate of #{oldest_issue_number}. Please see the comments t
I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.""" # noqa
-STALE_COMMENT = """This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days."""
+STALE_COMMENT = """This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days.""" # noqa
# GitHub API configuration
GITHUB_API_URL = "https://api.github.com"
From cefea38ee54344d84cb7a7928717970f1fed5202 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:17:55 -0800
Subject: [PATCH 04/42] feat: Add issue URL to stale issue output for easier
navigation
---
scripts/issues.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 346196a1d..d1fc10cb2 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -181,7 +181,7 @@ def handle_stale_issues(all_issues, auto_yes):
# Check if issue is stale (no activity for 14 days)
days_inactive = (datetime.now() - latest_activity).days
if days_inactive >= 14:
- print(f"\nStale issue found: #{issue['number']}: {issue['title']}")
+ print(f"\nStale issue found: #{issue['number']}: {issue['title']} {issue['html_url']}")
print(f" No activity for {days_inactive} days")
if not auto_yes:
From 22dbcb75909ae31b38b9530c19770213471a3caa Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 09:25:09 -0800
Subject: [PATCH 05/42] refactor: Update stale issue comment text for clarity
and conciseness
---
scripts/issues.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index d1fc10cb2..7103eedec 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -28,7 +28,7 @@ This looks like a duplicate of #{oldest_issue_number}. Please see the comments t
I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.""" # noqa
-STALE_COMMENT = """This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days.""" # noqa
+STALE_COMMENT = """I'm labeling this issue as stale because it has been open for 2 weeks with no activity. If there are no additional comments, it will be closed in 7 days.""" # noqa
# GitHub API configuration
GITHUB_API_URL = "https://api.github.com"
From 63621993636270ba0abffaaa051b9aeb9927fc64 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:25:11 -0800
Subject: [PATCH 06/42] fix: Reorder stale label and comment operations in
handle_stale_issues
---
scripts/issues.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 7103eedec..ce5289a5d 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -190,11 +190,6 @@ def handle_stale_issues(all_issues, auto_yes):
print("Skipping this issue.")
continue
- # Add stale label
- url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}"
- response = requests.patch(url, headers=headers, json={"labels": ["question", "stale"]})
- response.raise_for_status()
-
# Add comment
comment_url = (
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
@@ -202,6 +197,11 @@ def handle_stale_issues(all_issues, auto_yes):
response = requests.post(comment_url, headers=headers, json={"body": STALE_COMMENT})
response.raise_for_status()
+ # Add stale label
+ url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}"
+ response = requests.patch(url, headers=headers, json={"labels": ["question", "stale"]})
+ response.raise_for_status()
+
print(f" Added stale label and comment to #{issue['number']}")
From d406636878e92604f34cc94001d9d1bea6879850 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 09:55:35 -0800
Subject: [PATCH 07/42] refactor: Improve issue output formatting and message
clarity
---
scripts/issues.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index ce5289a5d..237dff990 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -181,7 +181,7 @@ def handle_stale_issues(all_issues, auto_yes):
# Check if issue is stale (no activity for 14 days)
days_inactive = (datetime.now() - latest_activity).days
if days_inactive >= 14:
- print(f"\nStale issue found: #{issue['number']}: {issue['title']} {issue['html_url']}")
+ print(f"\nStale issue found: #{issue['number']}: {issue['title']}\n{issue['html_url']}")
print(f" No activity for {days_inactive} days")
if not auto_yes:
@@ -209,7 +209,7 @@ def handle_duplicate_issues(all_issues, auto_yes):
open_issues = [issue for issue in all_issues if issue["state"] == "open"]
grouped_open_issues = group_issues_by_subject(open_issues)
- print("Analyzing issues (skipping reopened issues)...")
+ print("Looking for duplicate issues (skipping reopened issues)...")
for subject, issues in grouped_open_issues.items():
oldest_issue = find_oldest_issue(subject, all_issues)
if not oldest_issue:
From 92bbec185276b49f04575012c6e35211708ac91c Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:55:37 -0800
Subject: [PATCH 08/42] feat: Add function to process and close stale issues
after 7 days of inactivity
---
scripts/issues.py | 84 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/scripts/issues.py b/scripts/issues.py
index 237dff990..a422d3f37 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -30,6 +30,8 @@ I'm going to close this issue for now. But please let me know if you think this
STALE_COMMENT = """I'm labeling this issue as stale because it has been open for 2 weeks with no activity. If there are no additional comments, it will be closed in 7 days.""" # noqa
+CLOSE_STALE_COMMENT = """I'm closing this issue because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue at any time.""" # noqa
+
# GitHub API configuration
GITHUB_API_URL = "https://api.github.com"
REPO_OWNER = "Aider-AI"
@@ -205,6 +207,87 @@ def handle_stale_issues(all_issues, auto_yes):
print(f" Added stale label and comment to #{issue['number']}")
+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"]]
+ ):
+ continue
+
+ # Get the timeline to find when the stale label was last added
+ timeline_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/timeline"
+ response = requests.get(timeline_url, headers=headers)
+ response.raise_for_status()
+ events = response.json()
+
+ # Find the most recent stale label addition
+ stale_events = [
+ event for event in events
+ if event.get("event") == "labeled"
+ and event.get("label", {}).get("name") == "stale"
+ ]
+
+ if not stale_events:
+ continue
+
+ latest_stale = datetime.strptime(stale_events[-1]["created_at"], "%Y-%m-%dT%H:%M:%SZ")
+
+ # Get comments since the stale label
+ comments_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ response = requests.get(comments_url, headers=headers)
+ response.raise_for_status()
+ comments = response.json()
+
+ # Check for comments newer than the stale label
+ new_comments = [
+ comment for comment in comments
+ if datetime.strptime(comment["created_at"], "%Y-%m-%dT%H:%M:%SZ") > latest_stale
+ ]
+
+ if new_comments:
+ print(f"\nFound new activity on stale issue #{issue['number']}: {issue['title']}")
+ print(f" {len(new_comments)} new comments since stale label")
+
+ if not auto_yes:
+ confirm = input("Remove stale label? (y/n): ")
+ if confirm.lower() != "y":
+ print("Skipping this issue.")
+ continue
+
+ # Remove stale label but keep question label
+ url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}"
+ response = requests.patch(url, headers=headers, json={"labels": ["question"]})
+ response.raise_for_status()
+ print(f" Removed stale label from #{issue['number']}")
+ else:
+ # Check if it's been 7 days since stale label
+ days_stale = (datetime.now() - latest_stale).days
+ if days_stale >= 7:
+ print(f"\nStale issue ready for closing #{issue['number']}: {issue['title']}")
+ print(f" No activity for {days_stale} days since stale label")
+
+ if not auto_yes:
+ confirm = input("Close this issue? (y/n): ")
+ if confirm.lower() != "y":
+ print("Skipping this issue.")
+ continue
+
+ # Add closing comment
+ comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ response = requests.post(comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT})
+ response.raise_for_status()
+
+ # Close the issue
+ url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}"
+ response = requests.patch(url, headers=headers, json={"state": "closed"})
+ response.raise_for_status()
+ print(f" Closed issue #{issue['number']}")
+
+
def handle_duplicate_issues(all_issues, auto_yes):
open_issues = [issue for issue in all_issues if issue["state"] == "open"]
grouped_open_issues = group_issues_by_subject(open_issues)
@@ -260,6 +343,7 @@ def main():
handle_unlabeled_issues(all_issues, args.yes)
handle_stale_issues(all_issues, args.yes)
+ handle_stale_closing(all_issues, args.yes)
handle_duplicate_issues(all_issues, args.yes)
From 479d47687826dfdbefb8e0d9c8b7a8c9a823a35c Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:55:42 -0800
Subject: [PATCH 09/42] style: Format code with consistent indentation and line
breaks
---
scripts/issues.py | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index a422d3f37..70ded8caf 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -212,46 +212,48 @@ def handle_stale_closing(all_issues, auto_yes):
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"]]
- ):
+ if issue["state"] != "open" or "stale" not in [label["name"] for label in issue["labels"]]:
continue
# Get the timeline to find when the stale label was last added
- timeline_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/timeline"
+ timeline_url = (
+ f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/timeline"
+ )
response = requests.get(timeline_url, headers=headers)
response.raise_for_status()
events = response.json()
# Find the most recent stale label addition
stale_events = [
- event for event in events
- if event.get("event") == "labeled"
- and event.get("label", {}).get("name") == "stale"
+ event
+ for event in events
+ if event.get("event") == "labeled" and event.get("label", {}).get("name") == "stale"
]
-
+
if not stale_events:
continue
latest_stale = datetime.strptime(stale_events[-1]["created_at"], "%Y-%m-%dT%H:%M:%SZ")
# Get comments since the stale label
- comments_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ comments_url = (
+ f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ )
response = requests.get(comments_url, headers=headers)
response.raise_for_status()
comments = response.json()
# Check for comments newer than the stale label
new_comments = [
- comment for comment in comments
+ comment
+ for comment in comments
if datetime.strptime(comment["created_at"], "%Y-%m-%dT%H:%M:%SZ") > latest_stale
]
if new_comments:
print(f"\nFound new activity on stale issue #{issue['number']}: {issue['title']}")
print(f" {len(new_comments)} new comments since stale label")
-
+
if not auto_yes:
confirm = input("Remove stale label? (y/n): ")
if confirm.lower() != "y":
@@ -278,7 +280,9 @@ def handle_stale_closing(all_issues, auto_yes):
# Add closing comment
comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
- response = requests.post(comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT})
+ response = requests.post(
+ comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT}
+ )
response.raise_for_status()
# Close the issue
From 7edc9603d01da6c26479ebe59dc6ee56b060a4cd Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:55:59 -0800
Subject: [PATCH 10/42] fix: Break long line to resolve flake8 line length
error
---
scripts/issues.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 70ded8caf..49f76d29e 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -279,7 +279,9 @@ def handle_stale_closing(all_issues, auto_yes):
continue
# Add closing comment
- comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ comment_url = (
+ f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ )
response = requests.post(
comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT}
)
From 34dc684867dfd39d0cdb3707f9986779b4a30e06 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:56:06 -0800
Subject: [PATCH 11/42] style: Remove unnecessary line breaks in comment_url
assignment
---
scripts/issues.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 49f76d29e..70ded8caf 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -279,9 +279,7 @@ def handle_stale_closing(all_issues, auto_yes):
continue
# Add closing comment
- comment_url = (
- f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
- )
+ comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
response = requests.post(
comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT}
)
From 8065e387976760995f029abb6a0f00825eb85332 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:56:15 -0800
Subject: [PATCH 12/42] style: Wrap long comment_url line to fix flake8 line
length error
---
scripts/issues.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 70ded8caf..49f76d29e 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -279,7 +279,9 @@ def handle_stale_closing(all_issues, auto_yes):
continue
# Add closing comment
- comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ comment_url = (
+ f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
+ )
response = requests.post(
comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT}
)
From 007305962a31b96cecc41f4507db4192dcfeb969 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:56:20 -0800
Subject: [PATCH 13/42] style: Remove unnecessary line breaks in comment_url
assignment
---
scripts/issues.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scripts/issues.py b/scripts/issues.py
index 49f76d29e..70ded8caf 100755
--- a/scripts/issues.py
+++ b/scripts/issues.py
@@ -279,9 +279,7 @@ def handle_stale_closing(all_issues, auto_yes):
continue
# Add closing comment
- comment_url = (
- f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
- )
+ comment_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
response = requests.post(
comment_url, headers=headers, json={"body": CLOSE_STALE_COMMENT}
)
From f30225db9016deca0fdfcb50829e2372327b60be Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 09:58:06 -0800
Subject: [PATCH 14/42] removing buggy close-stale.yml workflow
---
.github/workflows/close-stale.yml | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 .github/workflows/close-stale.yml
diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml
deleted file mode 100644
index aee25446c..000000000
--- a/.github/workflows/close-stale.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: 'Close stale issues and PRs'
-on:
- schedule:
- - cron: '30 1 * * *'
- workflow_dispatch:
-
-permissions:
- issues: write
-
-jobs:
- stale:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/stale@v9
- with:
- stale-issue-message: 'This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days.'
- close-issue-message: 'This issue was closed because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue any time.'
- days-before-stale: 14
- days-before-close: 7
- stale-issue-label: 'stale'
- stale-pr-label: 'stale'
- only-labels: 'question'
- days-before-pr-stale: -1
- days-before-pr-close: -1
From acd75e1083f6c1d652414881bd2521a60f9e64ba Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 09:58:21 -0800
Subject: [PATCH 15/42] copy
---
aider/website/assets/sample-analytics.jsonl | 84 +++++++++++++++++++++
aider/website/docs/more/infinite-output.md | 2 +
2 files changed, 86 insertions(+)
diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl
index cf09949b6..4462d1dcd 100644
--- a/aider/website/assets/sample-analytics.jsonl
+++ b/aider/website/assets/sample-analytics.jsonl
@@ -618,3 +618,87 @@
{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731008891}
{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731008957}
{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731008958}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009346}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009347}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009380}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009498}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009531}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5022, "completion_tokens": 98, "total_tokens": 5120, "cost": 0.016536, "total_cost": 0.016536, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009544}
+{"event": "command_reset", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731009984}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731010753}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731010767}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731010772}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 3609, "completion_tokens": 66, "total_tokens": 3675, "cost": 0.011817, "total_cost": 0.531435, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731010780}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 3798, "completion_tokens": 58, "total_tokens": 3856, "cost": 0.012263999999999999, "total_cost": 0.543699, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731010783}
+{"event": "command_map-refresh", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012301}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4349, "completion_tokens": 215, "total_tokens": 4564, "cost": 0.016272, "total_cost": 0.559971, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012326}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012382}
+{"event": "model warning", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012382}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012391}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012392}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012437}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012437}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012462}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012462}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012492}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012493}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "diff", "prompt_tokens": 2175, "completion_tokens": 0, "total_tokens": 2175, "cost": 0.002175, "total_cost": 0.002175, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012494}
+{"event": "command_exit", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731012809}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013317}
+{"event": "message_send", "properties": {"main_model": "gpt-4o-2024-08-06", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o-2024-08-06", "edit_format": "diff", "prompt_tokens": 4072, "completion_tokens": 67, "total_tokens": 4139, "cost": 0.010850000000000002, "total_cost": 0.010850000000000002, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013327}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013779}
+{"event": "message_send", "properties": {"main_model": "gpt-4o-2024-08-06", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o-2024-08-06", "edit_format": "diff", "prompt_tokens": 3821, "completion_tokens": 66, "total_tokens": 3887, "cost": 0.010212500000000001, "total_cost": 0.010212500000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013789}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013943}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731013943}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731014543}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731015697}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731015699}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731016873}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 57, "total_tokens": 1378, "cost": 0.004818, "total_cost": 0.004818, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731016881}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731016895}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731016946}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 37, "total_tokens": 1358, "cost": 0.004518, "total_cost": 0.004518, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731016952}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017159}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 37, "total_tokens": 1358, "cost": 0.004518, "total_cost": 0.004518, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017166}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017260}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 43, "total_tokens": 1364, "cost": 0.004608, "total_cost": 0.004608, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017267}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017271}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 43, "total_tokens": 1364, "cost": 0.004608, "total_cost": 0.004608, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017277}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017283}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "str-replace", "prompt_tokens": 1321, "completion_tokens": 0, "total_tokens": 1321, "cost": 0.001321, "total_cost": 0.001321, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017285}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017353}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5656, "completion_tokens": 230, "total_tokens": 5886, "cost": 0.0128013, "total_cost": 0.0128013, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017361}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017673}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5656, "completion_tokens": 225, "total_tokens": 5881, "cost": 0.02245875, "total_cost": 0.02245875, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017680}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017723}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5656, "completion_tokens": 225, "total_tokens": 5881, "cost": 0.0127263, "total_cost": 0.0127263, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017730}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017923}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2823, "completion_tokens": 291, "total_tokens": 3114, "cost": 0.010166399999999999, "total_cost": 0.010166399999999999, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017931}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017952}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2823, "completion_tokens": 133, "total_tokens": 2956, "cost": 0.006678600000000001, "total_cost": 0.006678600000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731017956}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018026}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2841, "completion_tokens": 305, "total_tokens": 3146, "cost": 0.0093126, "total_cost": 0.0093126, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018033}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018386}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-haiku-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-haiku-20241022", "edit_format": "str-replace", "prompt_tokens": 195, "completion_tokens": 0, "total_tokens": 195, "cost": 0.000195, "total_cost": 0.000195, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018388}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018393}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2758, "completion_tokens": 291, "total_tokens": 3049, "cost": 0.013668, "total_cost": 0.013668, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018400}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018544}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2758, "completion_tokens": 291, "total_tokens": 3049, "cost": 0.008934600000000001, "total_cost": 0.008934600000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731018551}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731019468}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5219, "completion_tokens": 326, "total_tokens": 5545, "cost": 0.022496999999999996, "total_cost": 0.022496999999999996, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731019478}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5255, "completion_tokens": 342, "total_tokens": 5597, "cost": 0.013874999999999998, "total_cost": 0.036371999999999995, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731019484}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5292, "completion_tokens": 227, "total_tokens": 5519, "cost": 0.012261, "total_cost": 0.048632999999999996, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731019489}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 5324, "completion_tokens": 249, "total_tokens": 5573, "cost": 0.012687, "total_cost": 0.06132, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731019494}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731023558}
+{"event": "cli session", "properties": {"main_model": "openrouter/anthropic/claude-3.5-sonnet", "weak_model": "openrouter/anthropic/claude-3-5-haiku", "editor_model": "openrouter/anthropic/claude-3.5-sonnet", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731023560}
+{"event": "message_send", "properties": {"main_model": "openrouter/anthropic/claude-3.5-sonnet", "weak_model": "openrouter/anthropic/claude-3-5-haiku", "editor_model": "openrouter/anthropic/claude-3.5-sonnet", "edit_format": "diff", "prompt_tokens": 4643, "completion_tokens": 89, "total_tokens": 4732, "cost": 0.015264, "total_cost": 0.015264, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731023566}
+{"event": "command_exit", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731023568}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731085730}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731085733}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5276, "completion_tokens": 829, "total_tokens": 6105, "cost": 0.028263000000000003, "total_cost": 0.028263000000000003, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731085876}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7737, "completion_tokens": 165, "total_tokens": 7902, "cost": 0.025686, "total_cost": 0.053949000000000004, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731085899}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6410, "completion_tokens": 132, "total_tokens": 6542, "cost": 0.02121, "total_cost": 0.075159, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731086273}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6596, "completion_tokens": 307, "total_tokens": 6903, "cost": 0.024392999999999998, "total_cost": 0.099552, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731086706}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7053, "completion_tokens": 1311, "total_tokens": 8364, "cost": 0.040824, "total_cost": 0.140376, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088533}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8504, "completion_tokens": 124, "total_tokens": 8628, "cost": 0.027372, "total_cost": 0.167748, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088557}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7215, "completion_tokens": 127, "total_tokens": 7342, "cost": 0.02355, "total_cost": 0.19129800000000002, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088573}
diff --git a/aider/website/docs/more/infinite-output.md b/aider/website/docs/more/infinite-output.md
index b9aada615..f590d0791 100644
--- a/aider/website/docs/more/infinite-output.md
+++ b/aider/website/docs/more/infinite-output.md
@@ -55,6 +55,7 @@ model_list = "\n".join(f"- {model}" for model in sorted(prefill_models))
cog.out(model_list)
]]]-->
+- anthropic.claude-3-5-haiku-20241022-v1:0
- anthropic.claude-3-5-sonnet-20241022-v2:0
- anthropic/claude-3-5-sonnet-20241022
- claude-3-5-haiku-20241022
@@ -88,6 +89,7 @@ cog.out(model_list)
- mistral/open-mixtral-8x7b
- mistral/pixtral-12b-2409
- openrouter/anthropic/claude-3.5-sonnet
+- us.anthropic.claude-3-5-haiku-20241022-v1:0
- us.anthropic.claude-3-5-sonnet-20241022-v2:0
- vertex_ai/claude-3-5-haiku@20241022
- vertex_ai/claude-3-5-sonnet-v2@20241022
From 9f539436b82eada4012c0abbed0239477921a403 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 09:59:23 -0800
Subject: [PATCH 16/42] test: Add test_exceptions.py to basic test suite
---
tests/basic/test_exceptions.py | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tests/basic/test_exceptions.py
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
new file mode 100644
index 000000000..e69de29bb
From e10205ff6935dcdac4d3bc853cbeaf2b860a450a Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:59:25 -0800
Subject: [PATCH 17/42] test: Add comprehensive tests for LiteLLMExceptions
module
---
tests/basic/test_exceptions.py | 53 ++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
index e69de29bb..88e24531d 100644
--- a/tests/basic/test_exceptions.py
+++ b/tests/basic/test_exceptions.py
@@ -0,0 +1,53 @@
+import pytest
+from aider.exceptions import LiteLLMExceptions, ExInfo
+
+def test_litellm_exceptions_load():
+ """Test that LiteLLMExceptions loads without errors"""
+ ex = LiteLLMExceptions()
+ assert len(ex.exceptions) > 0
+
+def test_exceptions_tuple():
+ """Test that exceptions_tuple returns a non-empty tuple"""
+ ex = LiteLLMExceptions()
+ assert isinstance(ex.exceptions_tuple(), tuple)
+ assert len(ex.exceptions_tuple()) > 0
+
+def test_get_ex_info():
+ """Test get_ex_info returns correct ExInfo"""
+ ex = LiteLLMExceptions()
+
+ # Test with a known exception type
+ from litellm import AuthenticationError
+ auth_error = AuthenticationError()
+ ex_info = ex.get_ex_info(auth_error)
+ assert isinstance(ex_info, ExInfo)
+ assert ex_info.name == "AuthenticationError"
+ assert ex_info.retry is False
+ assert "API key" in ex_info.description
+
+ # Test with unknown exception type
+ class UnknownError(Exception):
+ pass
+ unknown = UnknownError()
+ ex_info = ex.get_ex_info(unknown)
+ assert isinstance(ex_info, ExInfo)
+ assert ex_info.name is None
+ assert ex_info.retry is None
+ assert ex_info.description is None
+
+def test_rate_limit_error():
+ """Test specific handling of RateLimitError"""
+ ex = LiteLLMExceptions()
+ from litellm import RateLimitError
+ rate_error = RateLimitError()
+ ex_info = ex.get_ex_info(rate_error)
+ assert ex_info.retry is True
+ assert "rate limited" in ex_info.description.lower()
+
+def test_context_window_error():
+ """Test specific handling of ContextWindowExceededError"""
+ ex = LiteLLMExceptions()
+ from litellm import ContextWindowExceededError
+ ctx_error = ContextWindowExceededError()
+ ex_info = ex.get_ex_info(ctx_error)
+ assert ex_info.retry is False
From 9db6780af64f8d3171ff74368eed7211e68336a4 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:59:30 -0800
Subject: [PATCH 18/42] style: Sort imports and add whitespace in
test_exceptions.py
---
tests/basic/test_exceptions.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
index 88e24531d..256eaa50d 100644
--- a/tests/basic/test_exceptions.py
+++ b/tests/basic/test_exceptions.py
@@ -1,23 +1,28 @@
import pytest
-from aider.exceptions import LiteLLMExceptions, ExInfo
+
+from aider.exceptions import ExInfo, LiteLLMExceptions
+
def test_litellm_exceptions_load():
"""Test that LiteLLMExceptions loads without errors"""
ex = LiteLLMExceptions()
assert len(ex.exceptions) > 0
+
def test_exceptions_tuple():
"""Test that exceptions_tuple returns a non-empty tuple"""
ex = LiteLLMExceptions()
assert isinstance(ex.exceptions_tuple(), tuple)
assert len(ex.exceptions_tuple()) > 0
+
def test_get_ex_info():
"""Test get_ex_info returns correct ExInfo"""
ex = LiteLLMExceptions()
-
+
# Test with a known exception type
from litellm import AuthenticationError
+
auth_error = AuthenticationError()
ex_info = ex.get_ex_info(auth_error)
assert isinstance(ex_info, ExInfo)
@@ -28,6 +33,7 @@ def test_get_ex_info():
# Test with unknown exception type
class UnknownError(Exception):
pass
+
unknown = UnknownError()
ex_info = ex.get_ex_info(unknown)
assert isinstance(ex_info, ExInfo)
@@ -35,19 +41,23 @@ def test_get_ex_info():
assert ex_info.retry is None
assert ex_info.description is None
+
def test_rate_limit_error():
"""Test specific handling of RateLimitError"""
ex = LiteLLMExceptions()
from litellm import RateLimitError
+
rate_error = RateLimitError()
ex_info = ex.get_ex_info(rate_error)
assert ex_info.retry is True
assert "rate limited" in ex_info.description.lower()
+
def test_context_window_error():
"""Test specific handling of ContextWindowExceededError"""
ex = LiteLLMExceptions()
from litellm import ContextWindowExceededError
+
ctx_error = ContextWindowExceededError()
ex_info = ex.get_ex_info(ctx_error)
assert ex_info.retry is False
From 86d9275375c66ae803fab927f266ead60609367f Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 09:59:44 -0800
Subject: [PATCH 19/42] refactor: Remove unused pytest import from
test_exceptions.py
---
tests/basic/test_exceptions.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
index 256eaa50d..f5bcae850 100644
--- a/tests/basic/test_exceptions.py
+++ b/tests/basic/test_exceptions.py
@@ -1,5 +1,3 @@
-import pytest
-
from aider.exceptions import ExInfo, LiteLLMExceptions
From c472e6e1603da5085f2b2a30df4d004716d4de6c Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:00:30 -0800
Subject: [PATCH 20/42] fix: Update test_exceptions.py to provide required
arguments for litellm exceptions
---
tests/basic/test_exceptions.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
index f5bcae850..905726093 100644
--- a/tests/basic/test_exceptions.py
+++ b/tests/basic/test_exceptions.py
@@ -21,7 +21,7 @@ def test_get_ex_info():
# Test with a known exception type
from litellm import AuthenticationError
- auth_error = AuthenticationError()
+ auth_error = AuthenticationError(message="Invalid API key", llm_provider="openai", model="gpt-4")
ex_info = ex.get_ex_info(auth_error)
assert isinstance(ex_info, ExInfo)
assert ex_info.name == "AuthenticationError"
@@ -45,7 +45,7 @@ def test_rate_limit_error():
ex = LiteLLMExceptions()
from litellm import RateLimitError
- rate_error = RateLimitError()
+ rate_error = RateLimitError(message="Rate limit exceeded", llm_provider="openai", model="gpt-4")
ex_info = ex.get_ex_info(rate_error)
assert ex_info.retry is True
assert "rate limited" in ex_info.description.lower()
@@ -56,6 +56,6 @@ def test_context_window_error():
ex = LiteLLMExceptions()
from litellm import ContextWindowExceededError
- ctx_error = ContextWindowExceededError()
+ ctx_error = ContextWindowExceededError(message="Context length exceeded", model="gpt-4", llm_provider="openai")
ex_info = ex.get_ex_info(ctx_error)
assert ex_info.retry is False
From 203634314cd89f749fc1c822c7e79b70aa1178d5 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:00:33 -0800
Subject: [PATCH 21/42] style: Format code with linter
---
tests/basic/test_exceptions.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py
index 905726093..f9262a665 100644
--- a/tests/basic/test_exceptions.py
+++ b/tests/basic/test_exceptions.py
@@ -21,7 +21,9 @@ def test_get_ex_info():
# Test with a known exception type
from litellm import AuthenticationError
- auth_error = AuthenticationError(message="Invalid API key", llm_provider="openai", model="gpt-4")
+ auth_error = AuthenticationError(
+ message="Invalid API key", llm_provider="openai", model="gpt-4"
+ )
ex_info = ex.get_ex_info(auth_error)
assert isinstance(ex_info, ExInfo)
assert ex_info.name == "AuthenticationError"
@@ -56,6 +58,8 @@ def test_context_window_error():
ex = LiteLLMExceptions()
from litellm import ContextWindowExceededError
- ctx_error = ContextWindowExceededError(message="Context length exceeded", model="gpt-4", llm_provider="openai")
+ ctx_error = ContextWindowExceededError(
+ message="Context length exceeded", model="gpt-4", llm_provider="openai"
+ )
ex_info = ex.get_ex_info(ctx_error)
assert ex_info.retry is False
From 092e7f6b3c761b25b79ca9b26c26ef6aecd7cdad Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:01:11 -0800
Subject: [PATCH 22/42] test: Add comprehensive tests for sendchat module
functionality
---
tests/basic/test_sendchat.py | 69 +++++++++++++++++++++++++++++++++++-
1 file changed, 68 insertions(+), 1 deletion(-)
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index 28397e5c8..58758905f 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -3,7 +3,7 @@ from unittest.mock import MagicMock, patch
from aider.exceptions import LiteLLMExceptions
from aider.llm import litellm
-from aider.sendchat import simple_send_with_retries
+from aider.sendchat import simple_send_with_retries, send_completion, CACHE
class PrintCalled(Exception):
@@ -11,6 +11,9 @@ class PrintCalled(Exception):
class TestSendChat(unittest.TestCase):
+ def setUp(self):
+ self.mock_messages = [{"role": "user", "content": "Hello"}]
+ self.mock_model = "gpt-4"
def test_litellm_exceptions(self):
litellm_ex = LiteLLMExceptions()
litellm_ex._load(strict=True)
@@ -35,3 +38,67 @@ class TestSendChat(unittest.TestCase):
# Call the simple_send_with_retries method
simple_send_with_retries("model", ["message"])
assert mock_print.call_count == 3
+
+ @patch("litellm.completion")
+ def test_send_completion_basic(self, mock_completion):
+ # Setup mock response
+ mock_response = MagicMock()
+ mock_completion.return_value = mock_response
+
+ # Test basic send_completion
+ hash_obj, response = send_completion(
+ self.mock_model,
+ self.mock_messages,
+ functions=None,
+ stream=False
+ )
+
+ assert response == mock_response
+ mock_completion.assert_called_once()
+
+ @patch("litellm.completion")
+ def test_send_completion_with_functions(self, mock_completion):
+ mock_function = {
+ "name": "test_function",
+ "parameters": {"type": "object"}
+ }
+
+ hash_obj, response = send_completion(
+ self.mock_model,
+ self.mock_messages,
+ functions=[mock_function],
+ stream=False
+ )
+
+ # Verify function was properly included in tools
+ called_kwargs = mock_completion.call_args.kwargs
+ assert "tools" in called_kwargs
+ assert called_kwargs["tools"][0]["function"] == mock_function
+
+ @patch("litellm.completion")
+ def test_simple_send_attribute_error(self, mock_completion):
+ # Setup mock to raise AttributeError
+ mock_completion.return_value = MagicMock()
+ mock_completion.return_value.choices = None
+
+ # Should return None on AttributeError
+ result = simple_send_with_retries(self.mock_model, self.mock_messages)
+ assert result is None
+
+ @patch("litellm.completion")
+ @patch("builtins.print")
+ def test_simple_send_non_retryable_error(self, mock_print, mock_completion):
+ # Test with an error that shouldn't trigger retries
+ mock = MagicMock()
+ mock.status_code = 400
+
+ mock_completion.side_effect = litellm.InvalidRequestError(
+ "Invalid request",
+ response=mock,
+ llm_provider="test_provider",
+ model="test_model"
+ )
+
+ result = simple_send_with_retries(self.mock_model, self.mock_messages)
+ assert result is None
+ assert mock_print.call_count == 2 # Error message and description
From c9dfe5daff41c11d83db2c2eb7347321d03122e6 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:01:16 -0800
Subject: [PATCH 23/42] style: Organize imports and format code in
test_sendchat.py
---
tests/basic/test_sendchat.py | 29 +++++++++--------------------
1 file changed, 9 insertions(+), 20 deletions(-)
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index 58758905f..61b2056ec 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -3,7 +3,7 @@ from unittest.mock import MagicMock, patch
from aider.exceptions import LiteLLMExceptions
from aider.llm import litellm
-from aider.sendchat import simple_send_with_retries, send_completion, CACHE
+from aider.sendchat import CACHE, send_completion, simple_send_with_retries
class PrintCalled(Exception):
@@ -14,6 +14,7 @@ class TestSendChat(unittest.TestCase):
def setUp(self):
self.mock_messages = [{"role": "user", "content": "Hello"}]
self.mock_model = "gpt-4"
+
def test_litellm_exceptions(self):
litellm_ex = LiteLLMExceptions()
litellm_ex._load(strict=True)
@@ -47,27 +48,18 @@ class TestSendChat(unittest.TestCase):
# Test basic send_completion
hash_obj, response = send_completion(
- self.mock_model,
- self.mock_messages,
- functions=None,
- stream=False
+ self.mock_model, self.mock_messages, functions=None, stream=False
)
-
+
assert response == mock_response
mock_completion.assert_called_once()
@patch("litellm.completion")
def test_send_completion_with_functions(self, mock_completion):
- mock_function = {
- "name": "test_function",
- "parameters": {"type": "object"}
- }
-
+ mock_function = {"name": "test_function", "parameters": {"type": "object"}}
+
hash_obj, response = send_completion(
- self.mock_model,
- self.mock_messages,
- functions=[mock_function],
- stream=False
+ self.mock_model, self.mock_messages, functions=[mock_function], stream=False
)
# Verify function was properly included in tools
@@ -91,12 +83,9 @@ class TestSendChat(unittest.TestCase):
# Test with an error that shouldn't trigger retries
mock = MagicMock()
mock.status_code = 400
-
+
mock_completion.side_effect = litellm.InvalidRequestError(
- "Invalid request",
- response=mock,
- llm_provider="test_provider",
- model="test_model"
+ "Invalid request", response=mock, llm_provider="test_provider", model="test_model"
)
result = simple_send_with_retries(self.mock_model, self.mock_messages)
From b79c09cf589f10d89d6256ff936e80c7db77a941 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:01:45 -0800
Subject: [PATCH 24/42] refactor: Remove unused CACHE import from
test_sendchat.py
---
tests/basic/test_sendchat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index 61b2056ec..a74b2483d 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -3,7 +3,7 @@ from unittest.mock import MagicMock, patch
from aider.exceptions import LiteLLMExceptions
from aider.llm import litellm
-from aider.sendchat import CACHE, send_completion, simple_send_with_retries
+from aider.sendchat import send_completion, simple_send_with_retries
class PrintCalled(Exception):
From 14d02bc843a67f74f055f1166c1e312d0aa217bd Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:02:48 -0800
Subject: [PATCH 25/42] fix: Handle None response and update
InvalidRequestError test
---
aider/sendchat.py | 2 ++
tests/basic/test_sendchat.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/aider/sendchat.py b/aider/sendchat.py
index e4b8bd7bf..745d10ebb 100644
--- a/aider/sendchat.py
+++ b/aider/sendchat.py
@@ -71,6 +71,8 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
}
_hash, response = send_completion(**kwargs)
+ if not response or not hasattr(response, 'choices') or not response.choices:
+ return None
return response.choices[0].message.content
except litellm_ex.exceptions_tuple() as err:
ex_info = litellm_ex.get_ex_info(err)
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index a74b2483d..2d953e06d 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -85,7 +85,9 @@ class TestSendChat(unittest.TestCase):
mock.status_code = 400
mock_completion.side_effect = litellm.InvalidRequestError(
- "Invalid request", response=mock, llm_provider="test_provider", model="test_model"
+ message="Invalid request",
+ llm_provider="test_provider",
+ model="test_model"
)
result = simple_send_with_retries(self.mock_model, self.mock_messages)
From d0e85d9c2c053a1679cf78f046ef021bcf04dc7a Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:02:54 -0800
Subject: [PATCH 26/42] style: Apply linter formatting to sendchat.py and
test_sendchat.py
---
aider/sendchat.py | 2 +-
tests/basic/test_sendchat.py | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/aider/sendchat.py b/aider/sendchat.py
index 745d10ebb..7414243c2 100644
--- a/aider/sendchat.py
+++ b/aider/sendchat.py
@@ -71,7 +71,7 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
}
_hash, response = send_completion(**kwargs)
- if not response or not hasattr(response, 'choices') or not response.choices:
+ if not response or not hasattr(response, "choices") or not response.choices:
return None
return response.choices[0].message.content
except litellm_ex.exceptions_tuple() as err:
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index 2d953e06d..7bc1751e3 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -85,9 +85,7 @@ class TestSendChat(unittest.TestCase):
mock.status_code = 400
mock_completion.side_effect = litellm.InvalidRequestError(
- message="Invalid request",
- llm_provider="test_provider",
- model="test_model"
+ message="Invalid request", llm_provider="test_provider", model="test_model"
)
result = simple_send_with_retries(self.mock_model, self.mock_messages)
From 7a8399571acfc590c0112d8ee389bc8cb0b99358 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 10:03:49 -0800
Subject: [PATCH 27/42] fix: Handle non-retryable errors by returning None in
simple_send_with_retries
---
aider/sendchat.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aider/sendchat.py b/aider/sendchat.py
index 7414243c2..3d1224bc6 100644
--- a/aider/sendchat.py
+++ b/aider/sendchat.py
@@ -88,10 +88,10 @@ def simple_send_with_retries(model_name, messages, extra_params=None):
should_retry = False
if not should_retry:
- break
+ return None
print(f"Retrying in {retry_delay:.1f} seconds...")
time.sleep(retry_delay)
continue
except AttributeError:
- return
+ return None
From 9dd7b795ca66ce2bb3a9653e63ad1755c9d6c5bb Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 14:18:23 -0800
Subject: [PATCH 28/42] fix: Handle NotFoundError in send chat test with single
print call
---
tests/basic/test_sendchat.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py
index 7bc1751e3..6b2684a40 100644
--- a/tests/basic/test_sendchat.py
+++ b/tests/basic/test_sendchat.py
@@ -84,10 +84,10 @@ class TestSendChat(unittest.TestCase):
mock = MagicMock()
mock.status_code = 400
- mock_completion.side_effect = litellm.InvalidRequestError(
+ mock_completion.side_effect = litellm.NotFoundError(
message="Invalid request", llm_provider="test_provider", model="test_model"
)
result = simple_send_with_retries(self.mock_model, self.mock_messages)
assert result is None
- assert mock_print.call_count == 2 # Error message and description
+ assert mock_print.call_count == 1
From b3d13e44b258934362d7a06477967497f9ce9581 Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Fri, 8 Nov 2024 14:21:59 -0800
Subject: [PATCH 29/42] refactor: Modify cmd_web to add scraped content to
cur_messages as assistant reply
---
aider/commands.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/aider/commands.py b/aider/commands.py
index 45d19c1b8..b48379b9e 100644
--- a/aider/commands.py
+++ b/aider/commands.py
@@ -162,7 +162,8 @@ class Commands:
self.io.tool_output("... done.")
- return content
+ # Add the content to cur_messages as a faux assistant reply
+ self.coder.cur_messages.append(dict(role="assistant", content=content))
def is_command(self, inp):
return inp[0] in "/!"
From 77cb64958eeb6e54004cfc33e5cc2239295351b7 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 14:23:55 -0800
Subject: [PATCH 30/42] refactor: Modify URL scraping and message handling in
commands
---
aider/commands.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/aider/commands.py b/aider/commands.py
index b48379b9e..f701fba8d 100644
--- a/aider/commands.py
+++ b/aider/commands.py
@@ -158,12 +158,14 @@ class Commands:
)
content = self.scraper.scrape(url) or ""
- content = f"{url}:\n\n" + content
+ content = f"Here is the content of {url}:\n\n" + content
- self.io.tool_output("... done.")
+ self.io.tool_output("... added to chat.")
- # Add the content to cur_messages as a faux assistant reply
- self.coder.cur_messages.append(dict(role="assistant", content=content))
+ self.coder.cur_messages += [
+ dict(role="user", content=content),
+ dict(role="assistant", content="Ok."),
+ ]
def is_command(self, inp):
return inp[0] in "/!"
From 52c49fc8fda9c303904ed002b9df725cf5feb7a4 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Fri, 8 Nov 2024 14:27:59 -0800
Subject: [PATCH 31/42] feat: Add option to return web scrape content instead
of printing
---
aider/coders/base_coder.py | 2 +-
aider/commands.py | 4 +++-
tests/scrape/test_scrape.py | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py
index 2f42adfd6..232ea6acb 100755
--- a/aider/coders/base_coder.py
+++ b/aider/coders/base_coder.py
@@ -820,7 +820,7 @@ class Coder:
"Add URL to the chat?", subject=url, group=group, allow_never=True
):
inp += "\n\n"
- inp += self.commands.cmd_web(url)
+ inp += self.commands.cmd_web(url, return_content=True)
added_urls.append(url)
else:
self.rejected_urls.add(url)
diff --git a/aider/commands.py b/aider/commands.py
index f701fba8d..91d0ea7c3 100644
--- a/aider/commands.py
+++ b/aider/commands.py
@@ -139,7 +139,7 @@ class Commands:
else:
self.io.tool_output("Please provide a partial model name to search for.")
- def cmd_web(self, args):
+ def cmd_web(self, args, return_content=False):
"Scrape a webpage, convert to markdown and send in a message"
url = args.strip()
@@ -159,6 +159,8 @@ class Commands:
content = self.scraper.scrape(url) or ""
content = f"Here is the content of {url}:\n\n" + content
+ if return_content:
+ return content
self.io.tool_output("... added to chat.")
diff --git a/tests/scrape/test_scrape.py b/tests/scrape/test_scrape.py
index 500a70a07..82c649324 100644
--- a/tests/scrape/test_scrape.py
+++ b/tests/scrape/test_scrape.py
@@ -44,7 +44,7 @@ class TestScrape(unittest.TestCase):
self.commands.io.tool_error = mock_print_error
# Run the cmd_web command
- result = self.commands.cmd_web("https://example.com")
+ result = self.commands.cmd_web("https://example.com", return_content=True)
# Assert that the result contains some content
self.assertIsNotNone(result)
From c0b1101a52ea9423261cdfbe31f90288a08e6f46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9F=8F=E6=9E=AB?=
Date: Mon, 11 Nov 2024 20:18:30 +0800
Subject: [PATCH 32/42] Add evaluation results of Qwen2.5-Coder series.
---
aider/website/_data/edit_leaderboard.yml | 138 +++++++++++++++++++++++
1 file changed, 138 insertions(+)
diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml
index 09d84630c..644cb6c78 100644
--- a/aider/website/_data/edit_leaderboard.yml
+++ b/aider/website/_data/edit_leaderboard.yml
@@ -1657,3 +1657,141 @@
versions: 0.59.2.dev
seconds_per_case: 18.2
total_cost: 0.0000
+
+- dirname: 2024-10-29-00-29-09--Qwen2.5-Coder-0.5B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-0.5B-Instruct
+ edit_format: whole
+ commit_hash: 58bd375
+ pass_rate_1: 14.3
+ pass_rate_2: 14.3
+ percent_cases_well_formed: 100.0
+ error_outputs: 20
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 45
+ lazy_comments: 0
+ syntax_errors: 2
+ indentation_errors: 0
+ exhausted_context_windows: 20
+ test_timeouts: 2
+ command: aider --model openai/Qwen2.5-Coder-0.5B-Instruct
+ date: 2024-10-29
+ versions: 0.59.2.dev
+ seconds_per_case: 16.0
+ total_cost: 0.0000
+
+- dirname: 2024-11-11-19-37-01--Qwen2.5-Coder-1.5B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-1.5B-Instruct
+ edit_format: whole
+ commit_hash: bb5681c
+ pass_rate_1: 28.6
+ pass_rate_2: 31.6
+ percent_cases_well_formed: 100.0
+ error_outputs: 5
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 13
+ lazy_comments: 2
+ syntax_errors: 1
+ indentation_errors: 0
+ exhausted_context_windows: 5
+ test_timeouts: 2
+ command: aider --model openai/Qwen2.5-Coder-1.5B-Instruct
+ date: 2024-11-11
+ versions: 0.59.2.dev
+ seconds_per_case: 27.4
+ total_cost: 0.0000
+
+- dirname: 2024-11-04-02-25-32--Qwen2.5-Coder-3B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-3B-Instruct
+ edit_format: whole
+ commit_hash: 0ba3647
+ pass_rate_1: 33.8
+ pass_rate_2: 39.1
+ percent_cases_well_formed: 100.0
+ error_outputs: 4
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 3
+ lazy_comments: 0
+ syntax_errors: 0
+ indentation_errors: 0
+ exhausted_context_windows: 4
+ test_timeouts: 6
+ command: aider --model openai/Qwen2.5-Coder-3B-Instruct
+ date: 2024-11-04
+ versions: 0.59.2.dev
+ seconds_per_case: 18.7
+ total_cost: 0.0000
+
+- dirname: 2024-10-16-16-20-59--Qwen2.5-Coder-7B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-7B-Instruct
+ edit_format: whole
+ commit_hash: 92fe979-dirty
+ pass_rate_1: 51.9
+ pass_rate_2: 57.9
+ percent_cases_well_formed: 100.0
+ error_outputs: 2
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 2
+ lazy_comments: 0
+ syntax_errors: 0
+ indentation_errors: 0
+ exhausted_context_windows: 2
+ test_timeouts: 5
+ command: aider --model openai/Qwen2.5-Coder-7B-Instruct
+ date: 2024-10-16
+ versions: 0.59.2.dev
+ seconds_per_case: 10.5
+ total_cost: 0.0000
+
+- dirname: 2024-10-29-11-53-39--Qwen2.5-Coder-14B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-14B-Instruct
+ edit_format: whole
+ commit_hash: 58bd375
+ pass_rate_1: 58.6
+ pass_rate_2: 69.2
+ percent_cases_well_formed: 100.0
+ error_outputs: 3
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 2
+ lazy_comments: 0
+ syntax_errors: 0
+ indentation_errors: 0
+ exhausted_context_windows: 3
+ test_timeouts: 0
+ command: aider --model openai/Qwen2.5-Coder-14B-Instruct
+ date: 2024-10-29
+ versions: 0.59.2.dev
+ seconds_per_case: 18.3
+ total_cost: 0.0000
+
+- dirname: 2024-11-09-10-57-11--Qwen2.5-Coder-32B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-32B-Instruct
+ edit_format: whole
+ commit_hash: ec9982a
+ pass_rate_1: 60.9
+ pass_rate_2: 73.7
+ percent_cases_well_formed: 100.0
+ error_outputs: 1
+ num_malformed_responses: 0
+ num_with_malformed_responses: 0
+ user_asks: 1
+ lazy_comments: 0
+ syntax_errors: 0
+ indentation_errors: 0
+ exhausted_context_windows: 1
+ test_timeouts: 1
+ command: aider --model openai/Qwen2.5-Coder-32B-Instruct
+ date: 2024-11-09
+ versions: 0.59.2.dev
+ seconds_per_case: 26.6
+ total_cost: 0.0000
From be6e3254ea0d14211e9233cc29bbd58d0b509ef9 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 08:45:42 -0800
Subject: [PATCH 33/42] copy
---
aider/website/_data/edit_leaderboard.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml
index 644cb6c78..b61513b84 100644
--- a/aider/website/_data/edit_leaderboard.yml
+++ b/aider/website/_data/edit_leaderboard.yml
@@ -1660,7 +1660,7 @@
- dirname: 2024-10-29-00-29-09--Qwen2.5-Coder-0.5B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-0.5B-Instruct
+ model: Qwen2.5-Coder-0.5B-Instruct
edit_format: whole
commit_hash: 58bd375
pass_rate_1: 14.3
@@ -1683,7 +1683,7 @@
- dirname: 2024-11-11-19-37-01--Qwen2.5-Coder-1.5B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-1.5B-Instruct
+ model: Qwen2.5-Coder-1.5B-Instruct
edit_format: whole
commit_hash: bb5681c
pass_rate_1: 28.6
@@ -1706,7 +1706,7 @@
- dirname: 2024-11-04-02-25-32--Qwen2.5-Coder-3B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-3B-Instruct
+ model: Qwen2.5-Coder-3B-Instruct
edit_format: whole
commit_hash: 0ba3647
pass_rate_1: 33.8
@@ -1729,7 +1729,7 @@
- dirname: 2024-10-16-16-20-59--Qwen2.5-Coder-7B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-7B-Instruct
+ model: Qwen2.5-Coder-7B-Instruct
edit_format: whole
commit_hash: 92fe979-dirty
pass_rate_1: 51.9
@@ -1752,7 +1752,7 @@
- dirname: 2024-10-29-11-53-39--Qwen2.5-Coder-14B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-14B-Instruct
+ model: Qwen2.5-Coder-14B-Instruct
edit_format: whole
commit_hash: 58bd375
pass_rate_1: 58.6
@@ -1775,7 +1775,7 @@
- dirname: 2024-11-09-10-57-11--Qwen2.5-Coder-32B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-32B-Instruct
+ model: Qwen2.5-Coder-32B-Instruct
edit_format: whole
commit_hash: ec9982a
pass_rate_1: 60.9
From 352b91f3427467c672979f7905029a6f340675b9 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 08:46:08 -0800
Subject: [PATCH 34/42] copy
---
aider/website/assets/sample-analytics.jsonl | 45 +++++++++++++++++++++
aider/website/docs/leaderboards/index.md | 2 +-
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl
index 4462d1dcd..a8e85f623 100644
--- a/aider/website/assets/sample-analytics.jsonl
+++ b/aider/website/assets/sample-analytics.jsonl
@@ -702,3 +702,48 @@
{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7053, "completion_tokens": 1311, "total_tokens": 8364, "cost": 0.040824, "total_cost": 0.140376, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088533}
{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8504, "completion_tokens": 124, "total_tokens": 8628, "cost": 0.027372, "total_cost": 0.167748, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088557}
{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7215, "completion_tokens": 127, "total_tokens": 7342, "cost": 0.02355, "total_cost": 0.19129800000000002, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088573}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088724}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088726}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088734}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088742}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088755}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088756}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 3938, "completion_tokens": 561, "total_tokens": 4499, "cost": 0.020229, "total_cost": 0.020229, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088762}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5665, "completion_tokens": 81, "total_tokens": 5746, "cost": 0.01821, "total_cost": 0.038439, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088779}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5869, "completion_tokens": 78, "total_tokens": 5947, "cost": 0.018777000000000002, "total_cost": 0.057216, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088782}
+{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088807}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 5235, "completion_tokens": 281, "total_tokens": 5516, "cost": 0.01992, "total_cost": 0.07713600000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088814}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7656, "completion_tokens": 199, "total_tokens": 7855, "cost": 0.025953000000000004, "total_cost": 0.10308900000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088825}
+{"event": "command_reset", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088844}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088849}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6170, "completion_tokens": 760, "total_tokens": 6930, "cost": 0.029910000000000003, "total_cost": 0.132999, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088870}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6564, "completion_tokens": 126, "total_tokens": 6690, "cost": 0.021582, "total_cost": 0.154581, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088903}
+{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088927}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6794, "completion_tokens": 513, "total_tokens": 7307, "cost": 0.028077, "total_cost": 0.182658, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088940}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 9518, "completion_tokens": 211, "total_tokens": 9729, "cost": 0.031719, "total_cost": 0.21437699999999998, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731088965}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8247, "completion_tokens": 232, "total_tokens": 8479, "cost": 0.028221, "total_cost": 0.24259799999999998, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731089026}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104297}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104362}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104363}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104481}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104484}
+{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104486}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 13609, "completion_tokens": 193, "total_tokens": 13802, "cost": 0.043722000000000004, "total_cost": 0.043722000000000004, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104517}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104571}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104573}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104579}
+{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104580}
+{"event": "command_web", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104586}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5465, "completion_tokens": 84, "total_tokens": 5549, "cost": 0.017655, "total_cost": 0.017655, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104600}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104626}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104710}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104711}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104870}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104934}
+{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731104934}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731113790}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731115722}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 15622, "completion_tokens": 22, "total_tokens": 15644, "cost": 0.047195999999999995, "total_cost": 0.047195999999999995, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731115754}
+{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "str-replace", "prompt_tokens": 2506, "completion_tokens": 40, "total_tokens": 2546, "cost": 0.008118, "total_cost": 0.055313999999999995, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731116109}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731163157}
+{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.62.2.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1731163182}
diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md
index 7563bec64..c79047551 100644
--- a/aider/website/docs/leaderboards/index.md
+++ b/aider/website/docs/leaderboards/index.md
@@ -318,6 +318,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.')}")
]]]-->
-November 07, 2024.
+November 11, 2024.
From bd9c43a48df3b857474f7dedf58753ca1782495f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9F=8F=E6=9E=AB?=
Date: Tue, 12 Nov 2024 01:23:19 +0800
Subject: [PATCH 35/42] Add evaluation results for Qwen2.5-Coder-32B-Instruct
using the diff format.
---
aider/website/_data/edit_leaderboard.yml | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml
index b61513b84..ef92fd8b4 100644
--- a/aider/website/_data/edit_leaderboard.yml
+++ b/aider/website/_data/edit_leaderboard.yml
@@ -1795,3 +1795,26 @@
versions: 0.59.2.dev
seconds_per_case: 26.6
total_cost: 0.0000
+
+- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
+ test_cases: 133
+ model: openai/Qwen2.5-Coder-32B-Instruct
+ edit_format: diff
+ commit_hash: ec9982a
+ pass_rate_1: 59.4
+ pass_rate_2: 71.4
+ percent_cases_well_formed: 94.7
+ error_outputs: 17
+ num_malformed_responses: 17
+ num_with_malformed_responses: 7
+ user_asks: 1
+ lazy_comments: 0
+ syntax_errors: 0
+ indentation_errors: 0
+ exhausted_context_windows: 0
+ test_timeouts: 3
+ command: aider --model openai/Qwen2.5-Coder-32B-Instruct
+ date: 2024-11-09
+ versions: 0.59.2.dev
+ seconds_per_case: 22.5
+ total_cost: 0.0000
From f66b916d4b5ac318ecd1c661c6a6744ed0fea60f Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 09:36:23 -0800
Subject: [PATCH 36/42] feat: Add language configuration for user communication
in prompts
---
aider/coders/base_coder.py | 6 ++++++
aider/coders/editblock_prompts.py | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py
index 232ea6acb..164010140 100755
--- a/aider/coders/base_coder.py
+++ b/aider/coders/base_coder.py
@@ -956,12 +956,18 @@ class Coder:
platform=platform_text
)
+ if self.chat_language:
+ language = self.chat_language
+ else:
+ language = "in the same language they are using"
+
prompt = prompt.format(
fence=self.fence,
lazy_prompt=lazy_prompt,
platform=platform_text,
shell_cmd_prompt=shell_cmd_prompt,
shell_cmd_reminder=shell_cmd_reminder,
+ language=language,
)
return prompt
diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py
index 05d2a3de3..da2acdf95 100644
--- a/aider/coders/editblock_prompts.py
+++ b/aider/coders/editblock_prompts.py
@@ -11,7 +11,7 @@ Respect and use existing conventions, libraries, etc that are already present in
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
-Always reply to the user in the same language they are using.
+Always reply to the user in {language}.
Once you understand the request you MUST:
From 21b88c0e65283ee9d72ad42f3d4c4c3132fe110c Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 09:38:30 -0800
Subject: [PATCH 37/42] refactor: Update language reply prompts to use
{language} placeholder
---
aider/coders/architect_prompts.py | 2 +-
aider/coders/ask_prompts.py | 2 +-
aider/coders/udiff_prompts.py | 2 +-
aider/coders/wholefile_prompts.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/aider/coders/architect_prompts.py b/aider/coders/architect_prompts.py
index e6798dbba..2ac23f5fc 100644
--- a/aider/coders/architect_prompts.py
+++ b/aider/coders/architect_prompts.py
@@ -13,7 +13,7 @@ Just show the changes needed.
DO NOT show the entire updated function/file/etc!
-Always reply in the same language as the change request.
+Always reply to the user in {language}.
"""
example_messages = []
diff --git a/aider/coders/ask_prompts.py b/aider/coders/ask_prompts.py
index 7e1da106a..198ec6172 100644
--- a/aider/coders/ask_prompts.py
+++ b/aider/coders/ask_prompts.py
@@ -6,7 +6,7 @@ from .base_prompts import CoderPrompts
class AskPrompts(CoderPrompts):
main_system = """Act as an expert code analyst.
Answer questions about the supplied code.
-Always reply to the user in the same language they are using.
+Always reply to the user in {language}.
"""
example_messages = []
diff --git a/aider/coders/udiff_prompts.py b/aider/coders/udiff_prompts.py
index 8084f885c..5e7ca2c13 100644
--- a/aider/coders/udiff_prompts.py
+++ b/aider/coders/udiff_prompts.py
@@ -12,7 +12,7 @@ Respect and use existing conventions, libraries, etc that are already present in
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
-Always reply to the user in the same language they are using.
+Always reply to the user in {language}.
For each file that needs to be changed, write out the changes similar to a unified diff like `diff -U0` would produce.
"""
diff --git a/aider/coders/wholefile_prompts.py b/aider/coders/wholefile_prompts.py
index 615645f69..95a4bb87b 100644
--- a/aider/coders/wholefile_prompts.py
+++ b/aider/coders/wholefile_prompts.py
@@ -8,7 +8,7 @@ class WholeFilePrompts(CoderPrompts):
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
-Always reply to the user in the same language they are using.
+Always reply to the user in {language}.
{lazy_prompt}
Once you understand the request you MUST:
From 5751bcd382b7857f84ee1227e5001da2270e403c Mon Sep 17 00:00:00 2001
From: "Paul Gauthier (aider)"
Date: Mon, 11 Nov 2024 09:54:43 -0800
Subject: [PATCH 38/42] refactor: Move Path.cwd() call to top of setup_git and
add OSError handling
---
aider/main.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/aider/main.py b/aider/main.py
index 179d4560f..cd25b2445 100644
--- a/aider/main.py
+++ b/aider/main.py
@@ -87,15 +87,20 @@ def make_new_repo(git_root, io):
def setup_git(git_root, io):
+ try:
+ cwd = Path.cwd()
+ except OSError:
+ return None
+
repo = None
if git_root:
repo = git.Repo(git_root)
- elif Path.cwd() == Path.home():
+ elif cwd == Path.home():
io.tool_warning("You should probably run aider in a directory, not your home dir.")
return
elif io.confirm_ask("No git repo found, create one to track aider's changes (recommended)?"):
- git_root = str(Path.cwd().resolve())
+ git_root = str(cwd.resolve())
repo = make_new_repo(git_root, io)
if not repo:
From 94a6d3bc7e166c2c224e6c47e2c75c50ec8630e8 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 09:55:23 -0800
Subject: [PATCH 39/42] fix: Handle case when current working directory is
inaccessible in git setup
---
aider/main.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/aider/main.py b/aider/main.py
index cd25b2445..2d3b10086 100644
--- a/aider/main.py
+++ b/aider/main.py
@@ -90,7 +90,7 @@ def setup_git(git_root, io):
try:
cwd = Path.cwd()
except OSError:
- return None
+ cwd = None
repo = None
@@ -99,7 +99,9 @@ def setup_git(git_root, io):
elif cwd == Path.home():
io.tool_warning("You should probably run aider in a directory, not your home dir.")
return
- elif io.confirm_ask("No git repo found, create one to track aider's changes (recommended)?"):
+ elif cwd and io.confirm_ask(
+ "No git repo found, create one to track aider's changes (recommended)?"
+ ):
git_root = str(cwd.resolve())
repo = make_new_repo(git_root, io)
From acfb7c3a8992db38353338c5624244e8cb8751e8 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 09:56:19 -0800
Subject: [PATCH 40/42] fix: Handle git repo initialization errors gracefully
---
aider/main.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/aider/main.py b/aider/main.py
index 2d3b10086..a604c5f64 100644
--- a/aider/main.py
+++ b/aider/main.py
@@ -95,7 +95,10 @@ def setup_git(git_root, io):
repo = None
if git_root:
- repo = git.Repo(git_root)
+ try:
+ repo = git.Repo(git_root)
+ except ANY_GIT_ERROR:
+ pass
elif cwd == Path.home():
io.tool_warning("You should probably run aider in a directory, not your home dir.")
return
From 557f25bf806c7c91dac1a865d08931af7e6c73fe Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 10:30:00 -0800
Subject: [PATCH 41/42] copy
---
aider/website/_data/edit_leaderboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml
index ef92fd8b4..b7df7357a 100644
--- a/aider/website/_data/edit_leaderboard.yml
+++ b/aider/website/_data/edit_leaderboard.yml
@@ -1798,7 +1798,7 @@
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
test_cases: 133
- model: openai/Qwen2.5-Coder-32B-Instruct
+ model: Qwen2.5-Coder-32B-Instruct
edit_format: diff
commit_hash: ec9982a
pass_rate_1: 59.4
From 44063590e2ba6b26d6b3d1eedffa984a3d2ba988 Mon Sep 17 00:00:00 2001
From: Paul Gauthier
Date: Mon, 11 Nov 2024 10:30:23 -0800
Subject: [PATCH 42/42] copy
---
aider/website/_data/edit_leaderboard.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml
index b7df7357a..24a126e3d 100644
--- a/aider/website/_data/edit_leaderboard.yml
+++ b/aider/website/_data/edit_leaderboard.yml
@@ -1775,7 +1775,7 @@
- dirname: 2024-11-09-10-57-11--Qwen2.5-Coder-32B-Instruct
test_cases: 133
- model: Qwen2.5-Coder-32B-Instruct
+ model: Qwen2.5-Coder-32B-Instruct (whole)
edit_format: whole
commit_hash: ec9982a
pass_rate_1: 60.9
@@ -1798,7 +1798,7 @@
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
test_cases: 133
- model: Qwen2.5-Coder-32B-Instruct
+ model: Qwen2.5-Coder-32B-Instruct (diff)
edit_format: diff
commit_hash: ec9982a
pass_rate_1: 59.4