-
Notifications
You must be signed in to change notification settings - Fork 329
PublishAot is breaking the aspnetcore sample app #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc: @eiriktsarpalis, @agocke |
Something is wrong. Nothing should be trying to serialize one of these. |
I believe it stems from here |
Isn't that the line that excludes it from the schema so it won't be deserialized? |
The problem is
That's being done too early. It needs to be moved down to L608. |
@eiriktsarpalis already fixed that in the real AIFunctionFactory: But we should still fix this in the meantime. |
Describe the bug
configuring the AspNetCoreSseServer sample for PublishAot causes default json serialization to not allow reflection which breaks the tool descriptor generation. This causes the app to thrown exception on launch
To Reproduce
Steps to reproduce the behavior:
Exception is thrown:
System.NotSupportedException: 'JsonTypeInfo metadata for type 'ModelContextProtocol.Server.IMcpServer' was not provided by TypeInfoResolver of type 'Microsoft.Extensions.AI.AIJsonUtilities+JsonContext'.
Expected behavior
Server launches
The text was updated successfully, but these errors were encountered: