Skip to content

Commit

Permalink
refactor: Use getattr with default for checking main_model.extra_params
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Jan 31, 2025
1 parent 7f82a33 commit 9ed8eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aider/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def get_io(pretty):

# add --reasoning-effort cli param
if args.reasoning_effort is not None:
if not hasattr(main_model, "extra_params"):
if not getattr(main_model, "extra_params", None):
main_model.extra_params = {}
if "extra_body" not in main_model.extra_params:
main_model.extra_params["extra_body"] = {}
Expand Down

0 comments on commit 9ed8eba

Please sign in to comment.