Closed1
aiderでBedrockのClaude3.5 Sonnet V2を使う設定

aiderのドキュメントを参照
AWSの準備
- us-east-1 を使う前提
- aws-cli のプロファイル作成
- us-east-1 と us-west-2の Claude3.5 Sonnet v2 とClaude3.5 Haiku を有効にする
aiderの設定
下記URLに設定ファイルのサンプルがあるので、これを修正。
修正箇所は以下のとおり
~/.aider.conf.yml
model: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
dark-mode: true
commit-prompt: "コメントは日本語で書いて.「Conventional Commits」に準拠したsubjectのみとし、60文字以内で要約して"
chat-language: ja
以下のように実行すると、aiderで使用できるbedrockのモデルが参照できる。
aider --list-models bedrock/
aider実行時の色々と引数を指定したいのでaliasを ~/.bashrcに登録
alias aider='env AWS_PROFILE=sandbox aider --chat-mode ask --watch-files --subtree-only --no-show-model-warnings'
下記のように実行すると aider が使える
$ aider
──────────────────────────────────────────────────────────────────────────────────────────────
Aider v0.73.0
Main model: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0 with ask edit format, infinite
output
Weak model: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
Git repo: ../../../.git with 1 files
Repo-map: using 4096 tokens, auto refresh
Note: in-chat filenames are always relative to the git working dir, not the current working
dir.
Cur working dir: /home/blue21/workspace/xxxx
Git working dir: /home/blue21/workspace/
──────────────────────────────────────────────────────────────────────────────────────────────
ask>
このスクラップは2025/02/02にクローズされました