diff --git a/lib/crewai/src/crewai/flow/flow.py b/lib/crewai/src/crewai/flow/flow.py index a3e5f69ac..79831833c 100644 --- a/lib/crewai/src/crewai/flow/flow.py +++ b/lib/crewai/src/crewai/flow/flow.py @@ -443,7 +443,7 @@ class StateProxy(Generic[T]): """Return the underlying state object.""" return cast(T, object.__getattribute__(self, "_proxy_state")) - def model_dump(self) -> dict[str, Any]: + def model_dump(self, *args: Any, **kwargs: Any) -> dict[str, Any]: """Return state as a dictionary. Works for both dict and BaseModel underlying states. @@ -451,7 +451,7 @@ class StateProxy(Generic[T]): state = object.__getattribute__(self, "_proxy_state") if isinstance(state, dict): return state - result: dict[str, Any] = state.model_dump() + result: dict[str, Any] = state.model_dump(*args, **kwargs) return result