opencode 2.x changed the plugin API — a plugin must export default { id, setup }. The existing 1.x plugin (plugins/arka-ai.ts) therefore fails to load on 2.x (failed to load plugin … Plugin must export a default definition with an id and an effect or setup function), so the Arka-AI provider disappears. Confirmed on a 2.1.4 install.
Change
Both installers (install-arka-provider.sh, .ps1) now detect the generation and install the right mechanism:
merge preserves unrelated keys; stale plugin disabled; --refresh keeps the key.
Notes
2.x model list is static (refresh via --refresh): opencode 2.x exposes no documented plugin hook to inject providers dynamically (ctx.provider.transform gives only internal provider class instances).
Windows .ps1 mirrors the logic (not executed here).
## What
opencode **2.x** changed the plugin API — a plugin must `export default { id, setup }`. The existing 1.x plugin (`plugins/arka-ai.ts`) therefore **fails to load** on 2.x (`failed to load plugin … Plugin must export a default definition with an id and an effect or setup function`), so the **Arka-AI provider disappears**. Confirmed on a 2.1.4 install.
## Change
Both installers (`install-arka-provider.sh`, `.ps1`) now detect the generation and install the right mechanism:
| opencode | detected as | provider |
|---|---|---|
| 1.x | `opencode --version` → `1.x.y` | plugin `plugins/arka-ai.ts` (dynamic catalog) — unchanged |
| 2.x | → `opencode v2.x.y` | static `providers["Arka-AI"]` in `opencode.jsonc` (`package @opencode/ai/providers/openai-compatible`, `settings.baseURL`, `settings.apiKey`, `models` from `catalog.json`) |
- Override `--gen 1|2` / `-Gen 1|2` / `OPENCODE_GEN`.
- On 2.x a stale 1.x plugin is disabled (`arka-ai.ts` → `.disabled`).
- `--refresh` / `-Refresh`: 2.x regenerates the model list (infers gen 2 from the config); 1.x clears the cache.
- Merge is non-destructive. README + SKILL.md updated.
## Verified (POSIX, isolated HOME)
- detection (`opencode v2.1.4`→2, `1.19.0`→1);
- 1.x → plugin; 2.x → `providers["Arka-AI"]` with **117** models + baseURL + apiKey;
- merge preserves unrelated keys; stale plugin disabled; `--refresh` keeps the key.
## Notes
- 2.x model list is **static** (refresh via `--refresh`): opencode 2.x exposes no documented plugin hook to inject providers dynamically (`ctx.provider.transform` gives only internal provider class instances).
- Windows `.ps1` mirrors the logic (not executed here).
opencode 2.x changed the plugin API (a plugin must export { id, setup }), so
the 1.x plugin (plugins/arka-ai.ts) no longer loads there and the Arka-AI
provider disappeared ('failed to load plugin').
- install-arka-provider.sh / .ps1 now detect the generation (opencode --version:
'1.x.y' vs 'opencode v2.x.y'; --gen / -Gen override):
* 1.x -> install the plugin (dynamic catalog), as before;
* 2.x -> write a static providers["Arka-AI"] block
(package @opencode/ai/providers/openai-compatible, settings.baseURL,
settings.apiKey, models from catalog.json) and disable any stale 1.x plugin.
- --refresh / -Refresh regenerates the 2.x model list (infers generation 2 from
the installed config); 1.x still clears the cache.
- README + companion skill updated with the 1.x/2.x table, detection, and the
providers schema.
Verified: gen detection, gen1 plugin write, gen2 providers write (117 models),
merge preserves unrelated keys, stale plugin disabled, refresh keeps the key.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
opencode 2.x changed the plugin API — a plugin must
export default { id, setup }. The existing 1.x plugin (plugins/arka-ai.ts) therefore fails to load on 2.x (failed to load plugin … Plugin must export a default definition with an id and an effect or setup function), so the Arka-AI provider disappears. Confirmed on a 2.1.4 install.Change
Both installers (
install-arka-provider.sh,.ps1) now detect the generation and install the right mechanism:opencode --version→1.x.yplugins/arka-ai.ts(dynamic catalog) — unchangedopencode v2.x.yproviders["Arka-AI"]inopencode.jsonc(package @opencode/ai/providers/openai-compatible,settings.baseURL,settings.apiKey,modelsfromcatalog.json)--gen 1|2/-Gen 1|2/OPENCODE_GEN.arka-ai.ts→.disabled).--refresh/-Refresh: 2.x regenerates the model list (infers gen 2 from the config); 1.x clears the cache.Verified (POSIX, isolated HOME)
opencode v2.1.4→2,1.19.0→1);providers["Arka-AI"]with 117 models + baseURL + apiKey;--refreshkeeps the key.Notes
--refresh): opencode 2.x exposes no documented plugin hook to inject providers dynamically (ctx.provider.transformgives only internal provider class instances)..ps1mirrors the logic (not executed here).opencode 2.x changed the plugin API (a plugin must export { id, setup }), so the 1.x plugin (plugins/arka-ai.ts) no longer loads there and the Arka-AI provider disappeared ('failed to load plugin'). - install-arka-provider.sh / .ps1 now detect the generation (opencode --version: '1.x.y' vs 'opencode v2.x.y'; --gen / -Gen override): * 1.x -> install the plugin (dynamic catalog), as before; * 2.x -> write a static providers["Arka-AI"] block (package @opencode/ai/providers/openai-compatible, settings.baseURL, settings.apiKey, models from catalog.json) and disable any stale 1.x plugin. - --refresh / -Refresh regenerates the 2.x model list (infers generation 2 from the installed config); 1.x still clears the cache. - README + companion skill updated with the 1.x/2.x table, detection, and the providers schema. Verified: gen detection, gen1 plugin write, gen2 providers write (117 models), merge preserves unrelated keys, stale plugin disabled, refresh keeps the key.