Skip to content

fix(flow): probe free models live before picking a default - #4

Merged
SeeRay11 merged 2 commits into
devfrom
provider-catalog-race
Aug 25, 2026
Merged

fix(flow): probe free models live before picking a default#4
SeeRay11 merged 2 commits into
devfrom
provider-catalog-race

Conversation

@SeeRay11

Copy link
Copy Markdown
Owner

Summary

  • "use a free model" picked the catalog's first free id by list order, not liveness — deepseek-v4-flash-free is listed but answers HTTP 400, so a fresh install could get stuck on a dead default.
  • onUseFree now walks the free-model candidates and calls the existing testModel probe (same live check the per-node "test" button runs) on each, setting the default only on the first one that actually answers a real prompt.

Test plan

  • bun run typecheck clean (packages/flow)
  • bun test — 507 pass, 0 fail
  • Verified live: cleared the stored default, clicked "use a free model" in the running app — skipped the broken deepseek-v4-flash-free and landed on a model confirmed to answer (hy3-free)

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

SeeRay11 and others added 2 commits August 23, 2026 20:17
`GET /api/integration` answers as soon as the engine is listening, but the
catalog behind it is populated separately, so a page that loads the instant the
engine comes up gets 200 with nothing in it. Nothing refetched it until a key
changed, so the first thing a fresh install saw when it clicked "api keys" was
an empty provider list — and one reload fixed it, which is the tell.

Both catalog reads now retry on a short backoff, and opening the panel with no
rows refetches. The model list only retries when a connected provider is
present, since a fresh install with no key genuinely has no models and waiting
on that would just delay the panel that exists to fix it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"use a free model" picked the catalog's first free id, which can be
listed but dead (deepseek-v4-flash-free answers HTTP 400). Walk the
free candidates and set the default only on the first one that
answers a real throwaway prompt, same check the per-node test button
runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@SeeRay11
SeeRay11 merged commit f71e65c into dev Aug 25, 2026
2 checks passed
@SeeRay11
SeeRay11 deleted the provider-catalog-race branch August 25, 2026 00:08
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