Skip to content

CopilotModel

Namespace: E2E.OAuth

public sealed class CopilotModel : DelegatingModel, IAgentModel, IDisposable

A GitHub Copilot subscription model: chat completions, or the Responses API when the plan serves the model only there.

Inheritance: object → DelegatingModel

Implements: IAgentModel, IDisposable

View source

public CopilotModel(string model, HttpClient http)

Parameters

Name Type Description
model string
http HttpClient

View source

protected override IAgentModel Fallback { get; }

The model to use until a lookup succeeds.

Value: IAgentModel

View source

protected override string? Refusal(AgentException failure)

Why the account cannot use the model, when <code class=“paramref”>failure</code> is the provider refusing it; null for any other failure.

Parameters

Name Type Description
failure AgentException

Returns: string

View source

protected override Task<IAgentModel?> ResolveAsync(CancellationToken cancellationToken)

The model for the looked-up protocol, or null when the lookup could not be read.

Parameters

Name Type Description
cancellationToken CancellationToken

Returns: Task<IAgentModel>

View source