mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 11:45:00 +00:00
copy
This commit is contained in:
parent
384ff3484c
commit
335742a023
1 changed files with 82 additions and 0 deletions
82
aider/website/docs/config/reasoning.md
Normal file
82
aider/website/docs/config/reasoning.md
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
---
|
||||||
|
parent: Configuration
|
||||||
|
nav_order: 110
|
||||||
|
description: How to configure a reasoning models
|
||||||
|
---
|
||||||
|
|
||||||
|
# Reasoning models
|
||||||
|
|
||||||
|
Many
|
||||||
|
"reasoning" models have restrictions on streaming and setting the temperature parameter.
|
||||||
|
Aider is configured to work properly with these models
|
||||||
|
when served through major provider APIs.
|
||||||
|
|
||||||
|
You may need to [configure model settings](/docs/config/adv-model-settings.html)
|
||||||
|
if you are using them through another provider
|
||||||
|
and see errors related to temperature or system prompt.
|
||||||
|
|
||||||
|
Include settings for your new provider in `.aider.model.setting.yml` file
|
||||||
|
at the root of your project or in your home directory.
|
||||||
|
|
||||||
|
## Temperature, streaming and system prompt
|
||||||
|
|
||||||
|
You should find one of the existing model setting configuration entries
|
||||||
|
for the model you are interested in, say o3-mini:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: o3-mini
|
||||||
|
edit_format: diff
|
||||||
|
weak_model_name: gpt-4o-mini
|
||||||
|
use_repo_map: true
|
||||||
|
use_temperature: false # <---
|
||||||
|
editor_model_name: gpt-4o
|
||||||
|
editor_edit_format: editor-diff
|
||||||
|
```
|
||||||
|
|
||||||
|
Pay attention to these settings, which must be set to `false`
|
||||||
|
for certain reasoning models:
|
||||||
|
|
||||||
|
- `use_temperature`
|
||||||
|
- `streaming`
|
||||||
|
- `use_system_prompt`
|
||||||
|
|
||||||
|
Here's an example of
|
||||||
|
the settings to use o3-mini via Azure.
|
||||||
|
Note that aider already has these settings pre-configured, but they
|
||||||
|
serve as a good example of how to adapt the main model
|
||||||
|
settings for a different provider.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: azure/o3-mini
|
||||||
|
edit_format: diff
|
||||||
|
weak_model_name: azure/gpt-4o-mini
|
||||||
|
use_repo_map: true
|
||||||
|
use_temperature: false # <---
|
||||||
|
editor_model_name: azure/gpt-4o
|
||||||
|
editor_edit_format: editor-diff
|
||||||
|
```
|
||||||
|
|
||||||
|
## Thinking tokens
|
||||||
|
|
||||||
|
There is also a `remove_reasoning` setting, which takes the name of a tag.
|
||||||
|
This is used to remove everything inside that XML tag pair.
|
||||||
|
|
||||||
|
When using DeepSeek R1 from Fireworks, the reasoning comes back inside
|
||||||
|
`<think>...</think>` tags, so aider's settings
|
||||||
|
include `remove_reasoning: think` to remove that part of the response.
|
||||||
|
|
||||||
|
Aider will still *display* think reasoning output, it just won't use it
|
||||||
|
to find file editing instructions, etc.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: fireworks_ai/accounts/fireworks/models/deepseek-r1
|
||||||
|
edit_format: diff
|
||||||
|
weak_model_name: fireworks_ai/accounts/fireworks/models/deepseek-v3
|
||||||
|
use_repo_map: true
|
||||||
|
extra_params:
|
||||||
|
max_tokens: 160000
|
||||||
|
use_temperature: false
|
||||||
|
editor_model_name: fireworks_ai/accounts/fireworks/models/deepseek-v3
|
||||||
|
editor_edit_format: editor-diff
|
||||||
|
remove_reasoning: think # <---
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue