The MODELS_DEV_API_JSON environment variable has been configured but is ineffective. #7025

Closed
opened 2026-02-16 18:05:56 -05:00 by yindo · 4 comments
Owner

Originally created by @donbing007 on GitHub (Jan 20, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

opencode -v
1.1.28

The MODELS_DEV_API_JSON environment variable has been configured.

export MODELS_DEV_API_JSON=/home/VISION/bindong/opencode/api.json

api.json

{}

opencode is still attempting to access https://models.dev/api.json

I am in an offline environment where I already have a privately deployed LLM, and I have configured the provider in the opencode.json file.
Version 1.0.137 is functioning properly.

Originally created by @donbing007 on GitHub (Jan 20, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question ```text opencode -v 1.1.28 ``` The MODELS_DEV_API_JSON environment variable has been configured. export MODELS_DEV_API_JSON=/home/VISION/bindong/opencode/api.json api.json ```json {} ``` opencode is still attempting to access https://models.dev/api.json I am in an offline environment where I already have a privately deployed LLM, and I have configured the provider in the opencode.json file. Version 1.0.137 is functioning properly.
yindo closed this issue 2026-02-16 18:05:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9414: The acquisition model does not support custom configuration - Similar issue where MODELS_DEV_API_JSON environment variable should allow custom model sources in corporate/intranet environments
  • #4959: Add option to disable models.dev fetch for corporate proxy environments - Related feature request for offline/custom configuration of model fetching

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue might be a duplicate of existing issues. Please check: - #9414: The acquisition model does not support custom configuration - Similar issue where MODELS_DEV_API_JSON environment variable should allow custom model sources in corporate/intranet environments - #4959: Add option to disable models.dev fetch for corporate proxy environments - Related feature request for offline/custom configuration of model fetching Feel free to ignore if none of these address your specific case.
Author
Owner

@donbing007 commented on GitHub (Jan 21, 2026):

I simply downloaded the models.json file and placed it in the .cache/opencode directory, and that solved the problem.

@donbing007 commented on GitHub (Jan 21, 2026): I simply downloaded the models.json file and placed it in the .cache/opencode directory, and that solved the problem.
Author
Owner

@lomori commented on GitHub (Jan 23, 2026):

@donbing007 : just to confirm, you downloaded from https://models.dev/api.json (note file name: api.json) and placed that contents in the cache directory under a file named 'models.json', right?

@lomori commented on GitHub (Jan 23, 2026): @donbing007 : just to confirm, you downloaded from https://models.dev/api.json (note file name: api.json) and placed that contents in the cache directory under a file named 'models.json', right?
Author
Owner

@donbing007 commented on GitHub (Jan 30, 2026):

@donbing007 : just to confirm, you downloaded from https://models.dev/api.json (note file name: api.json) and placed that contents in the cache directory under a file named 'models.json', right?

Yes, we have successfully prevented opencode from attempting to access the network and running it.

@donbing007 commented on GitHub (Jan 30, 2026): > [@donbing007](https://github.com/donbing007) : just to confirm, you downloaded from https://models.dev/api.json (note file name: api.json) and placed that contents in the cache directory under a file named 'models.json', right? Yes, we have successfully prevented opencode from attempting to access the network and running it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7025