You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 9, 2026. It is now read-only.
This PAI-OpenCode is a manual upgrade from a previous installation by performing a new installation and then manually copying over various updated files in the USER and skills directories. Notably, I did not copy over files from the old profiles or agents subdirectories. This was because I had a pretty modified version of 2.x and the migration script didn't work for me.
Steps to reproduce
symlink ~/.opencode to a subdir under $HOME, e.g. ~/dev/pai/.opencode
Perform a fresh 3.0 installation
from ~, execute bun run .opencode/tools/switch-provider.ts zen-paid (or other profiles)
look at ~/.opencode/opencode.json (which is actually in the symlinked dir) and every model is still big-pickle.
Solution
It looks like the script is trying to write to ~/opencode.json instead of ~/.opencode/opencode.json though it doesn't actually do so. Still, changing line 31 from: const OPENCODE_JSON_PATH = join(PROJECT_ROOT, "opencode.json");
to: const OPENCODE_JSON_PATH = join(OPENCODE_DIR, "opencode.json");
seems to have done the trick and now ~/.opencode/opencode.json is being updated correctly.
Happy to submit a pull request, but wanted to highlight this first and see if there's something else strange going on.
Scenario
This PAI-OpenCode is a manual upgrade from a previous installation by performing a new installation and then manually copying over various updated files in the USER and skills directories. Notably, I did not copy over files from the old profiles or agents subdirectories. This was because I had a pretty modified version of 2.x and the migration script didn't work for me.
Steps to reproduce
bun run .opencode/tools/switch-provider.ts zen-paid(or other profiles)Solution
It looks like the script is trying to write to
~/opencode.jsoninstead of~/.opencode/opencode.jsonthough it doesn't actually do so. Still, changing line 31 from:const OPENCODE_JSON_PATH = join(PROJECT_ROOT, "opencode.json");to:
const OPENCODE_JSON_PATH = join(OPENCODE_DIR, "opencode.json");seems to have done the trick and now
~/.opencode/opencode.jsonis being updated correctly.Happy to submit a pull request, but wanted to highlight this first and see if there's something else strange going on.