From edd1fd73cdd53334f98278f2e5e2d9eea5874628 Mon Sep 17 00:00:00 2001 From: lorenzejay Date: Wed, 21 Jan 2026 13:01:42 -0800 Subject: [PATCH] for fixing model dump with state --- lib/crewai/src/crewai/flow/flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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