Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aider appears to be defaulting to OpenAI for commit messages #2663

Open
jkoshiel opened this issue Dec 19, 2024 · 0 comments
Open

Aider appears to be defaulting to OpenAI for commit messages #2663

jkoshiel opened this issue Dec 19, 2024 · 0 comments

Comments

@jkoshiel
Copy link

jkoshiel commented Dec 19, 2024

Issue

Aider is throwing errors related to OpenAI API keys when using other models. This began occurring in 0.69.1.

OS:
Arch Linux/hyprland/kitty (all packages up to date)

Steps to reproduce using Openrouter:
open terminal
cd to local repo

run:
export OPENROUTER_API_KEY=with_a_valid_key_here

run:
aider

aider command:
/model openrouter/anthropic/claude-3.5-sonnet

Add some files using /add

send a prompt to the model
model

prompt is sent to OpenRouter without issue, filed edited, and commit is applied. At the end of the cycle, it prints the following chain:

Tokens: 12k sent, 757 received. Cost: $0.05 message, $0.38 session.
Applied edit to src/filename.ext (file name removed to protect the innocent tokens)
litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The API provider is not able to authenticate you. Check your API key.
litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The API provider is not able to authenticate you. Check your API key.
Failed to generate commit message!
Commit 488248e (no commit message provided)
litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The API provider is not able to authenticate you. Check your API key.
litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The API provider is not able to authenticate you. Check your API key.
summarizer unexpectedly failed for all models
You can use /undo to undo and discard each aider commit.

Version and model info

Aider v0.69.1
Main model: openrouter/anthropic/claude-3.5-sonnet with diff edit format, infinite output
Weak model: openrouter/anthropic/claude-3-5-haiku
Git repo: .git with 157 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant