branch: elpa/aidermacs commit 170fe69a36d0df05986497a33fd86c93ec5479bc Author: Mingde (Matthew) Zeng <matthew...@posteo.net> Commit: Mingde (Matthew) Zeng <matthew...@posteo.net>
Update thinking tokens doc Signed-off-by: Mingde (Matthew) Zeng <matthew...@posteo.net> --- README.md | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index b54d530633..e1b5a46a3a 100644 --- a/README.md +++ b/README.md @@ -275,30 +275,19 @@ Aidermacs supports project-specific configurations via `.aider.conf.yml` files. ### Claude 3.7 Sonnet Thinking Tokens -Aider can work with Sonnet 3.7's [new thinking tokens](https://www.anthropic.com/news/claude-3-7-sonnet), but does not ask Sonnet to use thinking tokens by default. - -Enabling thinking currently requires manual configuration. Create an `.aider.model.settings.yml` in your home dir, project's root, or the current directory, then add the following to the file. Adjust the `budget_tokens` value to change the target number of thinking tokens. - -```yaml -- name: anthropic/claude-3-7-sonnet-20250219 - edit_format: diff - weak_model_name: anthropic/claude-3-5-haiku-20241022 - use_repo_map: true - examples_as_sys_msg: true - use_temperature: false - extra_params: - extra_headers: - anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25,output-128k-2025-02-19 - max_tokens: 64000 - thinking: - type: enabled - budget_tokens: 32000 # Adjust this number - cache_control: true - editor_model_name: anthropic/claude-3-7-sonnet-20250219 - editor_edit_format: editor-diff -``` +Aider can work with Sonnet 3.7's [new thinking tokens](https://www.anthropic.com/news/claude-3-7-sonnet). You can now enable and configure thinking tokens more easily using the following methods: + +1. **In-Chat Command:** Use the `/think-tokens` command followed by the desired token budget. For example: `/think-tokens 8k` or `/think-tokens 10000`. Supported formats include `8096`, `8k`, `10.5k`, and `0.5M`. + +2. **Command-Line Argument:** Set the `--thinking-tokens` argument when starting Aidermacs. For example, you can add this to your `aidermacs-extra-args`: + + ```emacs-lisp + (setq aidermacs-extra-args '("--thinking-tokens" "16k")) + ``` + +These methods provide a more streamlined way to control thinking tokens without requiring manual configuration of `.aider.model.settings.yml` files. -More streamlined support will be coming soon. +*Note: If you are using an `.aider.conf.yml` file, you can also set the `thinking_tokens` option there.* ## Usage