CopilotModel
Namespace: E2E.OAuth
public sealed class CopilotModel : DelegatingModel, IAgentModel, IDisposableA GitHub Copilot subscription model: chat completions, or the Responses API when the plan serves the model only there.
Inheritance: object → DelegatingModel
Implements: IAgentModel, IDisposable
Constructors
Section titled “Constructors”CopilotModel(string, HttpClient)
Section titled “CopilotModel(string, HttpClient)”public CopilotModel(string model, HttpClient http)Parameters
| Name | Type | Description |
|---|---|---|
model |
string | |
http |
HttpClient |
Properties
Section titled “Properties”Fallback
Section titled “Fallback”protected override IAgentModel Fallback { get; }The model to use until a lookup succeeds.
Value: IAgentModel
Methods
Section titled “Methods”Refusal(AgentException)
Section titled “Refusal(AgentException)”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
ResolveAsync(CancellationToken)
Section titled “ResolveAsync(CancellationToken)”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>