Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging import version

__version__ = "0.88.35.dev"
__version__ = "0.88.37.dev"
safe_version = __version__

try:
Expand Down
25 changes: 14 additions & 11 deletions aider/coders/agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,21 +1061,24 @@ async def process_tool_calls(self, tool_call_response):
if self.partial_response_tool_calls:
for tool_call in self.partial_response_tool_calls:
tool_name = tool_call.get("function", {}).get("name")
self.last_round_tools.append(tool_name)

# Create and store vector for this tool call
# Remove id property if present before stringifying
tool_call_copy = tool_call.copy()
if "id" in tool_call_copy:
del tool_call_copy["id"]
tool_call_str = str(tool_call_copy) # Convert entire tool call to string
tool_vector = create_bigram_vector((tool_call_str,))
tool_vector_norm = normalize_vector(tool_vector)
self.tool_call_vectors.append(tool_vector_norm)

if tool_name:
self.last_round_tools.append(tool_name)

# Create and store vector for this tool call
# Remove id property if present before stringifying
tool_call_copy = tool_call.copy()
if "id" in tool_call_copy:
del tool_call_copy["id"]
tool_call_str = str(tool_call_copy) # Convert entire tool call to string
tool_vector = create_bigram_vector((tool_call_str,))
tool_vector_norm = normalize_vector(tool_vector)
self.tool_call_vectors.append(tool_vector_norm)

# Add the completed round to history
if self.last_round_tools:
self.tool_usage_history += self.last_round_tools
self.tool_usage_history = list(filter(None, self.tool_usage_history))

if len(self.tool_usage_history) > self.tool_usage_retries:
self.tool_usage_history.pop(0)
Expand Down
Loading