fix: add missing stream parameter to autogen_mcp run_eval fixture#111
Conversation
Align _run() signature with other agents (react_agent, agentic_rag) for interface consistency. The parameter defaults to False and is not wired to TaskConfig since autogen always uses non-streaming for evals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe pull request adds an optional ChangesTest Fixture Parameter Expansion
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
agents/autogen/mcp_agent/tests/behavioral/conftest.py (1)
104-114:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
streamis accepted but silently ignored
_run()now advertisesstream, butTaskConfigis still hardcoded tostream=False. This creates a misleading API: callers can passstream=Trueand get no behavior change. Please either wirestream=streamor explicitly reject it (e.g.,if stream: raise ValueError(...)) so test intent can’t silently drift.As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agents/autogen/mcp_agent/tests/behavioral/conftest.py` around lines 104 - 114, The _run() function accepts a stream parameter but the TaskConfig is constructed with stream=False, causing the parameter to be ignored; fix by wiring the passed-in stream through to TaskConfig (set stream=stream) or explicitly reject usage (e.g., in _run() check if stream: raise ValueError(...)) so callers cannot silently expect streaming behavior; update the TaskConfig construction site (TaskConfig(..., stream=...)) and/or add the validation near the start of _run().
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@agents/autogen/mcp_agent/tests/behavioral/conftest.py`:
- Around line 104-114: The _run() function accepts a stream parameter but the
TaskConfig is constructed with stream=False, causing the parameter to be
ignored; fix by wiring the passed-in stream through to TaskConfig (set
stream=stream) or explicitly reject usage (e.g., in _run() check if stream:
raise ValueError(...)) so callers cannot silently expect streaming behavior;
update the TaskConfig construction site (TaskConfig(..., stream=...)) and/or add
the validation near the start of _run().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 9c9818ab-53cb-48a4-bdd1-1aa33013bde5
📒 Files selected for processing (1)
agents/autogen/mcp_agent/tests/behavioral/conftest.py
Summary
stream: bool = Falseto the_run()inner function in the autogen_mcprun_evalfixture, aligning its signature with all other agents (react_agent, agentic_rag, etc.)TaskConfig— autogen always uses non-streaming for evals since tool_invocations are only exposed in non-streaming JSON responsesTest plan
_run()signature matches react_agent and agentic_rag patternsCloses RHAIENG-5127
🤖 Generated with Claude Code