Skip to content

v0.2.2

Choose a tag to compare

@AyRickk AyRickk released this 25 Jun 15:44
· 11 commits to main since this release

Fix: provider no longer silently disappears on incomplete config

Symptom: opencode auth login reported Unknown provider "keycloak" (and the
provider was absent from the list) when issuer/clientId weren't reaching the
plugin — even though other plugins installed the same way worked.

Cause: the plugin factory called resolveConfig(), which throws when
issuer/clientId are missing. OpenCode drops a plugin that throws at load
(error only visible with --print-logs), so the provider was never registered.
Config-less plugins loaded fine, which is why only this one failed.

Fix: the factory now catches the error, still registers the provider, and
surfaces an actionable message (⚠ not configured — Missing Keycloak issuer …)
when a login method is selected, instead of vanishing.

Also in this release

  • resolveProviderId() helper that never throws.
  • New test/index.test.ts covering configured and incomplete-config paths.
  • README rewritten around how OpenCode actually loads plugins:
    • it resolves a plugin entry by npm registry name (needs network) or by a
      filesystem path
      — it never looks in your project/global node_modules;
    • the documented ~/.config/opencode/plugins/ auto-load directory (drop the
      built dist/index.js as a single file; configure via OPENCODE_KC_* env vars);
    • OPENCODE_DISABLE_MODELS_FETCH=1 / OPENCODE_MODELS_PATH for air-gapped hosts
      (the models.dev fetch failure is non-fatal).

Full Changelog: v0.2.1...v0.2.2