Repository navigation
Releases: jonmast/opencode-cliproxyapi
Release list
v0.3.0
Changed
-
Breaking: Migrated to the provider/model registries OpenCode 2.0.4
introduced in #48901, which
removed thecatalogplugin domain. Provider and model registration now runs
throughctx.provider.transform, and revalidation reloads via
ctx.provider.reload(). This release requires OpenCode 2.0.4 or newer; on
2.0.0–2.0.3 it fails to load with
undefined is not an object (evaluating 'ctx.provider.transform'). Stay on
0.2.xfor those versions. -
A startup with no cached catalog now waits for the first discovery before
handing control back to OpenCode, capped by the newcoldWaitMsoption
(default3000). Stale-while-revalidate previously returned immediately even
with nothing to serve, so OpenCode activated the plugin against an empty
catalog. Short-lived invocations such asopencode run -m cliproxyapi-.../...
failed withModel unavailableand exited before the discovery that would
have populated the cache ever completed, leaving every subsequent run equally
cold. A warm cache still registers immediately and revalidates in the
background, and discovery that outlives the cap still registers when it
lands. -
A model metadata outage can no longer degrade the cached catalog. With a
healthy CLIProxyAPI and an unreachable models.dev, every model fell back to
default names, limits, modalities, and protocol, and that reading was written
to the cache, so the loss survived a restart until metadata happened to come
back. Models that metadata did not describe now keep their last enriched
definition, matching how reasoning variants are already preserved. -
Discovery failures are now reported to OpenCode's logs when discovery starts
failing and again when it recovers. A failure is otherwise invisible by
design, since the cached catalog keeps serving, which left a stale catalog
with nothing explaining it. Only the transitions are logged, so a server that
stays down does not add an entry per poll. -
The plugin now builds against the published
@opencode/pluginpackage
(OpenCode 2's own plugin package) instead of the@opencode-ai/plugin
prerelease, so the V2 domains are properly typed.
v0.2.0
Changed
- Model discovery now uses stale-while-revalidate: on startup the plugin registers the last discovered catalog immediately from its cache and refreshes it in the background, replaying the catalog transform only when the server's catalog changed. Cold starts no longer block the model picker on network discovery; the first-ever run simply populates the picker when discovery completes.
- The cached catalog is also revalidated on an interval, default every five minutes, so long-running sessions pick up server-side model changes. Set
"refreshMs": 0to revalidate only at startup; concurrent polls are coalesced, so a slow discovery never stacks requests. - A revalidation can no longer strip a model's reasoning variants. CLIProxyAPI's reasoning-level endpoint can fail outright or briefly serve an incomplete model list, and both read as "this model has no levels"; committing that reading removed variants from the picker and cached the loss, so it survived a restart. The previous catalog's variants are now carried forward instead. Genuine level changes still apply; a real removal needs the cache cleared.
- A missing Codex client catalog (
404) is now treated as a genuine empty answer rather than an error, keeping it distinguishable from an endpoint that is merely broken. - The cached catalog no longer stores the API key. Providers restored from cache authenticate through the integration until the next revalidation resolves the credential again.
- The npm package now ships the root
index.jsentrypoint wrapper required by OpenCode 2's plugin directory scan.
Breaking
- Migrated to the OpenCode 2 plugin API. This release requires OpenCode 2 (
opencode2) and no longer works with OpenCode 1. Use the0.1.xline for OpenCode 1. - The plugin entry moves from
plugintopluginsand from the["package", {options}]tuple to{"package": ..., "options": {...}}. - Provider and model registration now use the V2 catalog transform API and V2 schema shapes:
npmbecomespackagewith anaisdk:prefix,optionsbecomessettings, andtool_call/modalitiesbecomecapabilities. - User
providers.cliproxyapiconfig is now applied by OpenCode after the plugin and takes precedence, replacing the plugin's own model merge.
Full Changelog: v0.1.2...v0.2.0