From 38b22d99c9b2aa1c8e050b20bbc7e237656ebd30 Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Thu, 24 Apr 2025 11:32:25 +0200 Subject: [PATCH] feat: add --aider-model and --evaluator-model CLI flags to override models --- aider_gitea/__main__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/aider_gitea/__main__.py b/aider_gitea/__main__.py index d2e1185..80baf8a 100644 --- a/aider_gitea/__main__.py +++ b/aider_gitea/__main__.py @@ -11,6 +11,7 @@ import time from . import RepositoryConfig, secrets, solve_issues_in_repository from .gitea_client import GiteaClient from .seen_issues_db import SeenIssuesDB +import aider_gitea logger = logging.getLogger(__name__) @@ -45,12 +46,26 @@ def parse_args(): default=300, help='Interval in seconds between checks in daemon mode (default: 300)', ) + parser.add_argument( + '--aider-model', + default=None, + help='Aider model to use (overrides default CODE_MODEL)', + ) + parser.add_argument( + '--evaluator-model', + default=None, + help='Evaluator model to use (overrides default EVALUATOR_MODEL)', + ) return parser.parse_args() def main(): logging.basicConfig(level='INFO') args = parse_args() + if args.aider_model: + aider_gitea.CODE_MODEL = args.aider_model + if args.evaluator_model: + aider_gitea.EVALUATOR_MODEL = args.evaluator_model seen_issues_db = SeenIssuesDB() client = GiteaClient(args.gitea_url, secrets.gitea_token())