OpenCodeConsoleModel
Namespace: E2E.OAuth
public sealed class OpenCodeConsoleModel : DelegatingModel, IAgentModel, IDisposableAn OpenCode Console model. The first call reads the workspace config and talks to the model over its own protocol: chat completions, OpenAI Responses, Anthropic Messages, or Gemini. Each instance names one session, so its calls stay on one upstream and its cache.
Inheritance: object → DelegatingModel
Implements: IAgentModel, IDisposable
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”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>