Skip to content

LiteLLM models not refreshed after initial fetch #4790

@tbsdb

Description

@tbsdb

Plugin Type

VSCode Extension

App Version

v4.141.2

Description

When using the LiteLLM API Provider with a correct BaseURL and API key, the initial model fetch works as expected. However, subsequent model refreshes do not trigger any request to the LiteLLM server endpoint /v1/models/info.

Current workaround is to manually delete the litellm model cache file and restart VS code: rm ~/.config/Code/User/globalStorage/kilocode.kilo-code/cache/litellm_models.json

I suspect incorrect logic in the kilocode/src/api/providers/fetchers/modelCache.ts refreshModels function.

Reproduction steps

  1. Configure the LiteLLM API Provider (e.g. 192.168.0.26:4000) with a valid API key and click the “Refresh Models” button.
  2. Modify the exposed model information on the LiteLLM server and restart the LiteLLM server.
    • If no LiteLLM server is available, observe the network traffic in the VS Code Developer Console instead.
  3. Click the “Refresh Models” button in Kilo again.
  4. Observe that no request is sent to the LiteLLM endpoint; the model configuration remains cached, while the UI reports “Models list refreshed successfully!”.

Provider

LiteLLM (self-hosted)

Model

devstral (issue is model agnostic)

System Information

OS: Ubuntu 24.04.3 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Intake

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions