mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-09-02 04:23:20 +02:00
The ResponseCachingMiddleware was losing prefix information when caching tools, resources, and prompts from mounted/imported servers. The root cause was that the private _key attribute wasn't being serialized by Pydantic. Changes: - Add model_serializer to FastMCPComponent to include _key in serialization - Update model_validate to restore _key from deserialized data - Add key parameter when creating cached Tool/Resource/Prompt objects - Add comprehensive test for mounted server prefix preservation Fixes #2300 Co-authored-by: William Easton <strawgate@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_caching.py | ||
| test_error_handling.py | ||
| test_initialization_middleware.py | ||
| test_logging.py | ||
| test_middleware.py | ||
| test_rate_limiting.py | ||
| test_timing.py | ||
| test_tool_injection.py | ||