-
Notifications
You must be signed in to change notification settings - Fork 2k
Comparing changes
Open a pull request
base repository: microsoft/agent-framework
base: python-1.0.0b260106
head repository: microsoft/agent-framework
compare: python-1.0.0b260107
- 9 commits
- 91 files changed
- 8 contributors
Commits on Jan 7, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 202f557 - Browse repository at this point
Copy the full SHA 202f557View commit details -
Configuration menu - View commit details
-
Copy full SHA for f49e537 - Browse repository at this point
Copy the full SHA f49e537View commit details -
Python: Fix MCP tool result serialization for list[TextContent] (#2523)
* Fix MCP tool result serialization for list[TextContent] When MCP tools return results containing list[TextContent], they were incorrectly serialized to object repr strings like: '[<agent_framework._types.TextContent object at 0x...>]' This fix properly extracts text content from list items by: 1. Checking if items have a 'text' attribute (TextContent) 2. Using model_dump() for items that support it 3. Falling back to str() for other types 4. Joining single items as plain text, multiple items as JSON array Fixes #2509 * Address PR review feedback for MCP tool result serialization - Extract serialize_content_result() to shared _utils.py - Fix logic: use texts[0] instead of join for single item - Add type annotation: texts: list[str] = [] - Return empty string for empty list instead of '[]' - Move import json to file top level - Add comprehensive unit tests for serialization * Address PR review feedback: fix type checking and double serialization - Add isinstance(item.text, str) check to ensure text attribute is a string - Fix double-serialization issue by keeping model_dump results as dicts until final json.dumps (removes escaped JSON strings in arrays) - Improve docstring with detailed return value documentation - Add test for non-string text attribute handling - Add tests for list type tool results in _events.py path * Simplify PR: minimal changes to fix MCP tool result serialization Addresses reviewer feedback about excessive refactoring: - Reset _events.py to original structure - Only add import and use serialize_content_result in one location - All review comments addressed in serialize_content_result(): - Added isinstance(item.text, str) check - Use model_dump(mode="json") to avoid double-serialization - Improved docstring with explicit return value documentation - Empty list returns "" instead of "[]" * Refactor: Move MCP TextContent serialization to core prepare_function_call_results Per reviewer feedback, moved the TextContent serialization logic from ag-ui's serialize_content_result to the core package's prepare_function_call_results function. Changes: - Added handling for objects with 'text' attribute (like MCP TextContent) in _prepare_function_call_results_as_dumpable - Removed serialize_content_result from ag-ui/_utils.py - Updated _events.py and _message_adapters.py to use prepare_function_call_results from core package - Updated tests to match the core function's behavior * Fix failing tests for prepare_function_call_results behavior - test_tool_result_with_none: Update expected value to 'null' (JSON serialization of None) - test_tool_result_with_model_dump_objects: Use Pydantic BaseModel instead of plain class * Fix B903 linter error: Convert MockTextContent to dataclass The ruff linter was reporting B903 (class could be dataclass or namedtuple) for the MockTextContent test helper classes. This commit converts them to dataclasses to satisfy the linter check.
Configuration menu - View commit details
-
Copy full SHA for db283cd - Browse repository at this point
Copy the full SHA db283cdView commit details -
Python: Improve DevUI, add Context Inspector view as new tab under tr…
…aces (#2742) * Improve DevUI, add Context Inspector view as new tab under traces * fix mypy errors * fix: Handle stale MCP connections in DevUI executor MCP tools can become stale when HTTP streaming responses end - the underlying stdio streams close but `is_connected` remains True. This causes subsequent requests to fail with `ClosedResourceError`. Add `_ensure_mcp_connections()` to detect and reconnect stale MCP tools before agent execution. This is a workaround for an upstream Agent Framework issue where connection state isn't properly tracked. Fixes MCP tools failing on second HTTP request in DevUI. fixes #1476 #1515 #2865 * fix #1572 report import dependency errors more clearly * Ensure there is streaming toggle where users can select streaming vs non streaming mode in devui . Fixes .NET: [Python] DevUI tool call rendering in non-streaming mode? * remove unused dead code * improve ux - workflows with agents show a chat component in execution timelien, also ensure magentic final output shows correctly * update ui build * update devui to use instrumentation instead of tracing, other instrumentation and type/instance check fixes
Configuration menu - View commit details
-
Copy full SHA for 2e1189c - Browse repository at this point
Copy the full SHA 2e1189cView commit details -
.NET: Seal factory contexts and add non JSO deserialize overloads (#3066
) * Seal factory contexts and add non JSO deserialize overloads * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dd69cab - Browse repository at this point
Copy the full SHA dd69cabView commit details -
Enable blank issues in issue template configuration
Need to re-enable creating blank issues
Configuration menu - View commit details
-
Copy full SHA for 521f046 - Browse repository at this point
Copy the full SHA 521f046View commit details -
* updated templates * enabled blank and fixed triage * made language optional and moved to the bottom for features
Configuration menu - View commit details
-
Copy full SHA for a118fd5 - Browse repository at this point
Copy the full SHA a118fd5View commit details -
Python: Streaming sample for azurefunctions (#3057)
* Streaming sample for azurefunctions * Fixed links and sample name * Addressed feedback * Addressed feedback * Fixed integration tests * Updated test
Configuration menu - View commit details
-
Copy full SHA for f4ab586 - Browse repository at this point
Copy the full SHA f4ab586View commit details -
Python: fix(azure-ai): Fix response_format handling for structured ou…
…tputs (#3114) * fix(azure-ai): read response_format from chat_options instead of run_options * refactor: use explicit None checks for response_format * Fix mypy error * Mypy fix
Configuration menu - View commit details
-
Copy full SHA for e9d97ce - Browse repository at this point
Copy the full SHA e9d97ceView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff python-1.0.0b260106...python-1.0.0b260107