Skip to content

OpenCodeConsoleModel

Namespace: E2E.OAuth

public sealed class OpenCodeConsoleModel : DelegatingModel, IAgentModel, IDisposable

An 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

View source

protected override IAgentModel Fallback { get; }

The model to use until a lookup succeeds.

Value: IAgentModel

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