Compare commits

...

4 Commits

Author SHA1 Message Date
e382e5ca1b Ruff after aider
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 25s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 23s
2025-04-23 23:53:00 +02:00
a84387b0bb fix: insert model assignments after parsing args in main() function 2025-04-23 23:52:55 +02:00
d6789274a0 feat: add CLI options for specifying code and evaluator models 2025-04-23 23:52:43 +02:00
97d513e511 Initial ruff pass 2025-04-23 23:51:44 +02:00
2 changed files with 17 additions and 1 deletions

View File

@ -8,6 +8,8 @@ import argparse
import logging
import time
import aider_gitea
from . import RepositoryConfig, secrets, solve_issues_in_repository
from .gitea_client import GiteaClient
from .seen_issues_db import SeenIssuesDB
@ -45,12 +47,24 @@ def parse_args():
default=300,
help='Interval in seconds between checks in daemon mode (default: 300)',
)
parser.add_argument(
'--code-model',
default='o4-mini',
help='Code model for Aider (default: o4-mini)',
)
parser.add_argument(
'--evaluator-model',
default='ollama/gemma3:27b',
help='Evaluator model for review (default: ollama/gemma3:27b)',
)
return parser.parse_args()
def main():
logging.basicConfig(level='INFO')
args = parse_args()
aider_gitea.CODE_MODEL = args.code_model
aider_gitea.EVALUATOR_MODEL = args.evaluator_model
seen_issues_db = SeenIssuesDB()
client = GiteaClient(args.gitea_url, secrets.gitea_token())

View File

@ -169,7 +169,9 @@ class GiteaClient:
# If a pull request for this head/base already exists, return it instead of crashing
if response.status_code == 409:
logger.warning(
'Pull request already exists for head %s and base %s', head, base,
'Pull request already exists for head %s and base %s',
head,
base,
)
prs = self.get_pull_requests(owner, repo)
for pr in prs: