mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
refactor: Improve model registration and settings handling
This commit is contained in:
parent
8f83204f0f
commit
baa13351a6
1 changed files with 5 additions and 1 deletions
|
@ -935,10 +935,11 @@ class Model(ModelSettings):
|
||||||
and ("2.5" in model or "2-5" in model)
|
and ("2.5" in model or "2-5" in model)
|
||||||
and "32b" in model
|
and "32b" in model
|
||||||
):
|
):
|
||||||
"openrouter/qwen/qwen-2.5-coder-32b-instruct",
|
|
||||||
self.edit_format = "diff"
|
self.edit_format = "diff"
|
||||||
self.editor_edit_format = "editor-diff"
|
self.editor_edit_format = "editor-diff"
|
||||||
self.use_repo_map = True
|
self.use_repo_map = True
|
||||||
|
# if "ollama" in model:
|
||||||
|
# self.extra_params = dict(num_ctx = 64*1024)
|
||||||
return # <--
|
return # <--
|
||||||
|
|
||||||
# use the defaults
|
# use the defaults
|
||||||
|
@ -1101,6 +1102,9 @@ def register_models(model_settings_fnames):
|
||||||
if not os.path.exists(model_settings_fname):
|
if not os.path.exists(model_settings_fname):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not Path(model_settings_fname).read_text().strip():
|
||||||
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(model_settings_fname, "r") as model_settings_file:
|
with open(model_settings_fname, "r") as model_settings_file:
|
||||||
model_settings_list = yaml.safe_load(model_settings_file)
|
model_settings_list = yaml.safe_load(model_settings_file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue