Skip to content

Commit

Permalink
Use anthropic model (the default) if the api key is present in env
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Nov 16, 2024
1 parent 730ff65 commit 10482dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aider
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
# TODO adjust for other OS
# This is need for Mac as the default clang is too old
export CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++ CPATH=/opt/homebrew/opt/llvm/include LIBRARY_PATH=/opt/homebrew/opt/llvm/lib

export MODEL='openai/xai:grok-beta'

if [ -n "$ANTHROPIC_API_KEY" ]; then
export MODEL=""
fi
# This runs aider in a virtual environment with the specified model, configs etc.
uvx --python 3.11 --from 'aider-chat[help,playwright]' aider --no-show-model-warnings --model 'openai/xai:grok-beta' --max-chat-history-tokens 8000 --dark-mode --subtree-only "$@"
uvx --python 3.11 --from 'aider-chat[help,playwright]' aider --no-show-model-warnings --model "$MODEL" --max-chat-history-tokens 8000 --dark-mode --subtree-only "$@"

0 comments on commit 10482dd

Please sign in to comment.