opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(providers.opencode): check config for api key in addition to auth

Open PowerUser64 opened this issue 2 months ago • 0 comments

Without this, you can't use ~/.config/opencode/opencode.json to set the opencode API key without also having .opencode.key in ~/.local/share/opencode/auth.json set to any string. Notably, this means you can't store your opencode zen api key in an environment variable without also exposing it (or some other string) in auth.json.

Note: although I tested this change and I understand what it does (it's two lines), this code was written by an AI and I don't know typescript that well, so feel free to say if there's something I should do differently.

PowerUser64 avatar Dec 21 '25 15:12 PowerUser64