fix(runner): handle model-object tool calls in verbose logging#55
fix(runner): handle model-object tool calls in verbose logging#55Sai Asish Y (SAY-5) wants to merge 2 commits into
Conversation
PR SummaryLow Risk Overview Adds Adds Reviewed by Cursor Bugbot for commit 58cd1c9. Bugbot is set up for automated code reviews on this repo. Configure here. |
90f77be to
69c4276
Compare
|
Good catch. Updated the two remaining verbose sites (the extracted-calls list and the end-of-stream summary) to go through |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 69c4276. Configure here.
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
|
Good catch, the loop in _execute_turns_async was the last inline copy. Switched it to the helper and dropped the dead non-dict branch for tc_id in 58cd1c9. |

Fixes #54.
DedalusRunner(..., verbose=True).run(..., tools=[...])crashes withAttributeErroron the first response containing tool calls. The verbose print paths call.get("function", {})on tool-call entries, which works for theToolCallTypedDicts produced by_extract_tool_callsbut not for the SDK model objects read straight off API responses (e.g. in_execute_turns_syncat theTool calls in responselog line, and the message-history dumps).This adds a small
_tool_call_name(tc)helper that accepts either dicts or attribute-style model objects, and uses it in the affected verbose print paths. Non-verbose behavior is unchanged.Test plan
tests/test_runner_verbose.py: unit-tests_tool_call_namefor dicts/model objects, and a regression test runningrunner.run(verbose=True, tools=[add])against a mocked client returning model-style tool calls (fails onmain, passes here).pytest tests/test_local_scheduler.py tests/test_runner_verbose.pygreen.ruff check/ruff format --checkclean on changed files.