You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: preserve parameter types in tool() and resource() decorators with ParamSpec (#1822)
Replace the type-erasing _CallableT with ParamSpec for the tool()
and resource() decorators, which are pure pass-through and benefit
fully from parameter type preservation. This allows type checkers to
validate decorated function signatures without # type: ignore.
completion() and prompt() keep explicit Callable[..., Any] because
they feed into downstream type-constrained APIs where ParamSpec
would create false type errors.
AI assistance: Fix implemented with AI assistance (opencode). I've
reviewed every changed line and validated with pyright + pytest.
0 commit comments