mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
refactor: Update model settings name from "aider/extra" to "aider/extra_params"
This commit is contained in:
parent
7e787d93e6
commit
cc18441435
3 changed files with 14 additions and 4 deletions
|
@ -803,7 +803,7 @@ class Model(ModelSettings):
|
|||
|
||||
# Find the extra settings
|
||||
self.extra_model_settings = next(
|
||||
(ms for ms in MODEL_SETTINGS if ms.name == "aider/extra"), None
|
||||
(ms for ms in MODEL_SETTINGS if ms.name == "aider/extra_params"), None
|
||||
)
|
||||
|
||||
self.info = self.get_model_info(model)
|
||||
|
|
|
@ -70,7 +70,14 @@ Files loaded last will take priority.
|
|||
|
||||
The yaml file should be a list of dictionary objects for each model.
|
||||
|
||||
You can use the special model name `aider/extra_params` to define settings that will be applied to all models. For example:
|
||||
|
||||
### Global extra params
|
||||
|
||||
You can use the special model name `aider/extra_params` to define
|
||||
`extra_params` that will be passed to `litellm.completion()` for all models.
|
||||
Only the `extra_params` dict is used from this special model name.
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
- name: aider/extra_params
|
||||
|
@ -80,7 +87,10 @@ You can use the special model name `aider/extra_params` to define settings that
|
|||
max_tokens: 8192
|
||||
```
|
||||
|
||||
These settings will be merged with any model-specific settings, with the model-specific settings taking precedence for any conflicts.
|
||||
These settings will be merged with any model-specific settings, with the
|
||||
`aider/extra_params` settings taking precedence for any direct conflicts.
|
||||
|
||||
### Example model settings
|
||||
|
||||
Below are all the pre-configured model settings to give a sense for the settings which are supported.
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ class TestModels(unittest.TestCase):
|
|||
# Create temporary YAML file with test settings
|
||||
test_settings = [
|
||||
{
|
||||
"name": "aider/extra",
|
||||
"name": "aider/extra_params",
|
||||
"extra_params": {
|
||||
"extra_headers": {"Foo": "bar"},
|
||||
"some_param": "some value",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue