Skip to content

feat: open any upstream's models from its row, and fetch missing lists without being asked - #49

Merged
fylorn merged 1 commit into
devfrom
feat/upstream-models
Sep 19, 2026
Merged

fylorn merged 1 commit into
devfrom
feat/upstream-models

Conversation

@fylorn

@fylorn fylorn commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

The model column said "not fetched" for three different situations: an upstream core had not asked yet, one whose key was refused, and one that offers no model list. It also kept saying so after core had fetched the list. A background fetch finished without an event, so the page kept what it read at startup. Seeing an upstream's models meant edit, then the models section, then refresh.

The cell. It is a button in every state except disabled, and the whole block highlights on hover. The second line says what is going on:

  • fetching, with a spinner;
  • failed, in the warning colour;
  • no list;
  • manual list;
  • narrowed range.

The panel. Opening the cell shows:

  • the models in range, with price (per-token billing only) and context window;
  • the models out of range, folded below;
  • a filter once there are more than ten models;
  • where the list came from and when, with a refresh button.

A failure shows the reason, with retry and edit buttons. An upstream without a list points to the manual list. Every edit entry opens the upstream dialog on its models section.

Fetching without being asked. Opening the upstream page asks core to fetch lists that are missing, failed or out of date. models_changed reloads the overview, so counts appear as each answer lands. No click is needed.

The dialog's models section follows the fetch state:

  • it reloads when an answer lands;
  • while a list is being fetched, it waits instead of asking for a manual list;
  • its badge says failed or no list instead of "not fetched".

Core dependency

Pins ThinkWatch-Core v0.8.2 (ThinkWatchProject/ThinkWatch-Core#47). It adds:

  • model_status, model_fetching, model_checked_at_ms and model_error on each upstream;
  • the models_changed event;
  • POST /models/refresh, which fetches what is missing, failed or expired and skips anything asked in the last minute.

Test plan

  • pnpm typecheck, pnpm vitest run (including new modelFace tests), pnpm build

  • cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test against the v0.8.2 tag

  • Isolated preview with real mouse clicks. It covers:

    • every cell state: listed with some models out of range, failed, no list, manual list, fetching then listed, account, disabled;
    • retry;
    • the manual-list entry opening the dialog on its models section.
  • Real app on an isolated data directory with the new core. On start, the core logs and the overview showed:

    • key refused → failed with the 401 reason;
    • unreachable → failed;
    • 404 → no list;
    • manual list;
    • a local relay listed 12 models.

    A second page visit within a minute asked nothing.

🤖 Generated with Claude Code

…s without being asked

The model column showed "not fetched" for upstreams core had not asked yet,
upstreams whose key was refused and upstreams that offer no list, and it kept
showing it after core had fetched them: a background fetch finished without
an event, so the page kept what it read at startup. Seeing an upstream's
models meant edit, then models, then refresh.

- The model cell is a button in every state but disabled. Its second line
  says fetching, failed (in the warning colour), no list, manual list or
  narrowed range, and a spinner shows while a fetch runs.
- It opens a panel: models in range with price and context window, the ones
  out of range folded below, a filter past ten models, when and where the
  list came from, and a refresh button. A failure shows the reason with retry
  and edit; an upstream without a list points to the manual list. Every edit
  entry opens the upstream dialog on its model section.
- Opening the upstream page asks core to fetch lists that are missing, failed
  or out of date, and models_changed reloads the overview, so counts appear
  as each answer lands.
- The dialog's model section follows the fetch state: it reloads when an
  answer lands, waits instead of asking for a manual list while one is being
  fetched, and its badge says failed or no list instead of "not fetched".

Pins ThinkWatch-Core v0.8.2 (ThinkWatch-Core#47), which reports the fetch status,
the models_changed event and POST /models/refresh.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 669e3c0 into dev Sep 19, 2026
2 checks passed
@fylorn
fylorn deleted the feat/upstream-models branch September 19, 2026 11:14
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