Skip to content

About

Unofficial crowbot.sh plugin for OpenCode V2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

oc-crowbot

Unofficial plugin for Crowbot and OpenCode V2. This project is not affiliated with, maintained by, or endorsed by Crowbot or OpenCode.

Refreshes an already configured crowbot provider's model catalog from Crowbot's public OpenCode configuration. Adapted from the model-refresh plugin distributed through Crowbot's installer, with OpenCode V2 catalog conversion, validation, and transform-order fixes.

Installation

Requires OpenCode V2 with the Promise plugin API. Verified against a running OpenCode 2.0.22 service.

Configure the crowbot provider, its endpoint, and your credentials first, using Crowbot's configuration instructions or installer.

Install one copy of this plugin. If the installer created crowbot.js in ~/.config/opencode/plugin/, ~/.config/opencode/plugins/, or a project's .opencode/plugin/ or .opencode/plugins/, move that file outside the plugin directory before installing this package. Both copies use the plugin ID crowbot.models, and duplicate IDs conflict.

opencode plugin add github:xenial/oc-crowbot

Alternatively, add the package to the plugins array in your existing opencode.json(c):

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["github:xenial/oc-crowbot"]
}

Keep your existing provider configuration alongside this entry. Restart or reload OpenCode, then check that crowbot.models is active:

opencode plugin list
opencode models

For development, clone this repository and add its absolute directory path to the plugins array instead. The package exports crowbot.js directly; no build step or runtime dependencies are required.

Behavior

  • Fetches the catalog when the plugin instance loads. The 2.5-second deadline covers both the request and response body.
  • Preserves the configured fallback on HTTP errors, network failures, timeouts, empty inventories, or malformed model data. A partially valid inventory is rejected as a whole.
  • Replaces the source inventory and reconciles it after OpenCode's plugin activation finishes. This prevents late configuration transforms from restoring retired models or stale catalog metadata.
  • Treats the fetched model IDs and metadata as authoritative. Model IDs absent from the feed, including local aliases, are removed. Fresh names, model routing IDs, capabilities, limits, prices, reasoning fields, and variants override saved catalog values.
  • Keeps provider configuration, including credentials and endpoint settings. Existing model request settings and headers are retained when the corresponding fields are absent from the feed.
  • Converts reasoning variants, disabled variants, upstream model aliases, modalities, release dates, and cache/context-tier pricing. Models marked disabled or deprecated in the feed remain disabled.
  • Leaves an unconfigured crowbot provider absent. Other providers are unaffected.
  • Serializes reconciliation and closes the event stream and registrations on unload. Removing the plugin restores OpenCode's configured catalog.

There is no periodic polling. A later plugin.updated event reapplies the captured catalog; a new fetch requires the plugin instance to load again. The plugin manages model discovery and metadata; it does not configure provider authentication or its endpoint.

Development and tests

Requires Node.js 22 or newer for the test scripts. Bun is optional.

npm ci
npm run verify
npm run test:bun

The 66 regression tests use mocked fetches and a provider/model transform harness. They cover late configuration overrides, catalog validation, conversion, fallback, stalled requests and response bodies, repeated activation, overlapping reconciliation, and cleanup. Tests do not contact inference providers or consume API credits.

Live verification on October 10, 2026 confirmed that the running OpenCode 2.0.22 service exposes the six models in the public feed with matching names, limits, prices, cache costs, and reasoning fields. A standalone CLI check returned an empty catalog even with the plugin removed, so fresh standalone startup is not covered by that verification.

About

Unofficial crowbot.sh plugin for OpenCode V2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages