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

Move ModelSettings to yml files in the models directory #2846

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
783 changes: 36 additions & 747 deletions aider/models.py

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions aider/models/anthropic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
definitions:
- &anthropic-base
edit_format: "diff"
use_repo_map: true

- &anthropic-haiku-base
<<: *anthropic-base
weak_model_name: "claude-3-5-haiku-20241022"

- &anthropic-cache-headers
extra_headers:
anthropic-beta: "prompt-caching-2024-07-31,pdfs-2024-09-25"

- &anthropic-cache-params
extra_params:
<<: *anthropic-cache-headers
cache_control: true

- &anthropic-haiku-cache
<<: *anthropic-haiku-base
<<: *anthropic-cache-params

- &anthropic-sonnet-base
<<: *anthropic-haiku-cache
editor_edit_format: "editor-diff"
examples_as_sys_msg: true
reminder: "user"
extra_params:
<<: *anthropic-cache-headers
max_tokens: 8192

- &anthropic-sonnet-self-edit
<<: *anthropic-sonnet-base
editor_model_name: "${self}"

models:
- <<: *anthropic-haiku-base
provider: ""
name: "claude-3-opus-20240229"

- <<: *anthropic-haiku-base
provider: "openrouter"
name: "anthropic/claude-3-opus"
weak_model_name: "openrouter/anthropic/claude-3-5-haiku"

- provider: ""
name: "claude-3-sonnet-20240229"
edit_format: "whole"
weak_model_name: "claude-3-5-haiku-20241022"

- <<: *anthropic-sonnet-self-edit
provider: ""
name: "claude-3-5-sonnet-20240620"

- <<: *anthropic-sonnet-self-edit
provider: "anthropic"
name: "claude-3-5-sonnet-20240620"
weak_model_name: "anthropic/claude-3-5-haiku-20241022"
editor_model_name: "anthropic/claude-3-5-sonnet-20240620"

- <<: *anthropic-sonnet-self-edit
provider: "anthropic"
name: "claude-3-5-sonnet-20241022"
weak_model_name: "anthropic/claude-3-5-haiku-20241022"
editor_model_name: "anthropic/claude-3-5-sonnet-20241022"

- <<: *anthropic-sonnet-self-edit
provider: "bedrock"
name: "anthropic.claude-3-5-sonnet-20241022-v2:0"
weak_model_name: "bedrock/anthropic.claude-3-5-haiku-20241022-v1:0"
editor_model_name: "bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0"

- <<: *anthropic-sonnet-self-edit
provider: "anthropic"
name: "claude-3-5-sonnet-latest"
weak_model_name: "anthropic/claude-3-5-haiku-20241022"
editor_model_name: "anthropic/claude-3-5-sonnet-20241022"

- <<: *anthropic-sonnet-self-edit
provider: ""
name: "claude-3-5-sonnet-20241022"

- provider: "anthropic"
name: "claude-3-haiku-20240307"
edit_format: "whole"
weak_model_name: "anthropic/claude-3-haiku-20240307"
examples_as_sys_msg: true
<<: *anthropic-cache-params

- <<: *anthropic-haiku-cache
provider: "anthropic"
name: "claude-3-5-haiku-20241022"
weak_model_name: "anthropic/claude-3-5-haiku-20241022"

- <<: *anthropic-haiku-cache
provider: "bedrock"
name: "anthropic.claude-3-5-haiku-20241022-v1:0"
weak_model_name: "bedrock/anthropic.claude-3-5-haiku-20241022-v1:0"

- <<: *anthropic-haiku-cache
provider: ""
name: "claude-3-5-haiku-20241022"
examples_as_sys_msg: true

- <<: *anthropic-base
provider: "vertex_ai"
name: "claude-3-5-haiku@20241022"
weak_model_name: "vertex_ai/claude-3-5-haiku@20241022"
extra_params:
max_tokens: 4096

- provider: ""
name: "claude-3-haiku-20240307"
edit_format: "whole"
weak_model_name: "claude-3-haiku-20240307"
examples_as_sys_msg: true
<<: *anthropic-cache-params

- <<: *anthropic-sonnet-base
provider: "openrouter"
name: "anthropic/claude-3.5-sonnet"
weak_model_name: "openrouter/anthropic/claude-3-5-haiku"
editor_model_name: "openrouter/anthropic/claude-3.5-sonnet"

- <<: *anthropic-sonnet-base
provider: "openrouter"
name: "anthropic/claude-3.5-sonnet:beta"
weak_model_name: "openrouter/anthropic/claude-3-5-haiku:beta"
editor_model_name: "openrouter/anthropic/claude-3.5-sonnet:beta"

- <<: *anthropic-sonnet-base
provider: "vertex_ai"
name: "claude-3-5-sonnet@20240620"
weak_model_name: "vertex_ai/claude-3-5-haiku@20241022"
editor_model_name: "vertex_ai/claude-3-5-sonnet@20240620"

- <<: *anthropic-sonnet-base
provider: "vertex_ai"
name: "claude-3-5-sonnet-v2@20241022"
weak_model_name: "vertex_ai/claude-3-5-haiku@20241022"
editor_model_name: "vertex_ai/claude-3-5-sonnet-v2@20241022"

- <<: *anthropic-haiku-base
provider: "vertex_ai"
name: "claude-3-opus@20240229"
weak_model_name: "vertex_ai/claude-3-5-haiku@20241022"

- provider: "vertex_ai"
name: "claude-3-sonnet@20240229"
edit_format: "whole"
weak_model_name: "vertex_ai/claude-3-5-haiku@20241022"
65 changes: 65 additions & 0 deletions aider/models/deepseek.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
definitions:
- &deepseek-base
edit_format: "diff"
use_repo_map: true
examples_as_sys_msg: true
reminder: "sys"

- &deepseek-with-tokens
<<: *deepseek-base
extra_params:
max_tokens: 8192

- &deepseek-coder
<<: *deepseek-with-tokens
name: "deepseek-coder"
caches_by_default: true

- &deepseek-chat
<<: *deepseek-with-tokens
name: "deepseek-chat"

- &deepseek-reasoner
edit_format: "diff"
editor_edit_format: "editor-diff"
use_repo_map: true
examples_as_sys_msg: true
use_temperature: false
reminder: "user"
caches_by_default: true
extra_params:
max_tokens: 8192

models:
- <<: *deepseek-chat
provider: "deepseek"
caches_by_default: true

- <<: *deepseek-coder
provider: "deepseek"

- <<: *deepseek-chat
provider: ""

- <<: *deepseek-coder
provider: ""

- <<: *deepseek-base
provider: "openrouter"
name: "deepseek/deepseek-coder"

- <<: *deepseek-base
provider: "openrouter"
name: "deepseek/deepseek-chat"

- <<: *deepseek-reasoner
provider: "openrouter"
name: "deepseek/deepseek-r1"
weak_model_name: "openrouter/deepseek/deepseek-chat"
editor_model_name: "openrouter/deepseek/deepseek-chat"

- <<: *deepseek-reasoner
provider: "deepseek"
name: "deepseek-reasoner"
weak_model_name: "deepseek/deepseek-chat"
editor_model_name: "deepseek/deepseek-chat"
54 changes: 54 additions & 0 deletions aider/models/gemini.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
definitions:
- &gemini-base
provider: "gemini"
use_repo_map: true

- &gemini-diff-base
<<: *gemini-base
edit_format: "diff"

- &gemini-diff-fenced-base
<<: *gemini-base
edit_format: "diff-fenced"

- &gemini-flash-base
<<: *gemini-base
edit_format: "whole"
use_repo_map: false
send_undo_reply: false

models:
- <<: *gemini-diff-base
name: "gemini-1.5-pro-002"

- <<: *gemini-flash-base
name: "gemini-1.5-flash-002"
use_repo_map: false

- <<: *gemini-diff-fenced-base
name: "gemini-1.5-pro"

- <<: *gemini-diff-fenced-base
name: "gemini-1.5-pro-latest"

- <<: *gemini-diff-fenced-base
name: "gemini-1.5-pro-exp-0827"

- <<: *gemini-diff-base
name: "gemini-exp-1206"

- <<: *gemini-diff-base
name: "gemini-exp-1114"

- <<: *gemini-diff-base
name: "gemini-exp-1121"

- <<: *gemini-diff-fenced-base
provider: "vertex_ai"
name: "gemini-pro-experimental"

- <<: *gemini-flash-base
name: "gemini-1.5-flash-exp-0827"

- <<: *gemini-diff-base
name: "gemini-2.0-flash-exp"
17 changes: 17 additions & 0 deletions aider/models/llama.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
models:
- provider: "groq"
name: "llama3-70b-8192"
edit_format: "diff"
weak_model_name: "groq/llama3-8b-8192"
use_repo_map: false
send_undo_reply: false
examples_as_sys_msg: true

- provider: "openrouter"
name: "meta-llama/llama-3-70b-instruct"
edit_format: "diff"
weak_model_name: "openrouter/meta-llama/llama-3-70b-instruct"
use_repo_map: false
send_undo_reply: false
examples_as_sys_msg: true

Loading
Loading