You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix test_tool_choice_none_after_tool_results to match actual behavior (#57)
The test was failing after rebase because it used non-existent OCI SDK
classes (models.Tool) and had incorrect expectations about when tool_choice
is set to 'none'.
Changes:
1. Replace OCI SDK mock objects with Python function (following pattern
from other tests in the file)
2. Update test to trigger actual tool_choice=none behavior by exceeding
max_sequential_tool_calls limit (3 tool calls)
3. Fix _prepare_request call signature (add stop parameter)
4. Pass bound model kwargs to _prepare_request (required for tools)
5. Update docstring to accurately describe what's being tested
The test now correctly validates that tool_choice is set to ToolChoiceNone
when the max_sequential_tool_calls limit is reached, preventing infinite
tool calling loops.
Related to PR #50 (infinite loop fix) and PR #53 (tool call optimization).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>
0 commit comments