refactor: Remove unused parameter from remove_reasoning_content function

This commit is contained in:
Paul Gauthier 2025-03-07 19:06:15 -08:00 committed by Paul Gauthier (aider)
parent 4858749a20
commit 9aacf5c7db
2 changed files with 2 additions and 8 deletions

View file

@ -31,6 +31,7 @@ from aider.models import RETRY_TIMEOUT
from aider.reasoning_tags import (
REASONING_TAG,
format_reasoning_content,
remove_reasoning_content,
replace_reasoning_tags,
)
from aider.repo import ANY_GIT_ERROR, GitRepo
@ -1830,12 +1831,9 @@ class Coder:
def remove_reasoning_content(self):
"""Remove reasoning content from the model's response."""
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):

View file

@ -11,21 +11,17 @@ REASONING_START = "> Thinking ..."
REASONING_END = "> ... done thinking.\n\n------"
def remove_reasoning_content(res, reasoning_tag=None, model_remove_reasoning=None):
def remove_reasoning_content(res, reasoning_tag):
"""
Remove reasoning content from text based on tags.
Args:
res (str): The text to process
reasoning_tag (str): The tag name to remove
model_remove_reasoning (str): Fallback tag name from model settings
Returns:
str: Text with reasoning content removed
"""
if not reasoning_tag:
reasoning_tag = model_remove_reasoning
if not reasoning_tag:
return res