Skip to content

Refresh the model catalog on demand - #631

Open
plux wants to merge 2 commits into
editor-code-assistant:masterfrom
plux:hn/model-catalog-refresh
Open

plux wants to merge 2 commits into
editor-code-assistant:masterfrom
plux:hn/model-catalog-refresh

Conversation

@plux

@plux plux commented Oct 5, 2026 •

Copy link
Copy Markdown

Context

  • Companion Emacs client: #332: Adds the refresh command and updates the model UI.

Description

The model catalog updates at startup and after provider configuration or authentication changes. When a provider adds or removes models during a session, users cannot request a fresh catalog without restarting ECA or changing configuration.

Changes

  • Add the models/refresh request. Return a model count and provider warnings after catalog reconciliation, and notify clients when the model list changes.
  • Try provider discovery, then models.dev. If discovery fails, retain usable in-memory models and report that they are stale. Keep the current catalog if no usable models remain.
  • Run near-expiry token renewal before discovery. Order refreshes with startup, configuration, and provider authentication syncs so an earlier auth change cannot publish a stale catalog after a later refresh.
  • Preserve active chat selections and document the request and response in the protocol reference.

@plux plux changed the title no ticket: Refresh the model catalog on demand Refresh the model catalog on demand Oct 5, 2026
plux added 2 commits October 9, 2026 08:51
Refresh provider catalogs without restarting the server or changing chat selections. Serialize sync turns, preserve usable models on fetch failure, and report accurate fallback warnings.
Reserve sync turns before dispatch so a refresh cannot publish a stale catalog after a prior login or logout request. Release unused turns on failure or when no sync occurs.
@plux
plux force-pushed the hn/model-catalog-refresh branch from 62bf0c5 to ba48629 Compare October 9, 2026 06:59

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant