mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #24272] test: cover MCP resource tool results #66427
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24272
Author: @Genmin
Created: 5/1/2026
Status: 🔄 Open
Base:
dev← Head:codex/test-mcp-resource-tool-results📝 Commits (1)
9b200a1test: cover MCP resource tool results📊 Changes
3 files changed (+83 additions, -16 deletions)
View changed files
➕
backend/open_webui/test/utils/test_mcp_results.py(+55 -0)➕
backend/open_webui/utils/mcp/results.py(+25 -0)📝
backend/open_webui/utils/middleware.py(+3 -16)📄 Description
Pull Request Checklist
dev.dev; one logical change.test:.Changelog Entry
Description
Added
resource.textpayloads containing JSON and plain text.Changed
process_tool_resultnow delegates MCP text/resource extraction to a focused helper.Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Refs #24038.
Validation run:
PYTHONPATH=backend uv run --no-sync --with pytest --with typer --with uvicorn pytest backend/open_webui/test/utils/test_mcp_results.py -quv run --no-sync --with ruff ruff check backend/open_webui/utils/mcp/results.py backend/open_webui/test/utils/test_mcp_results.pyPYTHONPATH=backend uv run --no-sync --with typer --with uvicorn python -m compileall -q backend/open_webui/utils/mcp/results.py backend/open_webui/test/utils/test_mcp_results.pygit diff --checkScreenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.