diff --git a/src/Libraries/Microsoft.Extensions.AI/Functions/AIFunctionFactory.cs b/src/Libraries/Microsoft.Extensions.AI/Functions/AIFunctionFactory.cs
index c562db8ca3a..a3bd73c602a 100644
--- a/src/Libraries/Microsoft.Extensions.AI/Functions/AIFunctionFactory.cs
+++ b/src/Libraries/Microsoft.Extensions.AI/Functions/AIFunctionFactory.cs
@@ -44,8 +44,6 @@ class AIFunctionFactory
/// The method to be represented via the created .
/// Metadata to use to override defaults inferred from .
/// The created for invoking .
- [RequiresUnreferencedCode("Reflection is used to access types from the supplied MethodInfo.")]
- [RequiresDynamicCode("Reflection is used to access types from the supplied MethodInfo.")]
public static AIFunction Create(Delegate method, AIFunctionFactoryCreateOptions options)
{
_ = Throw.IfNull(method);
@@ -69,8 +67,6 @@ public static AIFunction Create(Delegate method, string? name, string? descripti
/// The name to use for the .
/// The description to use for the .
/// The created for invoking .
- [RequiresUnreferencedCode("Reflection is used to access types from the supplied MethodInfo.")]
- [RequiresDynamicCode("Reflection is used to access types from the supplied MethodInfo.")]
public static AIFunction Create(Delegate method, JsonSerializerOptions options, string? name = null, string? description = null)
{
_ = Throw.IfNull(method);
@@ -104,8 +100,6 @@ public static AIFunction Create(MethodInfo method, object? target = null)
///
/// Metadata to use to override defaults inferred from .
/// The created for invoking .
- [RequiresUnreferencedCode("Reflection is used to access types from the supplied MethodInfo.")]
- [RequiresDynamicCode("Reflection is used to access types from the supplied MethodInfo.")]
public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryCreateOptions options)
{
_ = Throw.IfNull(method);
@@ -136,8 +130,6 @@ class ReflectionAIFunction : AIFunction
/// This should be if and only if is a static method.
///
/// Function creation options.
- [RequiresUnreferencedCode("Reflection is used to access types from the supplied MethodInfo.")]
- [RequiresDynamicCode("Reflection is used to access types from the supplied MethodInfo.")]
public ReflectionAIFunction(MethodInfo method, object? target, AIFunctionFactoryCreateOptions options)
{
_ = Throw.IfNull(method);
@@ -384,8 +376,6 @@ static bool IsAsyncMethod(MethodInfo method)
///
/// Gets a delegate for handling the result value of a method, converting it into the to return from the invocation.
///
- [RequiresUnreferencedCode("Reflection is used to access types from the supplied MethodInfo.")]
- [RequiresDynamicCode("Reflection is used to access types from the supplied MethodInfo.")]
private static Type GetReturnMarshaler(MethodInfo method, out Func