Skip to content

Delete provider groups for real once VS Code ships lm.removeLanguageModelsProviderGroup #316

Description

@Vivswan

What breaks

$ # user removes the server entry "old" in the dashboard
[..] Servers setting entries removed; their provider groups remain: { "labels": ["old"] }
$ # every VS Code start afterwards, for the leftover group
[..] Fetching from:: "http://10.30.0.51:4000/v1/model/info"
[..] ERROR: Failed to fetch models for provider group at http://10.30.0.51:4000 RequestError(timeout, discovery, no endpoint served)

Removing a servers entry cannot delete its VS Code provider group. The host's command family is add-only (lm.addLanguageModelsProviderGroup, lm.migrateLanguageModelsProviderGroup), so the extension can only hide the group with a tombstone, and the group object stays in chatLanguageModels.json until the user deletes it by hand. Reported as #315.

Upstream fix

microsoft/vscode#328578 adds lm.removeLanguageModelsProviderGroup (fixes microsoft/vscode#328577). It takes the same argument shape as add, uses only name and vendor, and delegates to the service method the Manage Language Models editor's Delete action already uses, stored secrets included.

What this issue tracks

  • Feature-detect lm.removeLanguageModelsProviderGroup via vscode.commands.getCommands; call it when a declared entry is removed or renamed, keep the tombstone as the fallback on hosts without it
  • Use it as the update path for a "blocked" entry (the host refused the add as a duplicate of a group this extension created): remove, then re-add
  • Relax src/test/extension/hostGroupCommand.test.ts, which today pins that no removal command exists, into a probe of the consumed command's semantics when present
  • Once a VS Code stable release ships the command, drop the tombstone-only notice wording and the models-file deletion steps from the docs

Expected vs actual

  • Expected: removing an entry removes its provider group; the picker and the host's models list forget it
  • Actual: the group survives, is probed on every start, and its failures fill the diagnostics until the user edits the models file and reloads

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions