-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaider
executable file
·31 lines (29 loc) · 1.7 KB
/
aider
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# 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
# ALIASES="--alias 'best:sonnet' --alias 'weak:haiku'"
if [[ "$OPENAI_API_BASE" == *"hunyuan"* ]]; then
export MODELS='--model openai/hunyuan-code'
# https://aider.chat/2025/01/24/r1-sonnet.html
elif [[ "$OPENAI_API_BASE" == *"localhost:15432"* ]] && [ -n "$DEEPSEEK_API_KEY" ]; then
export MODELS='--architect --model deepseek/deepseek-reasoner --editor-model openai/claude-3.5-sonnet'
elif [ -n "$DEEPSEEK_API_KEY" ]; then
export MODELS='--model deepseek'
elif [[ "$OPENAI_API_BASE" == *"glhf.chat"* ]]; then
# inspired by https://www.youtube.com/watch?v=AFiH_aErDBA&ab_channel=AICodeKing
export MODELS="--architect --model openai/hf:Qwen/QwQ-32B-Preview --editor-model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct"
elif [[ "$OPENAI_API_BASE" == *"localhost:15432"* ]]; then
export MODELS='--model openai/claude-3.5-sonnet'
elif [[ "$OPENAI_API_BASE" == *"0.0.0.0:4000"* ]]; then
export MODELS='--model openai/xai:grok-beta'
elif [ -n "$ANTHROPIC_API_KEY" ]; then
# explicitly set the default
export MODELS="--model sonnet --weak-model haiku"
else
echo "No model available in the environment, please check .env file"
exit 1
fi
echo "Using model: $MODELS"
# This runs aider in a virtual environment with the specified model, configs etc.
uvx --python 3.11 --from 'aider-chat[help,playwright,browser]' aider --no-show-model-warnings --no-auto-lint $MODELS --max-chat-history-tokens 8000 --map-tokens 1024 --dark-mode --subtree-only "$@"