-
Notifications
You must be signed in to change notification settings - Fork 1
Fix tool call reactor handling of empty replacement responses #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughUpdated middleware logic to consider any non-None replacement payload as valid when swallowing tool calls. Added a unit test to verify swallowing with an empty string replacement results in empty content and correct metadata recording. No public interfaces changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant M as ToolCallReactorMiddleware
participant H as Swallow Handler
C->>M: process(message with tool_calls)
M->>H: evaluate swallow & produce replacement_response
alt replacement_response is not None
Note over M: New behavior: empty string is valid replacement
M->>C: return message with content = replacement_response<br/>+ swallowing metadata
else replacement_response is None
M->>C: return original message (unmodified)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)tests/unit/core/services/test_tool_call_reactor_middleware.py (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (2)
Comment |
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ec25355ce08333b87d0889ca85b9a5
Summary by CodeRabbit
Bug Fixes
Tests