opencode-subscription-gateway
v0.1.0
Published
ClinePass free-tier gateway plugin for OpenCode v2 - native free-bucket model serving with probe-attested limits
Readme
opencode-subscription-gateway
A ClinePass free-tier gateway plugin for OpenCode v2. Makes subscription-gated
provider models native in OpenCode: one config line, one login step, and the free-bucket models
ClinePass serves appear in opencode2 models and chat like any native provider model.
No Cline CLI. No proxy server to run. No extra dependencies.
Install
- Add the package name to
opencode.json(global at~/.config/opencode/opencode.json, or project-level):
{
"plugins": ["opencode-subscription-gateway"]
}- Log in to ClinePass through the native credential flow:
opencode auth loginSelect cline-pass and paste your ClinePass credentials. The plugin reads the same store the
native flow writes — no separate auth setup.
What you get
- The native models ClinePass already registers are served untouched (14 keys, byte-exact records).
- The free-bucket models appear as full bucket-id keys (
cline-pass/z-ai/glm-5.3-flash,cline-pass/cline-free/solar-pro4, ...) fetched live from the catalog on load and on rotation. Emitted limits are probe-attested and clamp-only: emission never exceeds a served bound, and the attested reference is stampedprobe-verifiedprovenance. - Deprecated alias keys are absent — the plugin emits bucket-id keys only, which is the key shape the host's chat path accepts.
- Streaming, tool calling, and per-provider request headers work through the native provider stack.
Observability
The plugin appends a redacted, permission-locked (0600) log at
~/.ai-coding-subscription-router/router.log: catalog fetch summaries, per-key emission deltas,
credential-lane events, and classified upstream errors (429/403 are data — logged, retried only on
retryable classes). No secrets, key values, or prompts are ever written.
Requirements
- Bun as the runtime (the host runs plugins through Bun; the published artifact is a plain ESM bundle with zero runtime dependencies).
- OpenCode v2 beta with the
pluginsconfig key (opencode2beta series). - A ClinePass account with free-tier access.
- Outbound HTTPS to the ClinePass API for the live catalog fetch.
