Commit c9c1073
* feat(provider-setup): build-probe a provider's component, not just its API key (#900)
collect-models recorded `active` from the raw-key probe alone. That probe calls
the provider's own API upstream of Langflow, so a valid key on an image that
cannot instantiate the component produced a false `active`, and the real failure
surfaced tens of layers downstream as a generic node-build timeout — a full
triage cycle each time (#898/LE-1974, #907/LE-1987).
Adds a second, independent BUILD axis in two layers, because neither catches the
other's shape. Which shape a provider produces is decided upstream by where a
maintainer puts an import, and it is inconsistent across components — measured on
1.12.0.dev8: OpenAI and Google import langchain at module level (missing package
=> absent from the registry), while Anthropic imports lazily inside build_model
(missing package => registers normally and fails at build). The "Groq shape" from
#1039 is therefore already present in Anthropic today, so the catalog check this
issue originally proposed would not have been enough.
1. Catalog — one GET /api/v1/all, exact provider -> component-key map. Replaces
the substring token match, where `openai` also matched `OpenAI Compatible`,
and skips the `component_display_names` pseudo-category.
2. Build — every surviving component as a disconnected vertex of ONE throwaway
flow, deleted in a finally. A credentials error is a PASS: it proves the
client class was imported and constructed.
No paid call is possible: every SecretStrInput is neutralised first. This is
load-bearing, not hygiene — the registry template ships api_key as
{ value: "OPENAI_API_KEY", load_from_db: true }, so an un-neutralised probe would
load the global variable collect-models itself just saved and the default
text_output output would invoke the model for real.
The axis gets its own assert rather than riding on the existing env-keyed check:
that check skips providers whose env key is unset, but an unbuildable component is
a broken image regardless of whether anyone configured a key.
Fails OPEN on its own infrastructure, with a 60s build timeout against ~9s
measured. The daily's `Collect models` pre-flight shares its container with the
@stable shard and has a history of wedging it (#922/#927, #1011), so a probe
timeout degrades to a warning, never to a blocked pre-flight or a false inactive.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(provider-setup): make the build axis prove itself in CI, not just locally (#900)
PR #1051's first CI run exposed three defects in the build probe. All three are
fixed here, and the CI evidence is recorded in docs/collect-models.md so they are
not reintroduced.
1. FAIL-OPEN LOOKED LIKE A PASS. The probe timed out and still logged
"build axis: ✅ openai / ✅ anthropic / ✅ google" — fail-open and real success
produced identical output, so a probe that proved nothing reported everything
fine. That is the exact blind spot this issue exists to remove, reintroduced one
layer up. There is now a third state, `unknown`, distinct from ok and failed:
logged as "⚠️ … [NOT PROVEN]", never written to providers.json, and never
allowed to override the key verdict. Only a PROVEN packaging failure does.
2. THE PROBE KEPT THE SERVER WORKING AFTER THE CLIENT GAVE UP. The events GET
expired at 60s while the build ran on; gunicorn hit WORKER TIMEOUT and the next
CI step found the backend unreachable for 120s, failing the job. The probe now
POSTs to /api/v1/build/{job_id}/cancel on timeout — stopping waiting and
stopping working are the same act.
3. BATCHING DISCARDED ALL SIGNAL WHEN ONE COMPONENT WAS SLOW. All five were built
in a single request, so exceeding the budget lost the verdict for every provider
and the log could not even name the slow component. They are now built one at a
time via `stop_component_id`, each with its own 20s budget (~6x the slowest
measured) under a 90s ceiling for the axis.
Also measured while diagnosing, and recorded as external-dependency contract:
`event_delivery` defaults to `polling` and the events GET is a LONG-POLL that
blocks until the build finishes and returns every event at once — there is no
incremental read to lean on, which is why the budget is per component and paired
with cancel. Two hypotheses were tested and refuted rather than assumed: cold-start
imports (a restarted worker still probes in 9.3s) and the CI service container
holding provider keys (pr-validation.yml passes none, so no paid call was possible).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(provider-setup): run the build axis before the UI load, not after it (#900)
The reworked probe still reported `unknown` for all three providers on CI, twice,
with several components timing out on the POST that merely STARTS the build. That
is not a slow build — it is a backend that cannot accept the request.
Root cause is placement. `collect-models` saves three provider keys through the
Settings UI, and each save makes Langflow validate the provider and fetch its model
list. On the single-worker CI backend that is enough load to wedge it: both
pr-validation.yml and daily-stable.yml already carry a dedicated "Wait for the
backend to recover from the collect-models load" step immediately after this spec
for exactly that reason (#922/#927/#1044). The build probe was running inside that
load, before the recovery step — the worst possible moment. Two gunicorn WORKER
TIMEOUTs in the same window.
The probe consumes nothing the UI collection produces: not models.json, not the
saved keys, only the component registry. So it now runs FIRST, against an idle
backend, and `collectProviders` takes the verdicts as an argument instead of
probing concurrently with the key axis.
Locally (idle backend either way) this changes nothing — 3 clean runs, real ✅
verdicts, ~15s. The whole point is CI, where the previous placement produced no
signal at all.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Rafael <rafael@oriontech.me>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 6d3900d commit c9c1073
7 files changed
Lines changed: 1027 additions & 34 deletions
File tree
- docs
- tests
- helpers/provider-setup
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
82 | 106 | | |
83 | 107 | | |
84 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
150 | 141 | | |
151 | 142 | | |
152 | 143 | | |
| |||
298 | 289 | | |
299 | 290 | | |
300 | 291 | | |
301 | | - | |
302 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
311 | 327 | | |
312 | 328 | | |
313 | 329 | | |
314 | 330 | | |
315 | 331 | | |
316 | | - | |
| 332 | + | |
317 | 333 | | |
318 | 334 | | |
319 | 335 | | |
| |||
441 | 457 | | |
442 | 458 | | |
443 | 459 | | |
444 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
445 | 476 | | |
446 | 477 | | |
447 | | - | |
448 | | - | |
| 478 | + | |
| 479 | + | |
449 | 480 | | |
450 | 481 | | |
451 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments