Skip to content

Consider making a number of properties on ChatCompletionOptions public #306

@eiriktsarpalis

Description

@eiriktsarpalis

Confirm this is a feature request for the .NET library and not the underlying OpenAI API

  • This is a feature request for the .NET library

Describe the feature or improvement you are requesting

I'm currently implementing a feature in Microsoft.Extensions.AI that maps OpenAI chat completion requests (as represented in the ChatCompletionOptions type) to the Microsoft.Extensions.AI model. This is to accelerate development of Copilot agents that must be able to accept completion requests in the OpenAI wire format.

One of the issues I've encountered is that a number of important properties in the ChatCompletionOptions class are currently marked internal. This includes the Messages property, the Stream property, and the Model property.

While I've been able to work around the issue temporarily using reflection, this isn't a viable solution longer term. Please consider making these (and other properties in the model) public so that your types can be used as DTOs in the context of agents implementing the OpenAI wire format.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: architectureThis item is related to general architecture of the OpenAI client library.feature-requestCategory: A new feature or enhancement to an existing feature is being requested.issue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions