原始内容
pi-j3gb-provider
Pi provider package for vip.j3gb.com.
Install
pi install npm:pi-j3gb-provider
/login j3gb # paste an sk-... J3GB API key
/model j3gb
For CI/non-interactive use:
export J3GB_API_KEY="sk-..."
pi
Provider slots
| Provider | API adapter | Environment variable |
|---|---|---|
j3gb |
Native Anthropic Messages | J3GB_API_KEY |
j3gb-alt |
Native Anthropic Messages | J3GB_ALT_API_KEY |
j3gb-anthropic |
Native Anthropic Messages | J3GB_ANTHROPIC_API_KEY |
j3gb-openai |
OpenAI Chat Completions | J3GB_OPENAI_API_KEY |
j3gb and j3gb-alt are retained for compatibility. Use /login <provider> to store a key interactively.
API wiring
J3GB supports both protocols:
Anthropic
Base URL: https://vip.j3gb.com
Endpoint: POST /v1/messages
Auth: x-api-key: sk-...
OpenAI
Base URL: https://vip.j3gb.com/v1
Endpoint: POST /v1/chat/completions
Auth: Authorization: Bearer sk-...
J3GB key groups control server-side routing/capacity; they do not alter these client protocols. /api/v1 is only the account/key-management API.
Models and status
The extension refreshes the real model catalog at startup, after /login, and once after an error. Both API slots expose the same catalog; Grok is intentionally excluded.
Fallback models (used before catalog refresh)
j3gb, j3gb-alt, j3gb-anthropic (Anthropic Messages):
claude-opus-4-8— Claude Opus 4.8claude-sonnet-4-5— Claude Sonnet 4.5claude-sonnet-4— Claude Sonnet 4claude-haiku-4-5— Claude Haiku 4.5
j3gb-openai (OpenAI Completions):
gpt-5.5— GPT-5.5gpt-5.4— GPT-5.4gpt-5.4-mini— GPT-5.4 Minicodex-auto-review— Codex Auto Review
Model ID aliases
Users can type common alternate forms and the extension normalizes them:
claude-opus-4.8→claude-opus-4-8(dots → hyphens)claude-haiku-4.5→claude-haiku-4-5gpt-5.5→ stays as-is (Pi's OpenAI adapter handles bare IDs)
A widget above the editor reports catalog refreshes and retains provider errors until that provider next succeeds. No available accounts and All available accounts exhausted are J3GB upstream-capacity errors, not extension failures.
License
MIT