set custom provider globally? #94

Closed
opened 2026-02-16 17:25:10 -05:00 by yindo · 2 comments
Owner

Originally created by @nacl32 on GitHub (Jun 16, 2025).

hi!
it would be really handy if we could configure custom providers globally. gets a bit tedious having to configure a local server in every project.

i looked at the code and i believe the easiest way would be to remove the stop argument (the last one) here:
https://github.com/sst/opencode/blob/d6d45bdc6388dcc7e5e5248c6b4645d90159bb18/packages/opencode/src/config/config.ts#L12-L17

this would make it possible to place an opencode.json in your user home directory, which the function would eventually find.
another possible solution would be to use the existing ~/.config/opencode folder

Originally created by @nacl32 on GitHub (Jun 16, 2025). hi! it would be really handy if we could configure custom providers globally. gets a bit tedious having to configure a local server in every project. i looked at the code and i believe the easiest way would be to remove the `stop` argument (the last one) here: https://github.com/sst/opencode/blob/d6d45bdc6388dcc7e5e5248c6b4645d90159bb18/packages/opencode/src/config/config.ts#L12-L17 this would make it possible to place an `opencode.json` in your user home directory, which the function would eventually find. another possible solution would be to use the existing `~/.config/opencode` folder
yindo closed this issue 2026-02-16 17:25:10 -05:00
Author
Owner

@GitMurf commented on GitHub (Jun 16, 2025):

@nacl32 funny! My issue beat you by 1 minute! 🤣 wanna close yours and we can consolidate there at: #152

@GitMurf commented on GitHub (Jun 16, 2025): @nacl32 funny! My issue beat you by 1 minute! 🤣 wanna close yours and we can consolidate there at: #152
Author
Owner

@nacl32 commented on GitHub (Jun 16, 2025):

@nacl32 funny! My issue beat you by 1 minute! 🤣 wanna close yours and we can consolidate there at: #152

haha sure 😂

@nacl32 commented on GitHub (Jun 16, 2025): > [@nacl32](https://github.com/nacl32) funny! My issue beat you by 1 minute! 🤣 wanna close yours and we can consolidate there at: [#152](https://github.com/sst/opencode/issues/152) haha sure 😂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#94