Enable multi-api-key secrets
This commit is contained in:
parent
f28df768e7
commit
9dfbc5efa4
|
@ -155,8 +155,6 @@ def create_aider_command(issue: str) -> list[str]:
|
||||||
AIDER_LINT,
|
AIDER_LINT,
|
||||||
'--auto-test',
|
'--auto-test',
|
||||||
'--no-auto-lint',
|
'--no-auto-lint',
|
||||||
'--api-key',
|
|
||||||
secrets.llm_api_key(),
|
|
||||||
'--read',
|
'--read',
|
||||||
'CONVENTIONS.md',
|
'CONVENTIONS.md',
|
||||||
'--message',
|
'--message',
|
||||||
|
@ -164,6 +162,9 @@ def create_aider_command(issue: str) -> list[str]:
|
||||||
'--yes',
|
'--yes',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
for key in secrets.llm_api_keys():
|
||||||
|
l += ['--api-key', key]
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
l.append('--cache-prompts')
|
l.append('--cache-prompts')
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ import secret_loader
|
||||||
SECRETS = secret_loader.SecretLoader()
|
SECRETS = secret_loader.SecretLoader()
|
||||||
|
|
||||||
|
|
||||||
def llm_api_key():
|
def llm_api_keys() -> list[str]:
|
||||||
return SECRETS.load_or_fail('LLM_API_KEY')
|
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')
|
return SECRETS.load_or_fail('GITEA_TOKEN')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user