From 5608db08925fa1334e313fc4ea11193cce4c8cc7 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 11 Mar 2025 11:35:23 -0700 Subject: [PATCH] feat: Add thinking token budget display in model details --- aider/coders/base_coder.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 773100266..ddd03db18 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -211,6 +211,19 @@ class Coder: output += ", prompt cache" if main_model.info.get("supports_assistant_prefill"): output += ", infinite output" + + # Check for thinking token budget + if (main_model.extra_params and + "thinking" in main_model.extra_params and + "budget_tokens" in main_model.extra_params["thinking"]): + budget = main_model.extra_params["thinking"]["budget_tokens"] + # Format as xx.yK for thousands, xx.yM for millions + if budget >= 1000000: + formatted_budget = f"{budget/1000000:.1f}M" + else: + formatted_budget = f"{budget/1000:.1f}K" + output += f", {formatted_budget} think tokens" + lines.append(output) if self.edit_format == "architect":