Skip to content

Extend DI support for AIFunctionFactory #6312

@jeffhandley

Description

@jeffhandley

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.

Metadata

Metadata

Assignees

Labels

area-aiMicrosoft.Extensions.AI libraries

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions