Question: Setting up models in config.json #723

Closed
opened 2026-02-16 17:28:02 -05:00 by yindo · 1 comment
Owner

Originally created by @GratefulDave on GitHub (Jul 15, 2025).

Originally assigned to: @thdxr on GitHub.

I previously set up the opencode.json with the model providers. After one of your recent updates, the file seems to be missing.

  1. I do not want to have to export the api token each I time I use open code. As I recall, there was a way to store the api token.
  2. Your JSON schema is so overly verbose that it becomes confusing without the actual data definitions or an example.

Can you please provide an example of how to set up opencode without having to export api tokens and with just one model besides anthropic?

Originally created by @GratefulDave on GitHub (Jul 15, 2025). Originally assigned to: @thdxr on GitHub. I previously set up the opencode.json with the model providers. After one of your recent updates, the file seems to be missing. 1. I do not want to have to export the api token each I time I use open code. As I recall, there was a way to store the api token. 2. Your JSON schema is so overly verbose that it becomes confusing without the actual data definitions or an example. Can you please provide an example of how to set up opencode without having to export api tokens and with just one model besides anthropic?
yindo closed this issue 2026-02-16 17:28:02 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 16, 2025):

some docs that might help
https://opencode.ai/docs/#providers
https://opencode.ai/docs/config/#variables

@thdxr commented on GitHub (Jul 16, 2025): some docs that might help<br>[https://opencode.ai/docs/#providers](https://opencode.ai/docs/#providers)<br>[https://opencode.ai/docs/config/#variables](https://opencode.ai/docs/config/#variables)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#723