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,
|
||||
'--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')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user