Skip to content

Propagate fix from AIFunctionFactory to TemporaryAIFunctionFactory#215

Merged
stephentoub merged 1 commit intomodelcontextprotocol:mainfrom
stephentoub:propfix
Apr 5, 2025
Merged

Propagate fix from AIFunctionFactory to TemporaryAIFunctionFactory#215
stephentoub merged 1 commit intomodelcontextprotocol:mainfrom
stephentoub:propfix

Conversation

@stephentoub
Copy link
Copy Markdown
Contributor

Fixes #214

@stephentoub stephentoub merged commit f135355 into modelcontextprotocol:main Apr 5, 2025
8 checks passed
@stephentoub stephentoub deleted the propfix branch April 5, 2025 01:55

// Resolve the contract used to marshal the value from JSON -- can throw if not supported or not found.
Type parameterType = parameter.ParameterType;
JsonTypeInfo typeInfo = serializerOptions.GetTypeInfo(parameterType);
Copy link
Copy Markdown
Member

@eiriktsarpalis eiriktsarpalis Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure the same issue also manifested for return parameters. I take it you dropped the fix for that intentionally?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a larger set of changes, it's much less of an issue (as opposed to parameters that are things like IMcpServer and CancellationToken that have no chance of being in the JSO), and this code will (hopefully) all be deleted tomorrow, so I chose to let it be. We can bring it over if you think it's worthwhile, though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine if we wait. I also decided against backporting the fix for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PublishAot is breaking the aspnetcore sample app

2 participants