From 14d17428699ef1985fd761dc51895f592c81dbed Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 28 Mar 2025 20:09:05 -1000 Subject: [PATCH] fix: Use self instead of model in get_raw_thinking_tokens --- aider/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aider/models.py b/aider/models.py index a8b165c19..46702b551 100644 --- a/aider/models.py +++ b/aider/models.py @@ -695,16 +695,16 @@ class Model(ModelSettings): if self.extra_params: # Check for OpenRouter reasoning format if ( - "reasoning" in model.extra_params - and "max_tokens" in model.extra_params["reasoning"] + "reasoning" in self.extra_params + and "max_tokens" in self.extra_params["reasoning"] ): - budget = model.extra_params["reasoning"]["max_tokens"] + budget = self.extra_params["reasoning"]["max_tokens"] # Check for standard thinking format elif ( - "thinking" in model.extra_params - and "budget_tokens" in model.extra_params["thinking"] + "thinking" in self.extra_params + and "budget_tokens" in self.extra_params["thinking"] ): - budget = model.extra_params["thinking"]["budget_tokens"] + budget = self.extra_params["thinking"]["budget_tokens"] return budget