Enable multi-api-key secrets
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes 2025-04-15 23:27:55 +02:00
parent f28df768e7
commit 9dfbc5efa4
2 changed files with 6 additions and 5 deletions

View File

@ -155,8 +155,6 @@ def create_aider_command(issue: str) -> list[str]:
AIDER_LINT,
'--auto-test',
'--no-auto-lint',
'--api-key',
secrets.llm_api_key(),
'--read',
'CONVENTIONS.md',
'--message',
@ -164,6 +162,9 @@ def create_aider_command(issue: str) -> list[str]:
'--yes',
]
for key in secrets.llm_api_keys():
l += ['--api-key', key]
if True:
l.append('--cache-prompts')

View File

@ -3,9 +3,9 @@ import secret_loader
SECRETS = secret_loader.SecretLoader()
def llm_api_key():
return SECRETS.load_or_fail('LLM_API_KEY')
def llm_api_keys() -> list[str]:
return SECRETS.load_or_fail('LLM_API_KEY').strip().split('\n')
def gitea_token():
def gitea_token() -> str:
return SECRETS.load_or_fail('GITEA_TOKEN')