refactor: Move remove_reasoning_content from Model to reasoning_tags.py

This commit is contained in:
Paul Gauthier (aider) 2025-03-07 17:50:57 -08:00
parent e18593fe88
commit ca6abdfc61
3 changed files with 39 additions and 22 deletions

View file

@ -1830,9 +1830,12 @@ class Coder:
def remove_reasoning_content(self):
"""Remove reasoning content from the model's response."""
self.partial_response_content = self.main_model.remove_reasoning_content(
from aider.reasoning_tags import remove_reasoning_content
self.partial_response_content = remove_reasoning_content(
self.partial_response_content,
self.reasoning_tag_name,
self.main_model.remove_reasoning,
)
def calculate_and_show_tokens_and_cost(self, messages, completion=None):