diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index cac2b4bea..60bd9c0a8 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -1782,12 +1782,21 @@ class Coder: reasoning_content = chunk.choices[0].delta.reasoning_content if reasoning_content: if not self.got_reasoning_content: - text += f"<{REASONING_TAG}>\n\n" + text += f"<{self.reasoning_tag_name}>\n\n" text += reasoning_content self.got_reasoning_content = True received_content = True except AttributeError: - pass + try: + reasoning_content = chunk.choices[0].delta.reasoning + if reasoning_content: + if not self.got_reasoning_content: + text += f"<{self.reasoning_tag_name}>\n\n" + text += reasoning_content + self.got_reasoning_content = True + received_content = True + except AttributeError: + pass try: content = chunk.choices[0].delta.content