Subscriptions
Namespace: E2E.OAuth
public static class SubscriptionsSubscription logins as agent models, upstream’s chatgpt(), copilot(), grok(), and
opencodeConsole(). Each reads the login e2e login stored (or E2E_OAUTH_CREDENTIALS), refreshes
it as needed, and touches nothing until the first call. Use API keys in CI.
Inheritance: object
Methods
Section titled “Methods”ChatGpt(string, ICredentialStore?)
Section titled “ChatGpt(string, ICredentialStore?)”public static OpenAiResponsesModel ChatGpt(string model, ICredentialStore? store = null)A ChatGPT Plus/Pro subscription over the Codex backend. e2e models openai lists the ids the plan serves.
Parameters
| Name | Type | Description |
|---|---|---|
model |
string | |
store |
ICredentialStore |
Returns: OpenAiResponsesModel
Client(IOAuthProvider, ICredentialStore?, string?, HttpMessageHandler?)
Section titled “Client(IOAuthProvider, ICredentialStore?, string?, HttpMessageHandler?)”public static HttpClient Client(IOAuthProvider provider, ICredentialStore? store = null, string? loginHint = null, HttpMessageHandler? inner = null)An HttpClient that carries <code class=“paramref”>provider</code>’s stored login on every request.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
IOAuthProvider | |
store |
ICredentialStore | |
loginHint |
string | |
inner |
HttpMessageHandler |
Returns: HttpClient
Copilot(string, ICredentialStore?)
Section titled “Copilot(string, ICredentialStore?)”public static CopilotModel Copilot(string model, ICredentialStore? store = null)A GitHub Copilot subscription. Copilot serves most models over chat completions and some only over its Responses API; the first call reads the plan’s model listing to pick. An enterprise login routes to its host.
Parameters
| Name | Type | Description |
|---|---|---|
model |
string | |
store |
ICredentialStore |
Returns: CopilotModel
Grok(string, ICredentialStore?)
Section titled “Grok(string, ICredentialStore?)”public static OpenAiCompatibleModel Grok(string model, ICredentialStore? store = null)A SuperGrok or X Premium+ subscription over the ordinary SpaceXAI API.
Parameters
| Name | Type | Description |
|---|---|---|
model |
string | |
store |
ICredentialStore |
Returns: OpenAiCompatibleModel
OpenCodeConsole(string, ICredentialStore?)
Section titled “OpenCodeConsole(string, ICredentialStore?)”public static OpenCodeConsoleModel OpenCodeConsole(string model, ICredentialStore? store = null)An OpenCode Console workspace: OpenCode Zen for a bare id, OpenCode Go for a go/ id. The first call
reads the workspace config for the model’s protocol. OPENCODE_API_KEY (a Console service account API key
or an OpenCode Go subscription API key) replaces the stored login when set.
Parameters
| Name | Type | Description |
|---|---|---|
model |
string | |
store |
ICredentialStore |
Returns: OpenCodeConsoleModel