Skip to content

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

Closed

Description

@donbing007

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.

Activity

  1. github-actions commented on Jan 21, 2026

    @github-actions
    Contributor

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

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

  2. donbing007 commented on Jan 21, 2026

    @donbing007
    Author

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

  3. lomori commented on Jan 23, 2026

    @lomori

    @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?

  4. donbing007 commented on Jan 30, 2026

    @donbing007
    Author

    @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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions