Apply patch [skip ci]

This commit is contained in:
open-swe[bot]
2025-08-22 15:16:18 +00:00
parent 5632cc003a
commit a7ab82fdd2
@@ -1221,7 +1221,7 @@ def _wrap_tool_with_reserved_keywords(
# Create a wrapper tool that filters the schema
# Use type: ignore to suppress mypy error for dynamic class creation
class FilteredTool(tool.__class__): # type: ignore[name-defined]
class FilteredTool(tool.__class__): # type: ignore[name-defined,misc]
"""Tool wrapper that excludes reserved keywords from schema."""
def get_input_schema(
@@ -1232,7 +1232,7 @@ def _wrap_tool_with_reserved_keywords(
# If no reserved args to filter, return original
if not reserved_args:
return original_schema
return original_schema # type: ignore[no-any-return]
# Create a new schema class dynamically
from pydantic import create_model
@@ -1399,3 +1399,4 @@ def _get_runtime_arg(tool: BaseTool) -> Optional[str]:
"""
reserved_args = _get_reserved_keyword_args(tool)
return "runtime" if "runtime" in reserved_args else None