Skip to content

[FEATURE]: Refresh models manually #4734

Closed

Description

@sazary

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

the problem

afaik there is no way to manually refresh the models list. there are several issues reported that are basically saying "i can't see the latest model just released" and the devs are pointing to manually remove the cache file (~/.cache/opencode/models.json). e.g. look at #4493, #4463, #2961. this is not a good ux and wastes dev time.

the solution

i think we could just add a keyboard shortcut in the "select model" modal, named "refresh models list" with the possible default shortcut of ctrl+r which would basically just call the refresh method at ./packages/opencode/src/provider/models.ts

if this makes sense i could work on a pr

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Nov 25, 2025
  2. github-actions commented on Nov 25, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    These issues all describe the same root problem: users cannot refresh the models list when it becomes stale, requiring manual cache file deletion as a workaround. Implementing the refresh shortcut proposed in this issue would resolve all of them.

  3. rekram1-node commented on Nov 25, 2025

    @rekram1-node
    Contributor

    Yup definitely wanna do that. Also note that you can do opencode models --refresh now but still yeah needs to be in the tui

  4. kristopolous commented on Feb 6, 2026

    @kristopolous

    Also it doesn't add all the models. Essentially this should be blank

    diff \
      <(opencode models --refresh | grep openrouter | cut -d '/' -f 2- | sort) \
      <(curl -s https://openrouter.ai/api/v1/models | jq -r '.data[].id' | sort ) 
    

    but instead it's very different and the opencode models list has a bunch of invalid entries

  5. github-actions commented on Apr 7, 2026

    @github-actions
    Contributor

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

  6. sergiotapia commented on Apr 20, 2026

    @sergiotapia

    Any idea when this will be fixed? I still can't use kimi 2.6 even though it's on my Zen subscription.

  7. andrescevp commented on May 3, 2026

    @andrescevp

    up

  8. magicprinc commented on May 5, 2026

    @magicprinc

    no deepseek on my Go subscription

    1.14.34 (from choco)

    opencode models --refresh

    Models cache refreshed
    opencode/big-pickle
    opencode/claude-3-5-haiku
    opencode/claude-haiku-4-5
    opencode/claude-opus-4-1
    opencode/claude-opus-4-5
    opencode/claude-opus-4-6
    opencode/claude-sonnet-4
    opencode/claude-sonnet-4-5
    opencode/claude-sonnet-4-6
    opencode/gemini-3-flash
    opencode/gemini-3.1-pro
    opencode/glm-5
    opencode/glm-5.1
    opencode/gpt-5
    opencode/gpt-5-codex
    opencode/gpt-5-nano
    opencode/gpt-5.1
    opencode/gpt-5.1-codex
    opencode/gpt-5.1-codex-max
    opencode/gpt-5.1-codex-mini
    opencode/gpt-5.2
    opencode/gpt-5.2-codex
    opencode/gpt-5.3-codex
    opencode/gpt-5.3-codex-spark
    opencode/gpt-5.4
    opencode/gpt-5.4-mini
    opencode/gpt-5.4-nano
    opencode/gpt-5.4-pro
    opencode/kimi-k2.5
    opencode/minimax-m2.5
    opencode/minimax-m2.5-free
    opencode/nemotron-3-super-free
    opencode-go/glm-5
    opencode-go/glm-5.1
    opencode-go/kimi-k2.5
    opencode-go/mimo-v2-omni
    opencode-go/mimo-v2-pro
    opencode-go/minimax-m2.5
    opencode-go/minimax-m2.7
    deepseek/deepseek-chat
    deepseek/deepseek-reasoner
    nvidia/black-forest-labs/flux.1-dev
    nvidia/deepseek-ai/deepseek-coder-6.7b-instruct
    nvidia/deepseek-ai/deepseek-r1
    nvidia/deepseek-ai/deepseek-r1-0528
    nvidia/deepseek-ai/deepseek-v3.1
    nvidia/deepseek-ai/deepseek-v3.1-terminus
    nvidia/deepseek-ai/deepseek-v3.2
    nvidia/google/codegemma-1.1-7b
    nvidia/google/codegemma-7b
    nvidia/google/gemma-2-27b-it
    nvidia/google/gemma-2-2b-it
    nvidia/google/gemma-3-12b-it
    nvidia/google/gemma-3-1b-it
    nvidia/google/gemma-3-27b-it
    nvidia/google/gemma-3n-e2b-it
    nvidia/google/gemma-3n-e4b-it
    nvidia/google/gemma-4-31b-it
    nvidia/meta/codellama-70b
    nvidia/meta/llama-3.1-405b-instruct
    nvidia/meta/llama-3.1-70b-instruct
    nvidia/meta/llama-3.2-11b-vision-instruct
    nvidia/meta/llama-3.2-1b-instruct
    nvidia/meta/llama-3.3-70b-instruct
    nvidia/meta/llama-4-maverick-17b-128e-instruct
    nvidia/meta/llama-4-scout-17b-16e-instruct
    nvidia/meta/llama3-70b-instruct
    nvidia/meta/llama3-8b-instruct
    nvidia/microsoft/phi-3-medium-128k-instruct
    nvidia/microsoft/phi-3-medium-4k-instruct
    nvidia/microsoft/phi-3-small-128k-instruct
    nvidia/microsoft/phi-3-small-8k-instruct
    nvidia/microsoft/phi-3-vision-128k-instruct
    nvidia/microsoft/phi-3.5-moe-instruct
    nvidia/microsoft/phi-3.5-vision-instruct
    nvidia/microsoft/phi-4-mini-instruct
    nvidia/minimaxai/minimax-m2.1
    nvidia/minimaxai/minimax-m2.5
    nvidia/minimaxai/minimax-m2.7
    nvidia/mistralai/codestral-22b-instruct-v0.1
    nvidia/mistralai/devstral-2-123b-instruct-2512
    nvidia/mistralai/mamba-codestral-7b-v0.1
    nvidia/mistralai/ministral-14b-instruct-2512
    nvidia/mistralai/mistral-large-2-instruct
    nvidia/mistralai/mistral-large-3-675b-instruct-2512
    nvidia/mistralai/mistral-small-3.1-24b-instruct-2503
    nvidia/moonshotai/kimi-k2-instruct
    nvidia/moonshotai/kimi-k2-instruct-0905
    nvidia/moonshotai/kimi-k2-thinking
    nvidia/moonshotai/kimi-k2.5
    nvidia/nvidia/cosmos-nemotron-34b
    nvidia/nvidia/llama-3.1-nemotron-51b-instruct
    nvidia/nvidia/llama-3.1-nemotron-70b-instruct
    nvidia/nvidia/llama-3.1-nemotron-ultra-253b-v1
    nvidia/nvidia/llama-3.3-nemotron-super-49b-v1
    nvidia/nvidia/llama-3.3-nemotron-super-49b-v1.5
    nvidia/nvidia/llama-embed-nemotron-8b
    nvidia/nvidia/llama3-chatqa-1.5-70b
    nvidia/nvidia/nemoretriever-ocr-v1
    nvidia/nvidia/nemotron-3-nano-30b-a3b
    nvidia/nvidia/nemotron-3-super-120b-a12b
    nvidia/nvidia/nemotron-4-340b-instruct
    nvidia/nvidia/nvidia-nemotron-nano-9b-v2
    nvidia/nvidia/parakeet-tdt-0.6b-v2
    nvidia/openai/gpt-oss-120b
    nvidia/openai/whisper-large-v3
    nvidia/qwen/qwen2.5-coder-32b-instruct
    nvidia/qwen/qwen2.5-coder-7b-instruct
    nvidia/qwen/qwen3-235b-a22b
    nvidia/qwen/qwen3-coder-480b-a35b-instruct
    nvidia/qwen/qwen3-next-80b-a3b-instruct
    nvidia/qwen/qwen3-next-80b-a3b-thinking
    nvidia/qwen/qwen3.5-397b-a17b
    nvidia/qwen/qwq-32b
    nvidia/stepfun-ai/step-3.5-flash
    nvidia/z-ai/glm4.7
    nvidia/z-ai/glm5
    zai-coding-plan/glm-4.5
    zai-coding-plan/glm-4.5-air
    zai-coding-plan/glm-4.5-flash
    zai-coding-plan/glm-4.5v
    zai-coding-plan/glm-4.6
    zai-coding-plan/glm-4.6v
    zai-coding-plan/glm-4.7
    zai-coding-plan/glm-4.7-flash
    zai-coding-plan/glm-4.7-flashx
    zai-coding-plan/glm-5
    zai-coding-plan/glm-5-turbo
    zai-coding-plan/glm-5.1
    zai-coding-plan/glm-5v-turbo
    
  9. mitjap commented on Jun 17, 2026

    @mitjap

    Just a heads-up if there is anyone else wandering around. Model list is fetch form models.dev which might not be up to date with latest changes. You can manually edit the models.json and manually add models that you are missing. This file might be overwritten so make a backup to avoid duplicate work.

  10. Gaploid commented on Jul 11, 2026

    @Gaploid

    Hey folks, I’m thinking we could quickly build a models.dev-compatible endpoint based on our data.
    We automatically ingest model data primarily from LLM providers, with models.dev and LiteLLM JSON files as fallback sources. This could serve as a drop-in replacement for the existing endpoint, allowing new models to appear almost immediately after release with actual pricing. As a fallback opencode can rely on local file of models.dev.

    What do you think?

    We’ve already built something similar for LiteLLM: https://cloudprice.net/models/api?litellm=1

  11. eezzekl commented on Sep 21, 2026

    @eezzekl

    NVIDIA NIM — mismo problema de cache stale

    Confirmo que este bug afecta también a NVIDIA NIM (proveedor nvidia / nim en models.dev).

    Síntoma: modelos retirados/actualizados en el catálogo de NVIDIA siguen apareciendo en /models y en el picker de la TUI días después, hasta que se borra ~/.cache/opencode/models.json o se corre opencode models --refresh.

    Impacto real: intentos de usar modelos deprecated (p.ej. nemotron-3-ultra viejo) fallan en runtime con 404/400, rompiendo sesiones y agentes que los referencian.

    Workaround actual: alias ocm='opencode models --refresh' en shell y recordatorio mental antes de empezar trabajo con NIM.

    Relacionados v2: #2047 (LM Studio ghost models), #7714 (provider cache no actualizable), #42376 (startup bloquea fetch models.dev), #35090 (models.dev sin retry/cache/fallback).

    Pedido: exponer opencode models --refresh como comando interno accesible desde la TUI (p.ej. /model refresh o keybind), y/o TTL configurable para proveedores externos de alta rotación como NIM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions