We should support the existing [FromKeyedServices]
attribute. This scenario has surfaced in MCP scenarios, and this attribute is currently ignored.
For non-keyed services, we could use the IServiceProvider
to see if it can resolve the type. This would require accepting an IServiceProvider
on AIFunctionFactoryOptions
.