Skip to content

.Net: Add Provider Choice Support to ONNX Connector #12828

@loicbtd

Description

@loicbtd

Problem Statement

Currently, users can configure ONNX execution providers only by manually creating a genai_config.json file next to the ONNX model. This approach is cumbersome and doesn't integrate well with the Semantic Kernel configuration patterns.

Proposed Solution

Add programmatic support for provider configuration in the ONNX connector, allowing users to specify execution providers directly through the API instead of requiring manual JSON configuration files.

Benefits

  • Better Developer Experience: Configure providers through code instead of manual file editing
  • Integration: Aligns with Semantic Kernel's configuration patterns
  • Flexibility: Dynamic provider selection based on runtime conditions
  • Maintainability: Eliminates the need for external configuration files

Breaking Changes

None - this would be a purely additive feature maintaining backward compatibility. The existing genai_config.json approach would continue to work.


NB: I will suggest an implementation.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET code

Projects

Status

Sprint: In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions