mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
fix: Update tests and logic for model settings acceptance checks
This commit is contained in:
parent
6cce7c34c2
commit
f2e9b06dbd
2 changed files with 4 additions and 2 deletions
|
@ -787,14 +787,16 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
"Model setting 'remove_reasoning' is deprecated, please use 'reasoning_tag' instead."
|
||||
)
|
||||
|
||||
# Set reasoning effort and thinking tokens if specified and supported
|
||||
# Set reasoning effort and thinking tokens if specified
|
||||
if args.reasoning_effort is not None:
|
||||
# Apply if check is disabled or model explicitly supports it
|
||||
if not args.check_model_accepts_settings or (
|
||||
main_model.accepts_settings and "reasoning_effort" in main_model.accepts_settings
|
||||
):
|
||||
main_model.set_reasoning_effort(args.reasoning_effort)
|
||||
|
||||
if args.thinking_tokens is not None:
|
||||
# Apply if check is disabled or model explicitly supports it
|
||||
if not args.check_model_accepts_settings or (
|
||||
main_model.accepts_settings and "thinking_tokens" in main_model.accepts_settings
|
||||
):
|
||||
|
|
|
@ -1015,7 +1015,7 @@ class TestMain(TestCase):
|
|||
|
||||
def test_reasoning_effort_option(self):
|
||||
coder = main(
|
||||
["--reasoning-effort", "3", "--yes", "--exit"],
|
||||
["--reasoning-effort", "3", "--no-check-model-accepts-settings", "--yes", "--exit"],
|
||||
input=DummyInput(),
|
||||
output=DummyOutput(),
|
||||
return_coder=True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue