GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LM Studio Failure to refresh models · Issue #2047 · anomalyco/opencode

LM Studio Failure to refresh models #2047

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
LM Studio Failure to refresh models#2047
Copy link
Assignees
thdxr

Description

@blankenshipz
blankenshipz
opened on Aug 18, 2025
Issue body actions

I'm running LM Studio locally and I've found that if I add/remove models in LM Studio the list of models in opencode isn't getting refreshed even if I do an auth logout auth login cycle, is there a quick way to fix this?

Reacted by Karthikeyan N, Spaceychen, Praise Dare, Jack Slingerland, Ankit Khandelwal, Eric A Stalee and hunterMG

Activity

  1. blankenshipz commented on Aug 18, 2025

    @blankenshipz
    blankenshipz
    on Aug 18, 2025
    Author
    More actions

    Removing the model cache file in ~/.cache/opencode/models.json also did not help this issue

    Reacted by Sherwin Techico, Spaceychen, Vishal Doshi, Ricardo Rodriguez Garcia, Ron, Praise Dare and FKS_function
  2. rekram1-node
    assigned
    thdxr
    on Aug 18, 2025
  3. rekram1-node commented on Aug 18, 2025

    @rekram1-node
    rekram1-node
    on Aug 18, 2025
    Member
    More actions

    I think I am gonna have to install LM Studio to see what you mean (never used it)

    Reacted by Spaceychen
  4. blankenshipz commented on Aug 18, 2025

    @blankenshipz
    blankenshipz
    on Aug 18, 2025
    Author
    More actions

    I'm not sure it's an issue with the LM Studio exactly it's more an issue with how refreshing the models cache works - it seems like there's not a way to easily force a refresh or break the cache

    When I run models in LM Studio the list of models available has a much higher rate of change then it does for a commercial vendor you can "eject" models and "load" models somewhat arbitrarily.

    Reacted by Sherwin Techico
  5. shrwnsan commented on Sep 26, 2025

    @shrwnsan
    shrwnsan
    on Sep 26, 2025
    More actions

    Ran into this too

    I've removed certain models from the OC config file, as well as LM Studio models dir

    Removed OC cache dir as well

    But I still see ghost models when I do /models too

    Reacted by Karthikeyan N and Praise Dare
  6. perlator commented on Oct 17, 2025

    @perlator
    perlator
    on Oct 17, 2025
    More actions

    I believe I have encountered a similar issue. Although GitHub made Claude Sonnet General available, I see it as a preview. (GitHub Copilot Claude Sonnet 4.5 (Preview))

    Reacted by Karthikeyan N
  7. rekram1-node commented on Oct 17, 2025

    @rekram1-node
    rekram1-node
    on Oct 17, 2025
    Member
    More actions

    thats because the list of models comes from a models api that hasnt been updated with that change quite yet

    models.dev

    ill update that tho

    Reacted by Karthikeyan N
    Reacted by Spaceychen
  8. rekram1-node commented on Oct 17, 2025

    @rekram1-node
    rekram1-node
    on Oct 17, 2025
    Member
    More actions

    @perlator fixed, may require u to restart opencode but model list should refresh

    Reacted by Thomas Schmidt
    Reacted by Spaceychen and ashcdev
  9. blankenshipz commented on Oct 31, 2025

    @blankenshipz
    blankenshipz
    on Oct 31, 2025
    Author
    More actions

    I'm still having this issue despite running the latest version of opencode

    opencode --version
    0.15.30
    
     opencode models | grep lmstudio
    lmstudio/openai/gpt-oss-20b
    lmstudio/qwen/qwen3-30b-a3b-2507
    
    curl localhost:1234/v1/models
    {
      "data": [
        {
          "id": "qwen/qwen3-vl-30b",
          "object": "model",
          "owned_by": "organization_owner"
        },
        {
          "id": "text-embedding-nomic-embed-text-v1.5",
          "object": "model",
          "owned_by": "organization_owner"
        },
        {
          "id": "openai/gpt-oss-20b",
          "object": "model",
          "owned_by": "organization_owner"
        }
      ],
      "object": "list"
    }
    
    Reacted by Karthikeyan N
  10. rekram1-node commented on Oct 31, 2025

    @rekram1-node
    rekram1-node
    on Oct 31, 2025
    Member
    More actions

    currently opencode isnt hitting the models endpoint of your provider, we should add something like that but currently everything comes from models.dev and your opencode config

    Reacted by Karthikeyan N
    Reacted by Spaceychen
  11. KarthiDreamr commented on Nov 16, 2025

    @KarthiDreamr
    KarthiDreamr
    on Nov 16, 2025
    More actions
    Image I think removing the ghost endpoint when its found no longer alive is the best way to implement this. This way, we don't need to refresh model list everytime launch etc.
  12. marduk191 commented on Feb 5, 2026

    @marduk191
    marduk191
    on Feb 5, 2026
    More actions

    or get this, use the api correctly?

    Reacted by Mahmoud Abdel-Fattah, Luc Gendrot, Praise Dare, Kohio Deflesselle and Marco Pagliari
  13. jecruz commented on Feb 11, 2026

    @jecruz
    jecruz
    on Feb 11, 2026
    More actions

    It seems when you delete models via the interface, some may not be getting cleaned up properly in the .internal/model-data.json when the names or aliases are close or the same. I think in my case, the alias was the same qwen3-coder-next. When I modified the .internal/model-data.json to remove two deleted model entries, once saved, the list of models refreshed on its own. Initially, it listed the models with their full name and the alias, and double entries for all models. I tried the refresh list, and it listed everything as expected. My issue involved similarly named models qwen3-coder-next (lingering entry) and the newly added Qwen3-Coder-Next-MLX-6bit.

    Reacted by Georgios Papadakis
  14. SpencerGraffunder commented on Feb 12, 2026

    @SpencerGraffunder
    SpencerGraffunder
    on Feb 12, 2026
    More actions

    I'm running into this problem too. I downloaded a new model in LM Studio and want to use it in OpenCode. When I do opencode models --refresh, it just gets the old list of models. Going to http://localhost:1234/v1/models shows the updated list so I think LM Studio is working fine. I reinstalled OpenCode and LM Studio, cleared cache files, and it's still the same.

  15. ggppdk commented on Apr 10, 2026

    @ggppdk
    ggppdk
    on Apr 10, 2026
    More actions

    It seems when you delete models via the interface, some may not be getting cleaned up properly in the .internal/model-data.json when the names or aliases are close or the same. I think in my case, the alias was the same qwen3-coder-next. When I modified the .internal/model-data.json to remove two deleted model entries, once saved, the list of models refreshed on its own. Initially, it listed the models with their full name and the alias, and double entries for all models. I tried the refresh list, and it listed everything as expected. My issue involved similarly named models qwen3-coder-next (lingering entry) and the newly added Qwen3-Coder-Next-MLX-6bit.

    In my case
    1, i deleted a model
    2. then restored it from backup

    • the model refused to appear on the list of models inside the UI of LM studio
    • model was not showing up via the API http://localhost:1234/v1/models

    and when going to its download page it was showing the model as already downloaded
    ... and i could still load it manually

    So deleting this
    USER_FOLDER/.lmstudio/.internal/model-data.json
    did the trick (to make the restored-from-backup model to reappear):

    Alternatively this worked too:
    Changing the flag
    transient: true
    to
    transient: false

    Another option was to rename the parent folder of the model, this also made the model to reappear inside the ui and in the list via the API

  16. Red-Cat-Fat commented on Jun 5, 2026

    @Red-Cat-Fat
    Red-Cat-Fat
    on Jun 5, 2026
    More actions

    Hello, the problem is still present in version 1.16.2

    opencode --version
    1.16.2
    

    I had LMStudio installed on my computer with several models that I hadn't used for a long time. I decided to update the list, but in the process, I accidentally deleted them and downloaded more recent versions. As a result, they remained in the opencode memory. The command opencode models --refresh doesn't update the list.
    Could you please tell me where the model list is stored? I might try to fix this bug myself, if I can.

    PS. If I request a list of models from LM Studio using curl http://localhost:1234/v1/models it returns a correct list. Therefore, I suspect that the models are not being updated by opencode.

    Reacted by Leonid Vygovskiy, Luiz Junio and Ondřej Súkup
  17. wweeks commented on Jun 12, 2026

    @wweeks
    wweeks
    on Jun 12, 2026
    More actions

    @Red-Cat-Fat
    Just found this project, and this problem... I think what they mean is https://models.dev/providers/lmstudio/

    It is building its models list from models.dev (website), not your local models list.

  18. kingeke commented on Jun 16, 2026

    @kingeke
    kingeke
    on Jun 16, 2026
    More actions

    @wweeks do you know how we can get it to read the local models list instead?

  19. HyperboreanSlug commented on Jul 6, 2026

    @HyperboreanSlug
    HyperboreanSlug
    on Jul 6, 2026
    More actions

    @Red-Cat-Fat Just found this project, and this problem... I think what they mean is https://models.dev/providers/lmstudio/

    It is building its models list from models.dev (website), not your local models list.

    This appears to be exactly what's going on, and the problem still persists.

    Reacted by Oleh Solomoichenko
  20. GBry commented on Jul 13, 2026

    @GBry
    GBry
    on Jul 13, 2026
    More actions

    This is very crucial. How can we solve this? Add the model manually?

  21. PigeonCoding commented on Jul 17, 2026

    @PigeonCoding
    PigeonCoding
    on Jul 17, 2026
    More actions

    My current workaround is to use this project https://github.com/agustif/opencode-lmstudio

    Reacted by Raphael Exer
  22. aadityabhatia commented on Jul 18, 2026

    @aadityabhatia
    aadityabhatia
    on Jul 18, 2026
    More actions

    There is an unmerged pull request at sethjones/opencode/pull/2 that was referenced in #18011 but closed last month. Curious why it was not merged.

  23. aadityabhatia commented on Jul 18, 2026

    @aadityabhatia
    aadityabhatia
    on Jul 18, 2026
    More actions

    Likely duplicate: #23327

  24. github-actions commented on Sep 17, 2026

    @github-actions
    github-actionsBot
    on Sep 17, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  25. github-actions
    closed this as not plannedon Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.