Skip to content

fix: log toolbox tool results with the correct metadata#1406

Open
atharvasingh7007 wants to merge 1 commit intosimonw:mainfrom
atharvasingh7007:fix/toolbox-result-metadata
Open

fix: log toolbox tool results with the correct metadata#1406
atharvasingh7007 wants to merge 1 commit intosimonw:mainfrom
atharvasingh7007:fix/toolbox-result-metadata

Conversation

@atharvasingh7007
Copy link
Copy Markdown

Summary
fix toolbox-backed tool-result logging so each result uses its own tool metadata
update the mixed-toolbox logging regression to assert Memory results stay attributed to Memory

Root cause
_BaseResponse.log_to_db() reused the ool loop variable from the earlier or tool in self.prompt.tools loop when inserting ool_instances rows for self.prompt.tool_results. In Python that leaked the last tool from the previous loop, so mixed toolbox runs logged every result against the last toolbox.

Testing
C:\Users\Atharva\Documents\CODEX\llm.venv\Scripts\python.exe -m pytest tests/test_plugins.py
C:\Users\Atharva\Documents\CODEX\llm.venv\Scripts\python.exe -m ruff check .
C:\Users\Atharva\Documents\CODEX\llm.venv\Scripts\python.exe -m mypy llm

Closes #1398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_BaseResponse.log_to_db() uses stale loop variable -- multi-tool runs log wrong toolbox metadata

1 participant