omp packages

pi-anthropic-console-login3.3.0

Anthropic Console OAuth provider for pi-coding-agent. Authenticates against the Console (organization/API billing) instead of the personal claude.ai subscription.

jvortmann Published 6 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-anthropic-console-login

A pi package that adds Anthropic Console as an OAuth login provider. This authenticates against the Console (organization/API billing) instead of the personal claude.ai subscription.

Requirements

  • pi >= 0.84.0 (the extension refuses to load on older versions)

Install

From npm:

pi install npm:pi-anthropic-console-login

From git:

pi install git:github.com/jvortmann/pi-anthropic-console-login

Usage

  1. /login → select "Anthropic Console account · API usage billing"
  2. Complete the OAuth flow in your browser
  3. /model → select an anthropic-console model

Models

The extension reads the model list from your Console account, and pi saves it on disk. pi refreshes the list after login and when the model selector opens, and loads the saved list at startup. Until the first refresh succeeds, the extension uses a built-in fallback list.

The Console API gives each model's context window, output limit, image support and reasoning support. It gives no pricing and no request settings. The extension takes these from the pi-ai catalog entry for the same model id in the built-in anthropic provider. That entry gives the price, the adaptive thinking settings, the thinking levels, the prompt cache lifetime and the input limits. A model that the catalog does not know keeps the defaults of the extension.

How it works

The extension registers an anthropic-console provider with OAuth support. On login it:

  1. Opens the Anthropic Console OAuth authorization page
  2. Exchanges the authorization code for tokens via PKCE
  3. Creates an API key scoped to your organization
  4. Registers models that use the Console API endpoint

The provider's refreshModels callback keeps the model list current. It reads the saved list that pi passes in, and saves each successful fetch through publish. The extension refreshes the login token when it expires. The Console accepts each refresh token once. So the extension sends a token request again only when the first one did not leave the machine.

License

MIT. See LICENSE.