fix: Improve AutoGen Studio: deprecate FunctionTool, harden MCP WebSocket endpoint#7362
Merged
victordibia merged 6 commits intomainfrom Mar 11, 2026
Merged
fix: Improve AutoGen Studio: deprecate FunctionTool, harden MCP WebSocket endpoint#7362victordibia merged 6 commits intomainfrom
victordibia merged 6 commits intomainfrom
Conversation
…endpoint - Deprecate FunctionTool creation in the UI; show deprecation warning for existing configs - Skip FunctionTool instantiation during validation to avoid exec() on user code - Store MCP server params server-side instead of passing via WebSocket query string - Remove FunctionTool template and direct users to MCP Workbenches
The old version (20240930) uses a legacy setup.py that imports pkg_resources without declaring setuptools as a build dependency, causing uv sync --all-extras to fail in CI.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7362 +/- ##
==========================================
- Coverage 81.22% 81.21% -0.01%
==========================================
Files 244 244
Lines 18512 18514 +2
==========================================
+ Hits 15036 15037 +1
- Misses 3476 3477 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The docs build workflow was using `uv sync --locked --all-extras` which pulls in optional extras like `video-surfer` that depend on `openai-whisper`. This caused build failures across all matrix versions (old tags and current). Docs building only needs core package imports for autodoc, not runtime extras.
Guard against empty/whitespace query strings in RedisMemory.query() by returning an empty MemoryQueryResult early, avoiding a ValueError from redisvl>=0.9.0 which rejects empty content in its embed() method. Also fix the test assertion to verify empty queries return empty results.
docfx 2.78+ targets net10.0 and fails to compile .NET 8 projects due to missing BCL references. Pin to 2.67.5 to match dotnet-tools.json manifest. Add a mock-based unit test for the empty-string early return in RedisMemory.query() so codecov can instrument the line without requiring a live Redis instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Two improvements to AutoGen Studio's security posture and developer experience:
Deprecate FunctionTool in the UI: FunctionTool uses
exec()to run user-supplied Python code at config load time. The UI now shows a deprecation warning for existing FunctionTool configs and directs users to MCP Workbenches instead. The FunctionTool template has been removed from the component gallery. Validation no longer instantiates FunctionTool configs (skipsload_component()to avoidexec()).Harden MCP WebSocket endpoint: Previously, MCP server params were passed as base64-encoded query string parameters on the WebSocket URL. Now, server params are stored server-side via the
POST /ws/connectendpoint and looked up bysession_idwhen the WebSocket connects. Sessions are one-time use (popon connect).Changes
validation_service.py— Skipload_component()for FunctionToolmcp.py— Server-sidepending_session_paramsstorage; WebSocket handler looks up params by session_idcomponent-templates.ts— Remove FunctionTool templateagent-fields.tsx— RemovehandleAddTooltool-fields.tsx— Show deprecation warning instead of code editorworkbench-fields.tsx— Remove "Add Tool" buttonsRelated issue number
N/A — internal security hardening
Checks