mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: Append OpenRouter API key to oauth-keys.env instead of overwriting
This commit is contained in:
parent
928b78d9f6
commit
91497dc2ee
1 changed files with 1 additions and 2 deletions
|
@ -338,8 +338,7 @@ def start_openrouter_oauth_flow(io, analytics):
|
|||
config_dir = os.path.expanduser("~/.aider")
|
||||
os.makedirs(config_dir, exist_ok=True)
|
||||
key_file = os.path.join(config_dir, "oauth-keys.env")
|
||||
# append ai!
|
||||
with open(key_file, "w", encoding="utf-8") as f:
|
||||
with open(key_file, "a", encoding="utf-8") as f:
|
||||
f.write(f'OPENROUTER_API_KEY="{api_key}"\n')
|
||||
io.tool_output(f"Successfully obtained OpenRouter API key and saved it to {key_file}")
|
||||
io.tool_output("Aider will load this key automatically in future sessions.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue