fix(flow): probe free models live before picking a default - #4
Merged
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deepseek-v4-flash-freeis listed but answers HTTP 400, so a fresh install could get stuck on a dead default.onUseFreenow walks the free-model candidates and calls the existingtestModelprobe (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 typecheckclean (packages/flow)bun test— 507 pass, 0 faildeepseek-v4-flash-freeand landed on a model confirmed to answer (hy3-free)Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com