Compare commits

...

4 Commits

Author SHA1 Message Date
a8ce6102d2 fix: return true early in verify_solution if no evaluator model is set
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 22s
2025-04-24 12:07:08 +02:00
236d1c0a10 Ruff after aider
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s
2025-04-24 11:55:25 +02:00
7a35029a18 feat: add CLI options to override aider and evaluator models 2025-04-24 11:55:21 +02:00
7a73a1e3fc Initial ruff pass 2025-04-24 11:54:41 +02:00
3 changed files with 24 additions and 1 deletions

View File

@ -387,6 +387,9 @@ def run_ollama_and_get_yes_or_no(cwd, initial_texts: list[str]) -> bool:
def verify_solution(repository_path: Path, issue_content: str) -> bool:
if not EVALUATOR_MODEL:
return True
summary = run_ollama(
repository_path,
[

View File

@ -45,6 +45,16 @@ def parse_args():
default=300,
help='Interval in seconds between checks in daemon mode (default: 300)',
)
parser.add_argument(
'--aider-model',
help='Model to use for generating code (overrides default)',
default=None,
)
parser.add_argument(
'--evaluator-model',
help='Model to use for evaluating code (overrides default)',
default=None,
)
return parser.parse_args()
@ -52,6 +62,14 @@ def main():
logging.basicConfig(level='INFO')
args = parse_args()
# Override default models if provided
import aider_gitea as core
if args.aider_model:
core.CODE_MODEL = args.aider_model
if args.evaluator_model:
core.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: