From f3ff24e35af55351fe6156ce7e34dffd90bc6770 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:48:50 +0200 Subject: [PATCH 1/7] doc: clarify soft limit for chat history tokens --- aider/args.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/args.py b/aider/args.py index 567160abe..5b94097a8 100644 --- a/aider/args.py +++ b/aider/args.py @@ -237,8 +237,10 @@ def get_parser(default_config_files, git_root): type=int, default=None, help=( - "Maximum number of tokens to use for chat history. If not specified, uses the model's" - " max_chat_history_tokens." + ( + "Soft limit on tokens for chat history, after which summarization begins." + " If unspecified, defaults to the model's max_chat_history_tokens." + ), ), ) # This is a duplicate of the argument in the preparser and is a no-op by this time of From 3bc056a107056f0d2f4f61ac5b4ebb81bd1d7cc0 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:22:01 +0200 Subject: [PATCH 2/7] doc: fix wrong encapsulation --- aider/args.py | 6 ++---- aider/website/assets/sample.env | 2 +- aider/website/docs/config/dotenv.md | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aider/args.py b/aider/args.py index 5b94097a8..0807020ea 100644 --- a/aider/args.py +++ b/aider/args.py @@ -237,10 +237,8 @@ def get_parser(default_config_files, git_root): type=int, default=None, help=( - ( - "Soft limit on tokens for chat history, after which summarization begins." - " If unspecified, defaults to the model's max_chat_history_tokens." - ), + "Soft limit on tokens for chat history, after which summarization begins." + " If unspecified, defaults to the model's max_chat_history_tokens." ), ) # This is a duplicate of the argument in the preparser and is a no-op by this time of diff --git a/aider/website/assets/sample.env b/aider/website/assets/sample.env index f96fd9964..f69f75c0f 100644 --- a/aider/website/assets/sample.env +++ b/aider/website/assets/sample.env @@ -108,7 +108,7 @@ ## Only work with models that have meta-data available (default: True) #AIDER_SHOW_MODEL_WARNINGS=true -## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. +## ("Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.",) #AIDER_MAX_CHAT_HISTORY_TOKENS= ## Specify the .env file to load (default: .env in git root) diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index 0da62a6bf..6541b2c20 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -150,7 +150,7 @@ cog.outl("```") ## Only work with models that have meta-data available (default: True) #AIDER_SHOW_MODEL_WARNINGS=true -## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. +## ("Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.",) #AIDER_MAX_CHAT_HISTORY_TOKENS= ## Specify the .env file to load (default: .env in git root) From 91a013afb3dd296fa1532170eb4850aadffc4587 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:22:50 +0200 Subject: [PATCH 3/7] doc: fix wrong encapsulation --- aider/website/assets/sample.aider.conf.yml | 2 +- aider/website/assets/sample.env | 2 +- aider/website/docs/config/aider_conf.md | 2 +- aider/website/docs/config/dotenv.md | 2 +- aider/website/docs/config/options.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index 71e6b83f5..e0b8db804 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -104,7 +104,7 @@ ## Only work with models that have meta-data available (default: True) #show-model-warnings: true -## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. +## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens. #max-chat-history-tokens: xxx ## Specify the .env file to load (default: .env in git root) diff --git a/aider/website/assets/sample.env b/aider/website/assets/sample.env index f69f75c0f..2fce0d88a 100644 --- a/aider/website/assets/sample.env +++ b/aider/website/assets/sample.env @@ -108,7 +108,7 @@ ## Only work with models that have meta-data available (default: True) #AIDER_SHOW_MODEL_WARNINGS=true -## ("Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.",) +## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens. #AIDER_MAX_CHAT_HISTORY_TOKENS= ## Specify the .env file to load (default: .env in git root) diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index be3bc3b1e..0092ac2f3 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -160,7 +160,7 @@ cog.outl("```") ## Only work with models that have meta-data available (default: True) #show-model-warnings: true -## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. +## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens. #max-chat-history-tokens: xxx ## Specify the .env file to load (default: .env in git root) diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index 6541b2c20..892ae76c8 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -150,7 +150,7 @@ cog.outl("```") ## Only work with models that have meta-data available (default: True) #AIDER_SHOW_MODEL_WARNINGS=true -## ("Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.",) +## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens. #AIDER_MAX_CHAT_HISTORY_TOKENS= ## Specify the .env file to load (default: .env in git root) diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index afa0b6c85..1b9ebfe59 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -223,7 +223,7 @@ Aliases: - `--no-show-model-warnings` ### `--max-chat-history-tokens VALUE` -Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. +Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens. Environment variable: `AIDER_MAX_CHAT_HISTORY_TOKENS` ### `--env-file ENV_FILE` From 65b50cdaee233148c62e15604844378c8078a6b4 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:50:44 +0200 Subject: [PATCH 4/7] fix: correct weak model names for Sonnet-3.5 on OpenRouter --- aider/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/models.py b/aider/models.py index 4e7e529d3..99bdd093d 100644 --- a/aider/models.py +++ b/aider/models.py @@ -319,7 +319,7 @@ MODEL_SETTINGS = [ ModelSettings( "openrouter/anthropic/claude-3.5-sonnet", "diff", - weak_model_name="openrouter/anthropic/claude-3-haiku-20240307", + weak_model_name="openrouter/anthropic/claude-3-haiku", editor_model_name="openrouter/anthropic/claude-3.5-sonnet", editor_edit_format="editor-diff", use_repo_map=True, @@ -334,7 +334,7 @@ MODEL_SETTINGS = [ ModelSettings( "openrouter/anthropic/claude-3.5-sonnet:beta", "diff", - weak_model_name="openrouter/anthropic/claude-3-haiku-20240307", + weak_model_name="openrouter/anthropic/claude-3-haiku:beta", editor_model_name="openrouter/anthropic/claude-3.5-sonnet:beta", editor_edit_format="editor-diff", use_repo_map=True, From e820fea289b858421fc97084932d3d8ec35fa9e2 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:04:19 +0200 Subject: [PATCH 5/7] doc: fix leftover /clipboard mention --- aider/website/_includes/multi-line.md | 2 +- aider/website/docs/config/adv-model-settings.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aider/website/_includes/multi-line.md b/aider/website/_includes/multi-line.md index 9d37aadd3..757b93cec 100644 --- a/aider/website/_includes/multi-line.md +++ b/aider/website/_includes/multi-line.md @@ -2,4 +2,4 @@ You can send long, multi-line messages in the chat in a few ways: - Paste a multi-line message directly into the chat. - Enter `{` alone on the first line to start a multiline message and `}` alone on the last line to end it. - Use Meta-ENTER to start a new line without sending the message (Esc+ENTER in some environments). - - Use `/clipboard` to paste text from the clipboard into the chat. + - Use `/paste` to paste text from the clipboard into the chat. diff --git a/aider/website/docs/config/adv-model-settings.md b/aider/website/docs/config/adv-model-settings.md index 95d19086c..37879b193 100644 --- a/aider/website/docs/config/adv-model-settings.md +++ b/aider/website/docs/config/adv-model-settings.md @@ -550,7 +550,7 @@ cog.out("```\n") use_repo_map: true use_system_prompt: true use_temperature: true - weak_model_name: openrouter/anthropic/claude-3-haiku-20240307 + weak_model_name: openrouter/anthropic/claude-3-haiku - accepts_images: true cache_control: true caches_by_default: false @@ -568,7 +568,7 @@ cog.out("```\n") use_repo_map: true use_system_prompt: true use_temperature: true - weak_model_name: openrouter/anthropic/claude-3-haiku-20240307 + weak_model_name: openrouter/anthropic/claude-3-haiku:beta - accepts_images: true cache_control: false caches_by_default: false From 27ddf8aeab9c6931e38278d35972dfe0c78bbb83 Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Thu, 10 Oct 2024 06:46:10 +0200 Subject: [PATCH 6/7] fix: remove unreachable return statements --- aider/args.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/aider/args.py b/aider/args.py index 0807020ea..6ac071491 100644 --- a/aider/args.py +++ b/aider/args.py @@ -719,7 +719,6 @@ def get_md_help(): parser.formatter_class = MarkdownHelpFormatter return argparse.ArgumentParser.format_help(parser) - return parser.format_help() def get_sample_yaml(): @@ -733,7 +732,6 @@ def get_sample_yaml(): parser.formatter_class = YamlHelpFormatter return argparse.ArgumentParser.format_help(parser) - return parser.format_help() def get_sample_dotenv(): @@ -747,7 +745,6 @@ def get_sample_dotenv(): parser.formatter_class = DotEnvFormatter return argparse.ArgumentParser.format_help(parser) - return parser.format_help() def main(): From deb27f8f27c4fc11254cca3b4d28b9744d0725dd Mon Sep 17 00:00:00 2001 From: Sven Grunewaldt Date: Thu, 10 Oct 2024 11:56:00 +0200 Subject: [PATCH 7/7] feat: Add new model settings for azure/o1-preview Fixes litellm exceptions and incorrect model settings when using o1-preview on Azure OpenAI. --- aider/models.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/aider/models.py b/aider/models.py index 99bdd093d..f94d83b44 100644 --- a/aider/models.py +++ b/aider/models.py @@ -513,6 +513,18 @@ MODEL_SETTINGS = [ use_temperature=False, streaming=False, ), + ModelSettings( + "azure/o1-mini", + "whole", + weak_model_name="azure/gpt-4o-mini", + editor_model_name="azure/gpt-4o", + editor_edit_format="editor-diff", + use_repo_map=True, + reminder="user", + use_system_prompt=False, + use_temperature=False, + streaming=False, + ), ModelSettings( "o1-mini", "whole", @@ -537,6 +549,18 @@ MODEL_SETTINGS = [ use_temperature=False, streaming=False, ), + ModelSettings( + "azure/o1-preview", + "diff", + weak_model_name="azure/gpt-4o-mini", + editor_model_name="azure/gpt-4o", + editor_edit_format="editor-diff", + use_repo_map=True, + reminder="user", + use_system_prompt=False, + use_temperature=False, + streaming=False, + ), ModelSettings( "o1-preview", "architect",