fix: Re-enable the "retrieve object" check in StateManager

This commit is contained in:
Jacob Alber
2025-11-03 16:30:17 -05:00
Unverified
parent 0756c45702
commit e44be6611f
@@ -106,8 +106,7 @@ internal sealed class StateManager
if (typeof(T) == typeof(object))
{
// Reading as object will break across serialize/deserialize boundaries, e.g. checkpointing, distributed runtime, etc.
// Disabled pending upstream updates for this change; see https://github.com/microsoft/agent-framework/issues/1369
//throw new NotSupportedException("Reading state as 'object' is not supported. Use 'PortableValue' instead for variants.");
throw new NotSupportedException("Reading state as 'object' is not supported. Use 'PortableValue' instead for variants.");
}
Throw.IfNullOrEmpty(key);